/* Chilli Player Hub. Base copied from chillibadminton.com public/assets/site.css (keep in sync); Hub additions at the bottom.
   Since 2026-10-09 the Hub is Open Sans throughout (Sean): headings that were Bebas Neue are Open Sans ExtraBold at 75% width, in capitals. */
:root {
  --red: #FF2D20;
  --red-rgb: 232, 37, 26;
  --red-dark: #CC2419;
  --red-fill: #D01A10;         /* filled buttons: white text passes WCAG AA */
  --on-red: #ffffff;
  --red-glow: rgba(var(--red-rgb), 0.15);
  --black: #080808;
  --black-rgb: 8, 8, 8;
  --dark: #0f0f0f;
  --dark2: #161616;
  --dark3: #1e1e1e;
  --white: #f0f0f0;           /* main text colour (dark in light mode) */
  --white-rgb: 240, 240, 240;
  --border: rgba(var(--white-rgb), 0.07);
  --fg-rgb: var(--white-rgb);  /* text colour as r,g,b for faded text */
  --bg-rgb: var(--black-rgb);
  --ok: var(--cb-success);
  --warn: var(--cb-warning);
  --err: var(--cb-error);
  --hub-font: 'Open Sans', sans-serif;   /* swapped per language below */
  color-scheme: dark;
}
/* Light, high contrast and colour-blind palettes come from /assets/viewing/viewing.css
   (the cog in the nav). It sets data-cb-theme etc. on <html> and remaps the tokens above. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--hub-font);
  font-size: calc(16px * var(--cb-text-scale, 1));
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(var(--bg-rgb), 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img { height: 32px; width: auto; }

.nav-logo-text {
  font-family: var(--hub-font);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
}

.nav-logo-text span { color: var(--red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--hub-font);
  font-size: calc(13px * var(--cb-text-scale, 1));
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.nav-cta {
  background: var(--red-fill) !important;
  color: var(--on-red) !important;
  padding: 10px 24px;
  border-radius: 2px;
  font-weight: 700 !important;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--red-dark) !important; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 160px 48px 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-tag {
  font-family: var(--hub-font);
  font-size: calc(11px * var(--cb-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-tag::before, .section-tag::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--red);
}

h1, h2 {
  font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 20px;
}

h1 { font-size: calc(clamp(40px, 6vw, 72px) * var(--cb-heading-scale, 1)); }
h1 em, h2 em { font-style: normal; color: var(--red); }

.page-lead {
  font-size: calc(17px * var(--cb-text-scale, 1));
  color: var(--white);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── FORM ── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 48px 100px;
}

.form-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 48px;
}

.form-row { margin-bottom: 24px; }
.form-row:last-of-type { margin-bottom: 0; }

.form-row > label {
  display: block;
  font-family: var(--hub-font);
  font-size: calc(12px * var(--cb-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 8px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--hub-font);
  font-size: calc(15px * var(--cb-text-scale, 1));
  padding: 14px 16px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
}

.form-row textarea { resize: vertical; min-height: 120px; }

/* Acknowledgement of Country (matches homepage) */
.acknowledgement {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
  font-size: calc(12px * var(--cb-text-scale, 1));
  color: var(--white);
  line-height: 1.7;
  max-width: 800px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--red-fill);
  color: var(--on-red);
  font-family: var(--hub-font);
  font-size: calc(15px * var(--cb-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 36px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-message {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 2px;
  font-size: calc(14px * var(--cb-text-scale, 1));
  display: none;
}

.form-message.success {
  display: block;
  border: 1px solid currentColor;
  color: var(--ok);
}

.form-message.error {
  display: block;
  background: rgba(var(--red-rgb), 0.1);
  border: 1px solid rgba(var(--red-rgb), 0.3);
  color: var(--red);
}

/* ── FOOTER ── */
footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 32px 48px 24px;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo img { height: 32px; width: auto; }

.footer-logo-text {
  font-family: var(--hub-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
}

.footer-logo-text span { color: var(--red); }

.footer-copy {
  font-size: calc(12px * var(--cb-text-scale, 1));
  color: var(--white);
  font-family: var(--hub-font);
  letter-spacing: 0.05em;
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-family: var(--hub-font);
  font-size: calc(12px * var(--cb-text-scale, 1));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 600px) {
  .page-header { padding: 130px 24px 40px; }
  main { padding: 0 24px 72px; }
  .form-card { padding: 32px 24px; }
  footer { padding: 32px 24px 24px; }
  footer .footer-main { flex-direction: column; text-align: start; gap: 12px; }
}

/* ── PLAYER HUB ADDITIONS ── */
.nav-badge {
  font-size: calc(11px * var(--cb-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 6px 12px;
  border-radius: 2px;
  white-space: nowrap;
}

.form-message { display: block; margin: 0 0 24px; }

.help { margin-top: 8px; font-size: calc(13px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.7); }

.check-row, .privacy { margin-top: 8px; }

.form-row label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: calc(14px * var(--cb-text-scale, 1));
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.form-row label.check input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--red);
  flex-shrink: 0;
}

.privacy-box {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 14px;
  font-size: calc(13px * var(--cb-text-scale, 1));
  line-height: 1.6;
  color: rgba(var(--fg-rgb), 0.85);
}

.privacy-box p + p { margin-top: 8px; }

.turnstile-row { min-height: 65px; }

.form-foot { margin-top: 20px; text-align: center; font-size: calc(14px * var(--cb-text-scale, 1)); }
.form-foot a, .form-card a { color: var(--white); }

.actions { display: flex; flex-direction: column; gap: 12px; }
.actions .btn-primary { margin-top: 0; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  color: var(--white);
  font-family: var(--hub-font);
  font-size: calc(13px * var(--cb-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 36px;
  border: 1px solid rgba(var(--fg-rgb), 0.25);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.page-cta { margin-top: 32px; }
.btn-primary.inline { width: auto; }

/* Eye button on password fields (added by assets/hub.js) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: rgba(var(--fg-rgb), 0.6);
  cursor: pointer;
  transition: color 0.15s;
}
.pw-toggle:hover { color: var(--white); }
.pw-toggle:focus-visible { color: var(--white); outline: 1px solid var(--red); }
.pw-toggle[aria-pressed="true"] { color: var(--red); }

@media (max-width: 900px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: calc(12px * var(--cb-text-scale, 1)); }
  .nav-logo-text { font-size: 18px; }
}

@media (max-width: 480px) {
  .nav-logo-text { display: none; }
  .nav-badge { padding: 4px 8px; font-size: calc(10px * var(--cb-text-scale, 1)); letter-spacing: 0.15em; }
  .footer-links { flex-wrap: wrap; gap: 12px 20px; }
}

/* ── PHASE 2: PROFILE ── */
.page-header--compact { padding-bottom: 32px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.card-title {
  font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: calc(28px * var(--cb-heading-scale, 1));
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.notice-card { border-color: rgba(var(--red-rgb), 0.45); }

.hub-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.15s;
}
.hub-card:hover, .hub-card:focus-visible { border-color: var(--red); outline: none; }
.hub-card__title { font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: calc(26px * var(--cb-text-scale, 1)); letter-spacing: 0.04em; }
.hub-card__text { font-size: calc(14px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.75); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--dark3); border: 2px solid var(--border); }
.avatar--lg { width: 96px; height: 96px; }
.page-header .avatar { display: block; margin: 0 auto 16px; }
.avatar--empty { display: inline-block; }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-row .help { margin: 0; }
.form-row input[type="file"] { padding: 10px; }

.cropper { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 8px 0 16px; }
.cropper[hidden] { display: none; }
.cropper__canvas {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--red);
  cursor: grab;
  touch-action: none;
}
.cropper__canvas:active { cursor: grabbing; }
.cropper__zoom { display: flex; align-items: center; gap: 10px; font-size: calc(13px * var(--cb-text-scale, 1)); width: 100%; max-width: 320px; }
.cropper__zoom input { flex: 1; accent-color: var(--red); }

.has-error input, .has-error select { border-color: var(--red); border-width: 2px; }
.has-error label { color: var(--err); }
.field-error { margin-top: 6px; font-size: calc(13px * var(--cb-text-scale, 1)); color: var(--err); }

.changes { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: calc(14px * var(--cb-text-scale, 1)); }
.changes th, .changes td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.changes th { font-size: calc(11px * var(--cb-text-scale, 1)); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(var(--fg-rgb), 0.7); }

.history { list-style: none; display: flex; flex-direction: column; }
.history li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: calc(14px * var(--cb-text-scale, 1)); }
.history li:last-child { border-bottom: none; }
.history__when { color: rgba(var(--fg-rgb), 0.65); min-width: 170px; }
.history__what { flex: 1; }
.history__note { flex-basis: 100%; font-size: calc(13px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.75); }
.history__status { font-size: calc(12px * var(--cb-text-scale, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.status--approved, .status--saved { color: var(--ok); }
.status--rejected, .status--expired { color: var(--err); }
.status--pending, .status--awaiting_email { color: var(--warn); }
.status--withdrawn, .status--superseded { color: rgba(var(--fg-rgb), 0.55); }

@media (max-width: 600px) {
  .hub-cards { grid-template-columns: 1fr; }
  .history__when { min-width: 0; flex-basis: 100%; }
}

/* Nav links stay on one line on wide screens; narrower screens use the menu button (below). */
.nav-links a { white-space: nowrap; }
@media (max-width: 600px) {
  nav { padding: 14px 16px; gap: 12px; }
}

/* ── HOME (welcome) ── */
.home { display: flex; flex-direction: column; gap: 40px; }
.hub-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 56px 28px 28px;
  padding-inline: 28px 56px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--red);
  border-radius: 4px;
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.hub-card:hover, .hub-card:focus-visible { border-color: var(--red); background: var(--dark3); transform: translateY(-2px); }
.hub-card__title { font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: calc(30px * var(--cb-heading-scale, 1)); line-height: 1; letter-spacing: 0.02em; }
.hub-card__text { font-size: calc(14px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.6); line-height: 1.5; }
.hub-card__go { position: absolute; inset-inline-end: 24px; top: 50%; transform: translateY(-50%); font-size: calc(22px * var(--cb-text-scale, 1)); color: var(--red); transition: inset-inline-end 0.2s; }
.hub-card:hover .hub-card__go { inset-inline-end: 18px; }

.signout { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.btn-small { width: auto; padding: 10px 24px; margin: 0; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: calc(13px * var(--cb-text-scale, 1));
  color: rgba(var(--fg-rgb), 0.75);
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--white); }

@media (max-width: 640px) {
  .hub-cards { grid-template-columns: 1fr; }
}

/* ── CLASSES ── */
.class-block { padding: 20px 0; border-bottom: 1px solid var(--border); }
.class-block:first-of-type { padding-top: 4px; }
.class-block:last-of-type { border-bottom: none; padding-bottom: 0; }
.class-block__name { font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: calc(26px * var(--cb-text-scale, 1)); line-height: 1.1; letter-spacing: 0.02em; }
.class-block__when { font-size: calc(14px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.7); margin-top: 2px; }
.dates { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dates li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--dark3); border: 1px solid var(--border); border-radius: 2px; font-size: calc(14px * var(--cb-text-scale, 1)); }
.dates__day { font-weight: 600; }
.dates__tag { font-size: calc(11px * var(--cb-text-scale, 1)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--err); }
.dates__tag--moved { color: var(--warn); }
.dates__cancelled .dates__day { text-decoration: line-through; color: rgba(var(--fg-rgb), 0.45); }
.stats { display: flex; gap: 16px; margin-bottom: 20px; }
.stat { flex: 1; padding: 16px; background: var(--dark3); border: 1px solid var(--border); border-radius: 2px; text-align: center; }
.stat__n { display: block; font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: calc(44px * var(--cb-heading-scale, 1)); line-height: 1; color: var(--red); }
.stat__l { font-size: calc(12px * var(--cb-text-scale, 1)); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(var(--fg-rgb), 0.65); }

/* ── VIDEOS ── */
.video-list { display: flex; flex-direction: column; gap: 12px; }
.video-card { gap: 4px; }
.video-card__date { font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: calc(24px * var(--cb-text-scale, 1)); line-height: 1.1; letter-spacing: 0.02em; }
.video-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.video-card__tags span { font-size: calc(11px * var(--cb-text-scale, 1)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--border); border-radius: 2px; color: rgba(var(--fg-rgb), 0.7); }
.section-tag a { color: inherit; text-decoration: none; }
.video-page { max-width: 960px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-players { text-align: center; margin-top: 0; }
.video-notes { font-size: calc(15px * var(--cb-text-scale, 1)); line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.video-drawing { display: block; width: 100%; height: auto; border-radius: 2px; background: #000; }
.back-link { color: rgba(var(--fg-rgb), 0.7); font-size: calc(14px * var(--cb-text-scale, 1)); }
.back-link:hover { color: var(--white); }
@media (max-width: 600px) {
  .stats { gap: 10px; }
  .stat__n { font-size: calc(36px * var(--cb-heading-scale, 1)); }
}

/* ── PROFILE HEADER (photo with hover pen, name, profile created) ── */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.profile-hero { padding-top: 28px; padding-bottom: 28px; }
.profile-hero__row { display: flex; align-items: center; gap: 20px; }
.profile-hero__who { min-width: 0; }
.profile-hero__name { font-size: calc(36px * var(--cb-heading-scale, 1)); margin: 0; overflow-wrap: anywhere; }
.profile-hero__since { margin-top: 4px; font-size: calc(13px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.6); }
.profile-hero .help { margin-top: 6px; }
.avatar-edit { position: relative; display: block; flex: none; width: 96px; height: 96px; border-radius: 50%; cursor: pointer; }
.avatar-edit .avatar { display: block; }
.avatar-edit__pen {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff;
  opacity: 0; transition: opacity 0.2s;
}
.avatar-edit:hover .avatar-edit__pen,
.profile-hero__row:has(#photo:focus-visible) .avatar-edit__pen { opacity: 1; }
.profile-hero__row:has(#photo:focus-visible) .avatar-edit { outline: 2px solid var(--red); outline-offset: 3px; }
@media (hover: none) {
  /* Phones and tablets have no hover: keep a small pen badge showing. */
  .avatar-edit__pen { inset: auto -2px -2px auto; width: 32px; height: 32px; opacity: 1; background: var(--red); border: 2px solid var(--dark2); }
  .avatar-edit__pen svg { width: 16px; height: 16px; }
}
.photo-fallback { margin-top: 16px; }
.photo-fallback[hidden] { display: none; }
.photo-fallback .btn-secondary { width: auto; }
.cropper__tools { display: flex; gap: 10px; }
.cropper__tool {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: var(--dark3); color: var(--white); border: 1px solid var(--border); border-radius: 2px; cursor: pointer;
}
.cropper__tool:hover, .cropper__tool:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.cropper__actions { display: flex; gap: 12px; width: 100%; max-width: 320px; }
.cropper__actions > * { flex: 1; margin-top: 0; }
@media (max-width: 480px) {
  .profile-hero__row { gap: 14px; }
  .avatar-edit, .avatar-edit .avatar { width: 72px; height: 72px; }
  .profile-hero__name { font-size: calc(28px * var(--cb-heading-scale, 1)); }
}

/* ── VIDEO THUMBNAILS (YouTube's own image) ── */
.video-card { flex-direction: row; align-items: center; gap: 20px; padding: 16px 56px 16px 16px; padding-inline: 16px 56px; }
.video-card__thumb {
  flex: none; display: block; width: 160px; aspect-ratio: 16 / 9; height: auto;
  object-fit: cover; border-radius: 2px; background: var(--dark3);
}
.video-card__thumb--empty { display: flex; align-items: center; justify-content: center; color: rgba(var(--fg-rgb), 0.4); }
.video-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 480px) {
  .video-card { gap: 14px; padding: 12px 44px 12px 12px; padding-inline: 12px 44px; }
  .video-card__thumb { width: 112px; }
  .video-card__date { font-size: calc(20px * var(--cb-text-scale, 1)); }
}

/* ---- Power Cards pages (cards.php, card.php). The card itself is
   public/assets/powercard.css + app/src/PowerCard/PowerCardTemplate.php,
   shared with the CRM. */
.cards-count { margin: 0 0 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 24px; }
.card-grid__item { display: block; text-decoration: none; border-radius: 9px; transition: transform 0.15s ease; }
.card-grid__item:hover, .card-grid__item:focus-visible { transform: translateY(-3px); }
.card-grid__item:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.cards-progress ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cards-progress li { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; font-size: calc(14px * var(--cb-text-scale, 1)); }
.cards-progress li.done { color: var(--ok); }
.cards-progress__bar { height: 8px; border-radius: 4px; background: rgba(var(--fg-rgb), 0.1); overflow: hidden; }
.cards-progress__fill { display: block; height: 100%; background: var(--red); }
.cards-progress li.done .cards-progress__fill { background: var(--ok); }
.cards-progress__fill--0 { width: 0; } .cards-progress__fill--1 { width: 10%; } .cards-progress__fill--2 { width: 20%; }
.cards-progress__fill--3 { width: 30%; } .cards-progress__fill--4 { width: 40%; } .cards-progress__fill--5 { width: 50%; }
.cards-progress__fill--6 { width: 60%; } .cards-progress__fill--7 { width: 70%; } .cards-progress__fill--8 { width: 80%; }
.cards-progress__fill--9 { width: 90%; } .cards-progress__fill--10 { width: 100%; }
.cards-progress__n { font-size: calc(13px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.7); white-space: nowrap; }
.card-page__card { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.card-page__frame { width: min(100%, 380px); }
.card-story { list-style: none; margin: 12px 0 0; padding: 0; font-size: calc(14px * var(--cb-text-scale, 1)); }
.card-story li { padding: 6px 0; border-top: 1px solid var(--border); }
.card-story span { color: rgba(var(--fg-rgb), 0.7); margin-inline-end: 8px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cards-progress li { grid-template-columns: 90px 1fr auto; gap: 8px; }
}

/* ---- Power Cards: "new card" reveal (/cards/new, hub-cards.js) and the
   banner that points to it. The card's own colours (--pc, --pc-glow) come
   from powercard.css: each step carries its card's pc2--<colour> class. */
.reveal { position: fixed; inset: 0; z-index: 300; max-width: none; width: auto; margin: 0; display: flex; flex-direction: column; align-items: center; padding: 72px 16px 48px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  color: #F0F0F0; --white: #F0F0F0; --fg-rgb: 240, 240, 240;
  background: radial-gradient(ellipse at 50% 38%, rgba(255, 45, 32, 0.18), transparent 62%), #0B0A09; }  /* always a dark stage, in light mode too */
.reveal__stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 56px; }
body.reveal-open { overflow: hidden; }  /* the page behind the full-screen reveal doesn't scroll */
.reveal__step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 440px; }
.reveal__kicker { font-family: var(--hub-font); font-weight: 700; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pc-glow); margin-bottom: 18px; }
.reveal__card { position: relative; width: min(72vw, 300px); aspect-ratio: 5 / 7; perspective: 1400px; }
.reveal__flip { all: unset; position: relative; display: block; width: 100%; height: 100%; cursor: pointer; transform-style: preserve-3d; -webkit-tap-highlight-color: transparent; }
.reveal__flip:focus-visible { outline: 2px solid var(--pc-glow); outline-offset: 6px; border-radius: 12px; }
.reveal__face { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.reveal__face--front { transform: rotateY(180deg); }
.reveal__shine { position: absolute; inset: 0; border-radius: 4.8% / 3.4%; pointer-events: none; opacity: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat; }
.reveal__rays { position: absolute; left: 50%; top: 50%; width: 280%; aspect-ratio: 1; translate: -50% -50%; scale: 0.2; opacity: 0; border-radius: 50%; pointer-events: none; z-index: -1;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--pc-glow) 60%, transparent) 0deg 8deg, transparent 8deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 60%); mask: radial-gradient(circle, #000 0 18%, transparent 60%); }
.reveal__flash { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 68%); opacity: 0; pointer-events: none; z-index: 3; }
.reveal__burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: -1; pointer-events: none; }  /* behind the card */
.reveal__bit { position: absolute; left: 0; top: 0; width: var(--size); height: calc(var(--size) * 0.45); border-radius: 2px; background: var(--c); opacity: 0;
  animation: reveal-bit 1.4s cubic-bezier(0.1, 0.75, 0.3, 1) var(--delay) forwards; }
.reveal__bit.round { height: var(--size); border-radius: 50%; }
.reveal__bit.c0 { --c: var(--pc-glow); }
.reveal__bit.c1 { --c: var(--pc); }
.reveal__bit.c2 { --c: #FFFFFF; }
.reveal__bit.c3 { --c: #FF2D20; }
.reveal__hint { margin-top: 22px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--fg-rgb), 0.6); }
.reveal__title { color: #F0F0F0; font-family: var(--hub-font); font-weight: 800; font-size: clamp(28px, 7.5vw, 40px); line-height: 1.1; letter-spacing: -0.01em; text-transform: none; margin-top: 26px; }
.reveal__sub { margin-top: 8px; color: rgba(var(--fg-rgb), 0.78); }
.reveal__meta { margin-top: 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(var(--fg-rgb), 0.5); }
.reveal__next { max-width: 320px; margin-top: 22px; }
.reveal__done { width: 100%; max-width: 320px; margin-top: 36px; }

/* Without JavaScript: every card face up, one under the other. */
.reveal:not(.js) .reveal__face--back, .reveal:not(.js) .reveal__hint, .reveal:not(.js) .reveal__next, .reveal:not(.js) .reveal__rays { display: none; }
.reveal:not(.js) .reveal__face--front { transform: none; }

/* With JavaScript: one card at a time. */
.reveal.js .reveal__step { display: none; }
.reveal.js .reveal__step.is-active { display: flex; }
.reveal.js .reveal__hint { animation: reveal-pulse 1.6s ease-in-out infinite; }
.reveal.js .is-open .reveal__hint, .reveal.js .is-opening .reveal__hint { visibility: hidden; animation: none; }
.reveal.js .reveal__about { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); pointer-events: none; }
.reveal.js .is-done .reveal__about { opacity: 1; transform: none; pointer-events: auto; }
.reveal.js .reveal__done { opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s, visibility 0s 0.6s; }
.reveal.js .reveal__done.is-ready { opacity: 1; visibility: visible; transform: none; transition-delay: 0.15s, 0.15s, 0s; }
.reveal.js .reveal__kicker { opacity: 0; }
.reveal.js .is-in .reveal__kicker { animation: reveal-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.5s forwards; }

/* Arrives face down, settles, floats; a tap shakes it, then it flips with a flash, rays and confetti. */
.reveal.js .reveal__flip { transform: translateY(-120vh) rotate(-14deg) scale(0.6); }
.reveal.js .is-in .reveal__flip { animation: reveal-drop 0.9s cubic-bezier(0.2, 1.25, 0.4, 1) forwards, reveal-float 3s ease-in-out 0.9s infinite; }
.reveal.js .is-opening .reveal__flip { animation: reveal-shake 0.65s ease-in forwards; }
.reveal.js .is-open .reveal__flip { animation: reveal-flip 0.85s cubic-bezier(0.3, 1.4, 0.5, 1) forwards, reveal-float-open 3.4s ease-in-out 0.85s infinite; }
.reveal.js .is-open .reveal__flash { animation: reveal-flash 0.7s ease-out 0.28s; }
.reveal.js .is-open .reveal__rays { animation: reveal-rays-in 0.8s ease-out 0.3s forwards, reveal-spin 22s linear infinite; }
.reveal.js .is-open .reveal__shine { animation: reveal-shine 1.1s ease-in-out 1s forwards; }

@keyframes reveal-drop { from { transform: translateY(-120vh) rotate(-14deg) scale(0.6); } to { transform: none; } }
@keyframes reveal-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes reveal-shake {
  0% { transform: none; } 15% { transform: rotate(-3deg) scale(1.02); } 30% { transform: rotate(4deg) scale(1.04); }
  45% { transform: rotate(-5deg) scale(1.06); } 60% { transform: rotate(6deg) scale(1.08); } 75% { transform: rotate(-6deg) scale(1.1); }
  90% { transform: rotate(0) scale(1.12); } 100% { transform: scale(0.96); }
}
@keyframes reveal-flip { from { transform: rotateY(0) scale(0.96); } 60% { transform: rotateY(200deg) scale(1.12); } to { transform: rotateY(180deg) scale(1); } }
@keyframes reveal-float-open { 0%, 100% { transform: rotateY(180deg) translateY(0); } 50% { transform: rotateY(180deg) translateY(-7px); } }
@keyframes reveal-flash { 0% { opacity: 0; } 18% { opacity: 0.95; } 100% { opacity: 0; } }
@keyframes reveal-rays-in { from { opacity: 0; scale: 0.2; } to { opacity: 1; scale: 1; } }
@keyframes reveal-spin { to { rotate: 360deg; } }
@keyframes reveal-shine { 0% { opacity: 1; background-position: 160% 0; } 90% { opacity: 1; } 100% { opacity: 0; background-position: -60% 0; } }
@keyframes reveal-bit {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(0.3); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); }
}
@keyframes reveal-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes reveal-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .reveal.js .reveal__flip, .reveal.js .is-in .reveal__flip, .reveal.js .is-open .reveal__flip { animation: none; transform: none; }
  .reveal.js .is-open .reveal__flip { transform: rotateY(180deg); }
  .reveal.js .is-open .reveal__rays { animation: none; opacity: 0.5; scale: 1; }
  .reveal.js .reveal__kicker, .reveal.js .is-in .reveal__kicker { animation: none; opacity: 1; }
  .reveal.js .reveal__hint { animation: none; }
  .reveal.js .reveal__about, .reveal.js .reveal__done { transition: none; }
}

/* New cards waiting: a number on "Cards" in the menu and on the home page tile, with a faint glow (Sean, 2026-10-09: no banner). */
.nav-count { display: inline-block; min-width: 1.6em; margin-inline-start: .45em; padding: .1em .45em; border-radius: 99px; background: var(--red); color: #FFF;
  font-family: var(--hub-font); font-weight: 700; font-size: .78em; line-height: 1.5; letter-spacing: 0; text-align: center; vertical-align: .1em; }
.nav-new { animation: nav-glow 2.6s ease-in-out infinite; }
.hub-card--new { border-color: rgba(255, 45, 32, .55); animation: tile-glow 2.6s ease-in-out infinite; }
.hub-card--new .nav-count { font-size: 13px; vertical-align: .4em; }
@keyframes nav-glow { 0%, 100% { text-shadow: 0 0 0 rgba(255, 45, 32, 0); } 50% { text-shadow: 0 0 10px rgba(255, 45, 32, .75); } }
@keyframes tile-glow { 0%, 100% { box-shadow: 0 0 0 rgba(255, 45, 32, 0); } 50% { box-shadow: 0 0 22px rgba(255, 45, 32, .35); } }
@media (prefers-reduced-motion: reduce) { .nav-new, .hub-card--new { animation: none; } }

/* Sound on/off on the reveal. */
.reveal__sound { position: fixed; inset-inline-end: 16px; top: 16px; z-index: 310; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px;
  background: rgba(0, 0, 0, .45); color: #F0F0F0; font: 600 12px 'Open Sans', sans-serif; cursor: pointer; }
.reveal__sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* A card's page: turn the card in 3D (drag to turn, tap to flip). Without JavaScript both sides show side by side. */
.inspect { display: flex; flex-direction: column; align-items: center; }
.inspect__card { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.inspect__face { position: relative; width: min(100%, 380px); }
.inspect__shine { display: none; }
.inspect__hint { display: none; margin-top: 18px; font-family: var(--hub-font); font-size: 13px; color: rgba(var(--fg-rgb), .6); }
.inspect.js .inspect__stage { width: min(84vw, 380px); aspect-ratio: 5 / 7; perspective: 1600px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.inspect.js .inspect__stage.is-dragging { cursor: grabbing; }
.inspect.js .inspect__card { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s cubic-bezier(.2, 1.2, .4, 1); }
.inspect.js .inspect__stage.is-dragging .inspect__card { transition: none; }
.inspect.js .inspect__face { position: absolute; inset: 0; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.inspect.js .inspect__face--back { transform: rotateY(180deg); }
.inspect.js .inspect__shine { display: block; position: absolute; inset: 0; border-radius: 4.8% / 3.43%; pointer-events: none; mix-blend-mode: soft-light; opacity: var(--shine, 0);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 20%, rgba(140, 220, 255, .55) 40%, rgba(255, 170, 230, .55) 50%, rgba(255, 240, 150, .55) 60%, rgba(255, 255, 255, 0) 80%) var(--sx, 50%) 0 / 260% 100% no-repeat; }
.inspect.js .inspect__hint { display: block; }
.inspect.js .inspect__stage img, .inspect.js .inspect__stage svg { -webkit-user-drag: none; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .inspect.js .inspect__card { transition: none; } }

/* Milestones on the My cards page. */
.cards-section-title { font-family: var(--hub-font); font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 28px; letter-spacing: 0.04em; margin: 32px 0 0; }

/* ---- Milestone reveal: the racket is strung (hub-cards.js adds is-stringing,
   is-painted, is-hitting, is-hit). Lines carry pathLength="1" and --i. */
.reveal.js .reveal__step--ms .reveal__face--front .rk-st line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.reveal.js .reveal__step--ms.is-stringing .reveal__face--front .rk-st line { animation: rk-draw .35s ease-out calc(var(--i, 0) * 18ms) forwards; }
.reveal.js .reveal__step--ms .reveal__face--front .rk-paint { opacity: 0; }
.reveal.js .reveal__step--ms.is-painted .reveal__face--front .rk-paint { animation: rk-paint .7s ease-out forwards; }
.reveal.js .reveal__step--ms .reveal__face--front .rk-spot { opacity: 0; transform-box: fill-box; transform-origin: center; }
.reveal.js .reveal__step--ms.is-hit .reveal__face--front .rk-spot { animation: rk-pop .5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.reveal__shuttle { position: absolute; left: 0; top: 0; width: 34px; height: 34px; z-index: 5; pointer-events: none; opacity: 0; }
.reveal__shuttle svg { display: block; width: 100%; height: 100%; fill: #FFF; stroke: #141210; stroke-width: 1.4; stroke-linejoin: round; }
.reveal__shuttle::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #FFF; opacity: 0; }
.reveal.js .is-hitting .reveal__shuttle { animation: rk-fly .38s cubic-bezier(.5, 0, .9, .5) forwards; }
.reveal.js .is-hit .reveal__shuttle { animation: rk-gone .4s ease-out forwards; }
.reveal.js .is-hit .reveal__shuttle::after { animation: rk-ring .5s ease-out; }
@keyframes rk-draw { to { stroke-dashoffset: 0; } }
@keyframes rk-paint { from { opacity: 0; } 40% { opacity: .5; } to { opacity: 1; } }
@keyframes rk-pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes rk-fly {
  from { opacity: 1; transform: translate(calc(var(--tx) + 150px - 17px), calc(var(--ty) - 280px - 17px)) rotate(40deg) scale(1.5); }
  to { opacity: 1; transform: translate(calc(var(--tx) - 17px), calc(var(--ty) - 17px)) rotate(40deg) scale(.7); }
}
@keyframes rk-gone {
  from { opacity: 1; transform: translate(calc(var(--tx) - 17px), calc(var(--ty) - 17px)) rotate(40deg) scale(.7); }
  to { opacity: 0; transform: translate(calc(var(--tx) - 17px), calc(var(--ty) - 17px)) rotate(40deg) scale(1.8); }
}
@keyframes rk-ring { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(2.6); } }
@media (prefers-reduced-motion: reduce) {
  .reveal.js .reveal__step--ms .reveal__face--front .rk-st line { stroke-dasharray: none; animation: none; }
  .reveal.js .reveal__step--ms .reveal__face--front .rk-paint, .reveal.js .reveal__step--ms .reveal__face--front .rk-spot { opacity: 1; animation: none; }
  .reveal__shuttle { display: none; }
}

/* ---- Tilt and shine on cards (hub-cards.js sets --rx --ry --mx --my). */
.pc-tilt { position: relative; display: block; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s ease-out; }
.pc-tilt.is-tilting { transition: transform .08s linear; }
.card-grid__item.pc-tilt:hover, .card-grid__item.pc-tilt:focus-visible { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px); }
.pc-shine { position: absolute; inset: 0; z-index: 6; border-radius: 4.8% / 3.43%; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 50%),
    linear-gradient(115deg, rgba(255, 255, 255, 0) 25%, rgba(140, 220, 255, .45) 42%, rgba(255, 170, 230, .45) 50%, rgba(255, 240, 150, .45) 58%, rgba(255, 255, 255, 0) 75%);
  background-size: 100% 100%, 220% 220%; background-position: 0 0, var(--mx, 50%) var(--my, 50%); }
.pc-tilt.is-tilting > .pc-shine { opacity: 1; }

/* ── VIEWING OPTIONS COG ── */
.nav-viewing { margin-inline-start: 16px; flex-shrink: 0; }
nav .nav-logo { flex-shrink: 0; }
@media (max-width: 600px) {
  .nav-viewing .cbv-cog { width: 40px; height: 40px; }
}

/* ── MENU BUTTON ──
   Phones/tablets (900px and below), and large text / wide spacing / OpenDyslexic on any screen,
   fold the links into a full-screen menu behind a menu button (hub-nav.js). Only when JS runs
   (html.js, set by hub-viewing.js in <head>), so the links never vanish without a way to open them. */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-inline-start: 8px;
  padding: 0 10px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span { display: block; height: 2px; width: 100%; background: var(--white); transition: transform 0.25s, opacity 0.25s; }
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-hamburger:hover { border-color: var(--border); }
.nav-hamburger { position: relative; }
.nav-hamburger.has-new::after { content: ''; position: absolute; top: 6px; inset-inline-end: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--black); }
.nav-hamburger.has-new[aria-expanded="true"]::after { display: none; }
@media (max-width: 900px) {
  html.js .nav-hamburger { display: flex; }
  html.js .nav-viewing { margin-inline-start: auto; }
  html.js .nav-links {
    display: none; position: fixed; inset: 0; z-index: 9999; margin: 0; padding: 88px 24px 32px;
    flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    background: rgba(var(--bg-rgb), 0.98); overflow-y: auto;
  }
  html.js .nav-links.open { display: flex; }
  html.js .nav-links a { font-size: calc(18px * var(--cb-text-scale, 1)); letter-spacing: 0.1em; }
  html.js .nav-hamburger { position: relative; z-index: 10000; }
}
html.js[data-cb-roomy="on"] .nav-hamburger { display: flex; position: relative; z-index: 10000; }
html.js[data-cb-roomy="on"] .nav-viewing { margin-inline-start: auto; }
html.js[data-cb-roomy="on"] .nav-links {
  display: none; position: fixed; inset: 0; z-index: 9999; margin: 0; padding: 88px 24px 32px;
  flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: rgba(var(--bg-rgb), 0.98); overflow-y: auto;
}
html.js[data-cb-roomy="on"] .nav-links.open { display: flex; }
html.js[data-cb-roomy="on"] .nav-links a { white-space: normal; text-align: center; }
html.js[data-cb-roomy="on"] .nav-logo-text { display: none; }
body.menu-open { overflow: hidden; }
/* The nav's blur makes it the containing box for fixed children, which would squash the
   full-screen menu into the header bar. Drop the blur while the menu is open. */
body.menu-open nav { backdrop-filter: none; }
/* Power Cards are artwork with a fixed layout: they keep Open Sans even when a
   player picks another font in Viewing options (the rest of the page follows it). */
html[data-cb-font] .pc2-wrap *, html[data-cb-font] .pc2-mini * { font-family: 'Open Sans', sans-serif !important; }


/* ── LANGUAGES (see HANDOVER.md, "Languages") ──
   Pages keep one font token. Scripts the brand font (Open Sans) lacks switch to a Noto font that
   layout.php loads from Google Fonts; Open Sans already covers Latin, Vietnamese and Greek.
   A viewing-options font (Atkinson, Lexend, OpenDyslexic) still wins: it is set with !important. */
html:lang(zh-Hans) { --hub-font: 'Noto Sans SC', 'Open Sans', sans-serif; }
html:lang(zh-Hant) { --hub-font: 'Noto Sans TC', 'Open Sans', sans-serif; }
html:lang(ar)      { --hub-font: 'Noto Sans Arabic', 'Open Sans', sans-serif; }
html:lang(pa)      { --hub-font: 'Noto Sans Gurmukhi', 'Open Sans', sans-serif; }
html:lang(hi), html:lang(ne) { --hub-font: 'Noto Sans Devanagari', 'Open Sans', sans-serif; }
html:lang(vi), html:lang(el) { --hub-font: 'Open Sans', sans-serif; }
/* No condensed width or wide letter-spacing in scripts that join or stack letters. */
html:lang(ar) :is(h1, h2, h3, .section-tag, .nav-links a, .form-row > label, .hub-card__title, .btn-primary, .btn-secondary, .stat__n, .class-block__name, .video-card__date, .cards-section-title, .reveal__kicker, .nav-logo-text, .nav-badge, .changes th) { letter-spacing: 0; }
html:lang(hi) :is(h1, h2, h3, .section-tag, .nav-links a, .hub-card__title, .class-block__name, .video-card__date), html:lang(ne) :is(h1, h2, h3, .section-tag, .nav-links a, .hub-card__title, .class-block__name, .video-card__date),
html:lang(pa) :is(h1, h2, h3, .section-tag, .nav-links a, .hub-card__title, .class-block__name, .video-card__date) { letter-spacing: 0; }
html:lang(zh-Hans) :is(h1, h2, h3), html:lang(zh-Hant) :is(h1, h2, h3) { line-height: 1.25; }
html:lang(ar) :is(h1, h2, h3), html:lang(hi) :is(h1, h2, h3), html:lang(ne) :is(h1, h2, h3), html:lang(pa) :is(h1, h2, h3) { line-height: 1.35; }

/* ── TRANSLATION NOTICE ──
   A slim bar under the nav on every page that is not in English. */
.i18n-notice {
  margin-top: var(--hub-nav-h, 84px);
  padding: 8px 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px;
  background: var(--dark3);
  border-bottom: 1px solid var(--border);
  font-size: calc(13px * var(--cb-text-scale, 1));
  line-height: 1.5;
  text-align: center;
}
.i18n-notice p { margin: 0; }
.i18n-notice__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.i18n-notice__link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--white); text-decoration: underline; text-underline-offset: 2px;
}
.i18n-notice__link:hover, .i18n-notice__link:focus-visible { color: var(--red); }
/* The nav is fixed and the page header leaves room for it; with the bar in the flow, take that room back. */
.i18n-notice + .page-header { padding-top: 56px; }
.i18n-notice + main { padding-top: 24px; }
@media (max-width: 600px) {
  .i18n-notice { padding: 8px 16px; }
  .i18n-notice + .page-header { padding-top: 40px; }
}

/* ── RIGHT-TO-LEFT (Arabic) ──
   Flex rows and grids flip by themselves with dir="rtl"; the rules above use logical properties
   (start/end) for the rest. These are the few things that need saying outright. */
.dir-arrow { display: inline-block; }
[dir="rtl"] .dir-arrow, [dir="rtl"] .hub-card__go { scale: -1 1; }
[dir="rtl"] .hub-card__go { transform-origin: center; }
/* Power Cards are fixed artwork: they keep their own left-to-right layout. */
[dir="rtl"] :is(.pc2-wrap, .pc2-mini, .inspect__card, .reveal__card) { direction: ltr; text-align: left; }
/* Numbers, emails and phone numbers inside Arabic text stay readable left to right. */
[dir="rtl"] :is(input[type="email"], input[type="tel"], input[type="number"], .mono) { direction: ltr; text-align: right; }
[dir="rtl"] .cropper__canvas { direction: ltr; }

/* ── VIDEO PAGE: TAGGED MOMENTS (app/views/_video_tags.php, 2026-10-12) ── */
.video-tags-card { padding: 32px 40px; }
.video-tags__how { margin: -6px 0 14px; }
.video-tags { list-style: none; display: flex; flex-direction: column; }
.video-tag { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.video-tag:first-child { border-top: 0; }
.video-tag--mine { box-shadow: inset 3px 0 0 var(--red); padding-inline-start: 12px; }
.video-tag__time { font-family: var(--hub-font); font-weight: 700; font-size: calc(14px * var(--cb-text-scale, 1)); font-variant-numeric: tabular-nums; color: var(--red); background: none; border: 0; padding: 2px 0; text-align: start; white-space: nowrap; }
button.video-tag__time { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
button.video-tag__time:hover { color: var(--white); }
.video-tag__body { min-width: 0; }
.video-tag__meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.video-tag__who { font-size: calc(11px * var(--cb-text-scale, 1)); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.video-tag__check { font-size: calc(11px * var(--cb-text-scale, 1)); font-weight: 700; padding: 1px 8px; border: 1px solid var(--border); border-radius: 2px; }
.video-tag__check.is-yes { color: var(--ok); border-color: currentColor; }
.video-tag__check.is-no { color: var(--red); border-color: currentColor; }
.video-tag__src { font-size: calc(12px * var(--cb-text-scale, 1)); color: rgba(var(--fg-rgb), 0.6); }
.video-tag__note { margin-top: 4px; font-size: calc(14px * var(--cb-text-scale, 1)); line-height: 1.55; color: rgba(var(--fg-rgb), 0.85); overflow-wrap: anywhere; }
.video-tag__del { background: none; border: 1px solid var(--border); border-radius: 2px; color: rgba(var(--fg-rgb), 0.7); font-family: var(--hub-font); font-size: calc(12px * var(--cb-text-scale, 1)); font-weight: 700; padding: 4px 10px; cursor: pointer; }
.video-tag__del:hover { color: var(--white); border-color: var(--red); }
@media (max-width: 600px) {
  .video-tags-card { padding: 24px 18px; }
  .video-tag { grid-template-columns: minmax(0, 1fr) auto; }
  .video-tag__body { grid-column: 1 / -1; }
}
