/* === FONTS: Inter (body) + Montserrat (headings) === */
/* Loaded via <link rel="preload"> in custom-header.html for better performance */

/* === TEXT WIDTH: limit to ~70 characters for readability === */
#R-body-inner > .flex-block-wrapper {
  max-width: 52rem;
}

/* === BODY: larger font, comfortable reading === */
body #R-body-inner {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* === HEADINGS: no uppercase, left-aligned === */
h1 {
  text-transform: none !important;
  text-align: left !important;
  font-size: 2.25rem !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 1rem !important;
}

h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
}

/* === PARAGRAPHS: comfortable spacing === */
#R-body-inner p {
  margin: 1.15rem 0;
}

/* === BLOCKQUOTE: sport-style accent === */
#R-body-inner blockquote {
  border-left: 3px solid rgba( 0, 184, 148, 0.5 ); /* teal accent */
  background: rgba( 0, 184, 148, 0.06 );
  padding: 0.75rem 1.25rem;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

/* === LINKS: subtle underline === */
#R-body-inner a:not(.btn) {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* === LISTS: comfortable spacing === */
#R-body-inner li {
  margin: 0.35rem 0;
}

/* === TABLES: clean styling === */
#R-body-inner table th {
  font-family: var(--MAIN-TITLES-font);
  font-weight: 600;
}

/* === SIDEBAR: slightly larger font === */
#R-sidebar {
  font-size: 0.95rem;
}

/* === SIDEBAR: FolkUp logo below search === */
.sidebar-logo {
  text-align: center;
  padding: 0.75rem 1rem 0.25rem;
}
.sidebar-logo img {
  max-height: 48px;
  width: auto;
}

/* === SIDEBAR: Ko-fi donate button === */
.sidebar-kofi {
  text-align: center;
  padding: 0.25rem 1rem 1.25rem;
}
.sidebar-kofi__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: #FF5E5B;
  color: #fff !important;
  padding: 0 1rem;
  border-radius: 5px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.82rem;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.sidebar-kofi__link:hover {
  opacity: 0.85;
}

/* ================================================================
   TOPBAR: Home button
   ================================================================ */
.topbar-button-home {
  display: inline-flex;
  align-items: center;
}
.topbar-button-home a {
  color: var(--INTERNAL-MAIN-TEXT-color, inherit);
}

/* ================================================================
   TOPBAR: Language switcher
   ================================================================ */
.topbar-lang {
  display: inline-flex;
  align-items: center;
}

.topbar-lang__link {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--INTERNAL-MAIN-ANCHOR-color, #0077B6);
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s;
}

.topbar-lang__link:hover {
  background: rgba(0, 119, 182, 0.08);
  border-color: rgba(0, 119, 182, 0.4);
}

/* ================================================================
   HERO SECTION: padel court background + icon + title
   Uses --padel-body-padding to stay in sync with Relearn theme padding.
   If theme updates padding values, update the variable below.
   ================================================================ */
:root {
  --padel-body-padding: 3.25rem; /* matches #R-body-inner padding from Relearn */
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  margin-left: calc(-1 * var(--padel-body-padding));
  margin-right: calc(-1 * var(--padel-body-padding));
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-radius: 0 0 8px 8px;
}

.hero__image-wrapper {
  position: absolute;
  inset: 0;
}

.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark gradient overlay from bottom for text readability */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 100%
  );
}

/* Content positioned over the image */
.hero__content {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  right: 2.5rem;
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  z-index: 2;
}

.hero__icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 12px;
}

.hero__title {
  color: #fff !important;
  font-size: 2.5rem !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  margin: 0 !important;
  line-height: 1.2 !important;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin: 0.5rem 0 0 0;
  max-width: 40rem;
}

/* Photo attribution */
.hero__attribution {
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
}
.hero__attribution a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

/* ================================================================
   SKILL LEVEL BADGES
   ================================================================ */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--MAIN-TITLES-font);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.skill-badge--beginner {
  background: rgba(0, 137, 110, 0.12);
  color: #00896e;
  border: 1px solid rgba(0, 137, 110, 0.25);
}

.skill-badge--intermediate {
  background: rgba(0, 95, 148, 0.10);
  color: #005f94;
  border: 1px solid rgba(0, 95, 148, 0.25);
}

.skill-badge--advanced {
  background: rgba(160, 60, 46, 0.10);
  color: #a03c2e;
  border: 1px solid rgba(160, 60, 46, 0.25);
}

.skill-badge--all {
  background: rgba(45, 52, 54, 0.08);
  color: #2D3436;
  border: 1px solid rgba(45, 52, 54, 0.2);
}

/* Auto-injected skill-badge from frontmatter — before content */
.content-skill-badge {
  margin-bottom: 0.75rem;
}

/* ================================================================
   RELATED ARTICLES: compact block above footer
   ================================================================ */
.related-articles {
  margin: 2rem 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 6px;
  background: rgba(128, 128, 128, 0.04);
}

.related-articles h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.related-articles ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.related-articles li {
  margin: 0;
}

.related-articles li::before {
  content: "\2192 ";
  opacity: 0.5;
}

.related-articles a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ================================================================
   SECTION CARDS: grid of section cards on homepage
   ================================================================ */
.section-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.section-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  transition: box-shadow 0.2s, transform 0.15s;
  background: rgba(128, 128, 128, 0.03);
}

.section-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.section-card__image {
  height: 140px;
  overflow: hidden;
}

.section-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-card__body {
  padding: 0.75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-card__title {
  font-family: var(--MAIN-TITLES-font);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.section-card__desc {
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.4;
  flex: 1;
}

.section-card__count {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 0.5rem;
}

/* ================================================================
   MOBILE: tablet (max-width: 59.999rem ≈ 960px)
   ================================================================ */
@media screen and (max-width: 59.999rem) {
  :root {
    --padel-body-padding: 2rem;
  }

  .hero {
    margin-left: calc(-1 * var(--padel-body-padding));
    margin-right: calc(-1 * var(--padel-body-padding));
  }

  .hero__content {
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
  }

  .section-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   MOBILE: phones (max-width: 47.999rem ≈ 768px)
   ================================================================ */
@media screen and (max-width: 47.999rem) {
  :root {
    --padel-body-padding: 1.25rem;
  }

  /* Hero adjustments */
  .hero {
    min-height: 260px;
    margin-left: calc(-1 * var(--padel-body-padding));
    margin-right: calc(-1 * var(--padel-body-padding));
    margin-top: 0;
    border-radius: 0;
  }

  /* Stack icon above title on mobile */
  .hero__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    gap: 0.5rem;
  }

  .hero__icon {
    width: 52px;
    height: 52px;
  }

  .hero__title {
    font-size: 1.75rem !important;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .hero__attribution {
    font-size: 0.55rem;
    right: 0.5rem;
  }

  /* Three-block layout: topbar (fixed top) | content (scroll) | footer */
  #R-topbar {
    flex-shrink: 0;
  }
  #R-topbar > .topbar-wrapper {
    flex-wrap: wrap;
    height: auto;
    min-height: 3rem;
  }
  #R-body-inner {
    padding-top: 0.5rem;
  }

  .topbar-breadcrumbs {
    order: 10;
    flex-basis: 100% !important;
    width: 100% !important;
    min-width: 0;
    padding: 0.25rem 0.75rem 0.4rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    border-top: 1px solid var(--INTERNAL-TOPBAR-SEPARATOR-color, rgba(128,128,128,0.2));
    white-space: normal !important;
    overflow: visible !important;
  }

  /* Show only direct parent (section) + current page; hide grandparents */
  .topbar-breadcrumbs li:has(> a) {
    display: none !important;
  }
  .topbar-breadcrumbs li:has(> a):nth-last-child(2) {
    display: inline !important;
  }
  .topbar-breadcrumbs li.a11y-only {
    clip-path: none !important;
    overflow: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    white-space: normal !important;
  }

  /* Typography: reduce font sizes */
  body #R-body-inner {
    font-size: 1rem;
    line-height: 1.6;
  }

  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  /* Remove max-width constraint on mobile */
  #R-body-inner > .flex-block-wrapper {
    max-width: none;
  }

  /* TOC flyout: constrain to viewport, allow text wrap */
  .topbar-area-start .topbar-content {
    max-width: calc(100vw - 3rem);
  }
  #TableOfContents li,
  .TableOfContents li {
    white-space: normal;
  }
  .topbar-content-wrapper {
    overflow-y: auto;
  }

  .section-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-card__image {
    height: 120px;
  }
}

/* ================================================================
   MOBILE: small phones (max-width: 24.999rem ≈ 400px)
   ================================================================ */
@media screen and (max-width: 24.999rem) {
  body #R-body-inner {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.5rem !important;
  }

  .hero__title {
    font-size: 1.5rem !important;
  }

  .hero__icon {
    width: 44px;
    height: 44px;
  }
}

/* ================================================================
   PRINT: full print stylesheet
   ================================================================ */
@media print {
  /* Hide non-essential UI */
  #R-sidebar,
  #R-topbar,
  .topbar-breadcrumbs,
  .sidebar-logo,
  .sidebar-kofi,
  .court-zones,
  .video-embed,
  .R-taxonomy.tags,
  .skill-badge,
  .notfound-lang,
  #R-footer {
    display: none !important;
  }

  /* Full width content */
  #R-body {
    margin-left: 0 !important;
  }

  #R-body-inner {
    padding: 0 !important;
    overflow: visible !important;
  }

  #R-body-inner > .flex-block-wrapper {
    max-width: none;
  }

  /* Hero: simplify */
  .hero {
    max-height: none;
    margin: 0;
    border-radius: 0;
    page-break-inside: avoid;
  }

  .hero__overlay {
    display: none;
  }

  .hero__image {
    max-height: 200px;
  }

  .hero__content {
    position: static;
    color: #000;
    padding: 1rem 0;
  }

  .hero__title {
    color: #000 !important;
    text-shadow: none;
    font-size: 2rem !important;
  }

  .hero__subtitle {
    color: #333;
    text-shadow: none;
  }

  .hero__attribution {
    position: static;
    color: #666;
    text-align: right;
    font-size: 0.6rem;
  }

  .hero__attribution a {
    color: #666;
  }

  /* Expand all <details> elements */
  details {
    display: block !important;
  }

  details > summary {
    display: none !important;
  }

  details > *:not(summary) {
    display: block !important;
  }

  /* Typography: black on white */
  body,
  #R-body-inner,
  #R-body-inner p,
  #R-body-inner li,
  #R-body-inner td {
    color: #000 !important;
    background: #fff !important;
  }

  #R-body-inner a {
    color: #000 !important;
    text-decoration: underline;
  }

  /* Show URLs after links */
  #R-body-inner a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #666;
    word-break: break-all;
  }

  /* Blockquote: simple border */
  #R-body-inner blockquote {
    border-left: 2px solid #999;
    background: none !important;
    color: #333 !important;
    padding: 0.5rem 1rem;
  }

  /* Tables: visible borders */
  #R-body-inner table {
    border-collapse: collapse;
  }

  #R-body-inner table th,
  #R-body-inner table td {
    border: 1px solid #ccc;
    padding: 0.3rem 0.5rem;
  }

  /* Page breaks */
  h2, h3 {
    page-break-after: avoid;
  }

  img, table, figure, blockquote {
    page-break-inside: avoid;
  }

  /* Section cards: list layout for print */
  .section-cards {
    display: block;
  }

  .section-card {
    display: block;
    border: none;
    page-break-inside: avoid;
    margin-bottom: 0.5rem;
  }

  .section-card__image {
    display: none;
  }
}

/* === TAGS: outline chips === */
article .R-taxonomy.tags {
  margin-left: 0;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

article .R-taxonomy.tags a.term-link {
  background: rgba(0, 119, 182, 0.06);
  border: 1px solid rgba(0, 119, 182, 0.3);
  color: var(--PRIMARY-color);
  border-radius: 14px;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: none;
  margin: 0 6px 6px 0;
  transition: background 0.15s, border-color 0.15s;
}

article .R-taxonomy.tags a.term-link:hover {
  background: rgba(0, 119, 182, 0.12);
  border-color: rgba(0, 119, 182, 0.5);
}

/* Remove ribbon triangle and dot from theme */
article .R-taxonomy.tags a.term-link:before,
article .R-taxonomy.tags a.term-link:after {
  display: none;
}

/* ================================================================
   VERIFICATION MARKERS: semantic inline badges
   ================================================================ */
#R-body-inner [data-marker="unverified"],
#R-body-inner .marker-unverified {
  display: inline-block;
  background: rgba(194, 74, 58, 0.12);
  color: #a03c2e;
  border: 1px solid rgba(194, 74, 58, 0.25);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

#R-body-inner [data-marker="expert-opinion"],
#R-body-inner .marker-expert-opinion {
  display: inline-block;
  background: rgba(0, 95, 148, 0.10);
  color: #005f94;
  border: 1px solid rgba(0, 95, 148, 0.25);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

#R-body-inner [data-marker="disputed"],
#R-body-inner .marker-disputed {
  display: inline-block;
  background: rgba(253, 203, 110, 0.2);
  color: #b8860b;
  border: 1px solid rgba(253, 203, 110, 0.4);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

#R-body-inner [data-marker="outdated"],
#R-body-inner .marker-outdated {
  display: inline-block;
  background: rgba(128, 128, 128, 0.12);
  color: #666;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
  #R-body-inner [data-marker="unverified"],
  #R-body-inner .marker-unverified {
    background: rgba(224, 123, 106, 0.15);
    color: #e07b6a;
    border-color: rgba(224, 123, 106, 0.3);
  }

  #R-body-inner [data-marker="expert-opinion"],
  #R-body-inner .marker-expert-opinion {
    background: rgba(77, 184, 232, 0.15);
    color: #4db8e8;
    border-color: rgba(77, 184, 232, 0.3);
  }

  #R-body-inner [data-marker="disputed"],
  #R-body-inner .marker-disputed {
    background: rgba(253, 203, 110, 0.15);
    color: #fdcb6e;
    border-color: rgba(253, 203, 110, 0.3);
  }

  #R-body-inner [data-marker="outdated"],
  #R-body-inner .marker-outdated {
    background: rgba(200, 200, 200, 0.12);
    color: #aaa;
    border-color: rgba(200, 200, 200, 0.25);
  }
}

/* ================================================================
   COURT ZONES: interactive SVG diagram
   ================================================================ */
.court-zones {
  margin: 1.5rem 0;
  text-align: center;
}

.court-zones__title {
  font-family: var(--MAIN-TITLES-font);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.court-zones__hint {
  font-size: 0.82rem;
  opacity: 0.6;
  margin: 0 0 0.75rem;
}

.court-zones__wrapper {
  position: relative;
  display: inline-block;
  max-width: 320px;
  width: 100%;
}

.court-zones__svg {
  width: 100%;
  height: auto;
  display: block;
}

.court-zones__court {
  fill: #1a6b3c;
  stroke: #fff;
  stroke-width: 2;
}

.court-zones__label-faded {
  fill: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-family: var(--MAIN-TITLES-font, sans-serif);
  pointer-events: none;
}

.court-zones__label-side {
  fill: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-weight: 600;
  pointer-events: none;
}

/* Zone rectangles */
.court-zone {
  fill: rgba(255, 255, 255, 0.05);
  stroke: transparent;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}

.court-zone:hover,
.court-zone.is-active {
  fill: rgba(255, 255, 255, 0.2);
  stroke: rgba(255, 255, 255, 0.6);
}

/* Zone-specific hover colors */
.court-zone[data-zone="red"]:hover,
.court-zone[data-zone="red"].is-active {
  fill: rgba(0, 137, 110, 0.3);
}

.court-zone[data-zone="t"]:hover,
.court-zone[data-zone="t"].is-active {
  fill: rgba(0, 95, 148, 0.4);
}

.court-zone[data-zone="nml"]:hover,
.court-zone[data-zone="nml"].is-active {
  fill: rgba(253, 203, 110, 0.4);
}

.court-zone[data-zone="fondo"]:hover,
.court-zone[data-zone="fondo"].is-active {
  fill: rgba(160, 60, 46, 0.3);
}

.court-zone[data-zone="backwall"]:hover,
.court-zone[data-zone="backwall"].is-active {
  fill: rgba(176, 212, 232, 0.4);
}

.court-zone[data-zone="sidewall"]:hover,
.court-zone[data-zone="sidewall"].is-active {
  fill: rgba(176, 212, 232, 0.4);
}

/* Opponent side zones: more transparent */
.court-zone--opponent {
  opacity: 0.5;
}

.court-zone--opponent:hover,
.court-zone--opponent.is-active {
  opacity: 0.8;
}

/* Keyboard focus for zones */
.court-zone:focus {
  outline: 2px solid #fff;
  outline-offset: 1px;
  fill: rgba(255, 255, 255, 0.15);
}

/* Tooltip */
.court-zones-tooltip {
  position: absolute;
  z-index: 10;
  background: var(--INTERNAL-MAIN-BG-color, #fff);
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  max-width: 260px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.court-zones-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.court-zones-tooltip__name {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.court-zones-tooltip__desc {
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.3rem;
  opacity: 0.8;
}

.court-zones-tooltip__link {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--INTERNAL-MAIN-ANCHOR-color, #0077B6);
}

.court-zones-tooltip__link:hover {
  text-decoration: underline;
}

/* Court zones: color legend */
.court-zones__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
}

.court-zones__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.court-zones__legend-item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.court-zones__legend-item[data-zone="red"]::before {
  background: rgba(0, 137, 110, 0.5);
}

.court-zones__legend-item[data-zone="nml"]::before {
  background: rgba(253, 203, 110, 0.6);
}

.court-zones__legend-item[data-zone="fondo"]::before {
  background: rgba(160, 60, 46, 0.5);
}

.court-zones__legend-item[data-zone="backwall"]::before {
  background: rgba(176, 212, 232, 0.6);
}

.court-zones__legend-item[data-zone="sidewall"]::before {
  background: rgba(176, 212, 232, 0.6);
}

/* ================================================================
   VIDEO EMBED: YouTube responsive wrapper
   ================================================================ */
.video-embed {
  margin: 1.5rem 0;
}

.video-embed__container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  background: #000;
}

/* Facade: thumbnail + play button */
.video-embed__facade {
  cursor: pointer;
}

.video-embed__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-embed__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  z-index: 1;
  transition: opacity 0.2s;
}

.video-embed__facade:hover .video-embed__play-bg {
  fill: #f00;
  fill-opacity: 1;
}

.video-embed__container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed__caption {
  font-size: 0.82rem;
  opacity: 0.65;
  margin-top: 0.4rem;
  text-align: center;
}

/* ================================================================
   MOBILE: court-zones responsive
   ================================================================ */
@media screen and (max-width: 47.999rem) {
  .court-zones__wrapper {
    max-width: 280px;
  }

  .court-zones-tooltip {
    max-width: 220px;
    font-size: 0.85rem;
  }
}

/* ================================================================
   DARK MODE: overrides for Relearn auto theme
   ================================================================ */
@media (prefers-color-scheme: dark) {
  /* Blockquote: soften teal for dark backgrounds */
  #R-body-inner blockquote {
    border-left-color: rgba(0, 184, 148, 0.4);
    background: rgba(0, 184, 148, 0.08);
  }

  /* Skill badges: lighten text for dark backgrounds */
  .skill-badge--beginner {
    background: rgba(0, 184, 148, 0.15);
    color: #2ecc9b;
    border-color: rgba(46, 204, 155, 0.3);
  }

  .skill-badge--intermediate {
    background: rgba(0, 119, 182, 0.15);
    color: #4db8e8;
    border-color: rgba(77, 184, 232, 0.3);
  }

  .skill-badge--advanced {
    background: rgba(194, 74, 58, 0.15);
    color: #e07b6a;
    border-color: rgba(224, 123, 106, 0.3);
  }

  .skill-badge--all {
    background: rgba(200, 200, 200, 0.1);
    color: #dfe6e9;
    border-color: rgba(200, 200, 200, 0.2);
  }

  /* Section card count: ensure readable on dark bg */
  .section-card__count {
    opacity: 0.7;
  }
}

/* ================================================================
   404 PAGE: branded full-screen layout
   ================================================================ */
.notfound-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  background: #f8f9fa;
  color: #2d3436;
}

@media (prefers-color-scheme: dark) {
  .notfound-page {
    background: #1a1a2e;
    color: #e0e0e0;
  }
}

.notfound {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 520px;
}

.notfound__logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.notfound__logo img {
  height: 48px;
  width: auto;
}

.notfound__code {
  font-family: 'Montserrat', sans-serif;
  font-size: 7rem;
  font-weight: 700;
  color: #0077B6;
  line-height: 1;
  margin: 0 0 0.25rem;
}

.notfound__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.notfound__message {
  font-size: 1rem;
  opacity: 0.7;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* Language switcher */
.notfound-lang {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 10;
}

.notfound-lang__link {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 119, 182, 0.3);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0077B6;
  text-decoration: none !important;
  transition: background 0.15s;
}

.notfound-lang__link:hover {
  background: rgba(0, 119, 182, 0.08);
}

/* Search form */
.notfound__search {
  display: flex;
  max-width: 360px;
  margin: 0 auto 1.5rem;
  gap: 0;
}

.notfound__search-input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #2d3436;
  outline: none;
}

.notfound__search-input:focus {
  border-color: #0077B6;
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.15);
}

.notfound__search-btn {
  padding: 0.55rem 1rem;
  background: #0077B6;
  color: #fff;
  border: 1px solid #0077B6;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.notfound__search-btn:hover {
  background: #005f8f;
}

.notfound__btn {
  display: inline-block;
  background: #0077B6;
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.65rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}

.notfound__btn:hover {
  background: #005f8f;
}

.notfound__explore {
  margin-top: 2.5rem;
}

.notfound__explore-label {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0 0 0.75rem;
}

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.notfound__links a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(0, 119, 182, 0.3);
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0077B6;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s;
}

.notfound__links a:hover {
  background: rgba(0, 119, 182, 0.08);
  border-color: rgba(0, 119, 182, 0.5);
}

@media (prefers-color-scheme: dark) {
  .notfound-lang__link {
    color: #4db8e8;
    border-color: rgba(77, 184, 232, 0.3);
  }

  .notfound-lang__link:hover {
    background: rgba(77, 184, 232, 0.1);
  }

  .notfound__search-input {
    background: #2a2a3e;
    color: #e0e0e0;
    border-color: rgba(128, 128, 128, 0.3);
  }

  .notfound__search-input:focus {
    border-color: #4db8e8;
    box-shadow: 0 0 0 2px rgba(77, 184, 232, 0.15);
  }

  .notfound__search-btn {
    background: #4db8e8;
    color: #1a1a2e;
    border-color: #4db8e8;
  }

  .notfound__search-btn:hover {
    background: #3aa0d0;
  }

  .notfound__code {
    color: #4db8e8;
  }

  .notfound__btn {
    background: #4db8e8;
    color: #1a1a2e !important;
  }

  .notfound__btn:hover {
    background: #3aa0d0;
  }

  .notfound__links a {
    color: #4db8e8;
    border-color: rgba(77, 184, 232, 0.3);
  }

  .notfound__links a:hover {
    background: rgba(77, 184, 232, 0.1);
    border-color: rgba(77, 184, 232, 0.5);
  }
}

@media screen and (max-width: 47.999rem) {
  .notfound__code {
    font-size: 5rem;
  }

  .notfound__title {
    font-size: 1.25rem;
  }
}

/* ================================================================
   START HERE: guided onboarding block on homepage
   ================================================================ */
.start-here {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  border: 2px solid #0077B6;
  border-radius: 8px;
  background: rgba(0, 119, 182, 0.04);
}

.start-here__title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #0077B6;
}

.start-here__steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.start-here__step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 119, 182, 0.3);
  border-radius: 6px;
  text-decoration: none !important;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436) !important;
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.start-here__step:hover {
  background: rgba(0, 119, 182, 0.08);
  border-color: #0077B6;
  transform: translateY(-1px);
}

.start-here__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0077B6;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.start-here__label {
  font-weight: 500;
  font-size: 0.92rem;
}

.start-here__arrow {
  color: #0077B6;
  font-size: 1.2rem;
  opacity: 0.5;
}

@media screen and (max-width: 47.999rem) {
  .start-here__steps {
    flex-direction: column;
    align-items: stretch;
  }

  .start-here__arrow {
    display: none;
  }

  .start-here__step {
    justify-content: flex-start;
  }
}

@media (prefers-color-scheme: dark) {
  .start-here {
    background: rgba(0, 119, 182, 0.08);
    border-color: #4db8e8;
  }

  .start-here__title {
    color: #4db8e8;
  }

  .start-here__step {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(77, 184, 232, 0.3);
  }

  .start-here__step:hover {
    background: rgba(77, 184, 232, 0.12);
    border-color: #4db8e8;
  }

  .start-here__number {
    background: #4db8e8;
    color: #1a1a2e;
  }

  .start-here__arrow {
    color: #4db8e8;
  }
}

@media print {
  .start-here {
    border: 1px solid #999;
    background: none;
  }

  .start-here__number {
    background: #333;
  }
}

/* ================================================================
   READ BADGE: reading progress indicator
   ================================================================ */
.read-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 184, 148, 0.12);
  color: #00896e;
  border: 1px solid rgba(0, 137, 110, 0.25);
}

.reading-tracker {
  margin-bottom: 0.5rem;
}

.skill-filter__item-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .read-badge {
    background: rgba(0, 184, 148, 0.15);
    color: #2ecc9b;
    border-color: rgba(46, 204, 155, 0.3);
  }
}

@media print {
  .read-badge,
  .reading-tracker {
    display: none;
  }
}

/* ================================================================
   SKILL FILTER: filterable article list on section pages
   ================================================================ */
.skill-filter__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.skill-filter__btn {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 20px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
  font-family: inherit;
}

.skill-filter__btn:hover {
  border-color: #0077B6;
  color: #0077B6;
}

.skill-filter__btn.is-active {
  background: #0077B6;
  border-color: #0077B6;
  color: #fff;
}

.skill-filter__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-filter__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 6px;
  text-decoration: none !important;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436) !important;
  transition: background 0.15s, border-color 0.15s;
}

.skill-filter__item:hover {
  background: rgba(0, 119, 182, 0.05);
  border-color: rgba(0, 119, 182, 0.3);
}

.skill-filter__item-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.skill-filter__item .skill-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
}

@media screen and (max-width: 47.999rem) {
  .skill-filter__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (prefers-color-scheme: dark) {
  .skill-filter__btn {
    border-color: rgba(128, 128, 128, 0.4);
  }

  .skill-filter__btn:hover {
    border-color: #4db8e8;
    color: #4db8e8;
  }

  .skill-filter__btn.is-active {
    background: #4db8e8;
    border-color: #4db8e8;
    color: #1a1a2e;
  }

  .skill-filter__item {
    border-color: rgba(128, 128, 128, 0.2);
  }

  .skill-filter__item:hover {
    background: rgba(77, 184, 232, 0.08);
    border-color: rgba(77, 184, 232, 0.3);
  }
}

@media print {
  .skill-filter__buttons {
    display: none;
  }

  .skill-filter__item {
    border: none;
    padding: 0.2rem 0;
  }
}

/* ================================================================
   LEARNING PATHS: guided study routes
   ================================================================ */
.learning-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1rem 0 2rem;
}

.learning-path {
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(128, 128, 128, 0.03);
}

.learning-path__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: #fff;
}

.learning-path__header--beginner { background: #00896e; }
.learning-path__header--intermediate { background: #005f94; }
.learning-path__header--advanced { background: #a03c2e; }

.learning-path__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.learning-path__title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: #fff !important;
}

.learning-path__desc {
  font-size: 0.8rem;
  margin: 0.15rem 0 0;
  opacity: 0.85;
}

.learning-path__steps {
  padding: 0.75rem 1.25rem 1rem;
  margin: 0;
  padding-left: 2.25rem;
  list-style-type: decimal;
}

.learning-path__steps li {
  margin: 0.4rem 0;
  font-size: 0.92rem;
}

.learning-path__steps li::marker {
  font-weight: 600;
  color: var(--INTERNAL-MAIN-ANCHOR-color, #0077B6);
}

.learning-path__steps a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

@media screen and (max-width: 59.999rem) {
  .learning-paths {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  .learning-path {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.25);
  }

  .learning-path__header--beginner { background: #00705a; }
  .learning-path__header--intermediate { background: #004d78; }
  .learning-path__header--advanced { background: #8a3426; }
}

@media print {
  .learning-paths {
    display: block;
  }

  .learning-path {
    border: 1px solid #ccc;
    margin-bottom: 0.75rem;
    page-break-inside: avoid;
  }

  .learning-path__header {
    color: #000;
    background: #eee !important;
  }

  .learning-path__title {
    color: #000 !important;
  }
}

/* === SUPPORT CTA: Ko-fi block after articles === */
.support-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 2px solid #FF5E5B;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 94, 91, 0.04);
}

.support-cta__title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--MAIN-TEXT-color);
}

.support-cta__text {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--MAIN-TEXT-color);
  opacity: 0.85;
}

.support-cta__button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: #FF5E5B;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.support-cta__button:hover {
  background: #e54542;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .support-cta {
    background: rgba(255, 94, 91, 0.08);
    border-color: #e54542;
  }
}

@media print {
  .support-cta {
    display: none;
  }
}

/* === LICENSE NOTICE === */
.license-notice {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--MAIN-TEXT-color, #333);
  opacity: 0.65;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  text-align: center;
}

.license-notice a {
  font-weight: 600;
}

@media print {
  .license-notice {
    opacity: 1;
  }
}

/* ================================================================
   FLIP CARDS: glossary flashcards
   ================================================================ */
.flip-cards {
  margin: 1.5rem 0;
}

.flip-cards__hint {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.flip-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.flip-cards__card {
  perspective: 600px;
  cursor: pointer;
  min-height: 120px;
}

.flip-cards__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 120px;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.flip-cards__card.is-flipped .flip-cards__inner {
  transform: rotateY(180deg);
}

.flip-cards__front,
.flip-cards__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
}

.flip-cards__front {
  background: rgba(0, 119, 182, 0.06);
}

.flip-cards__back {
  background: rgba(0, 184, 148, 0.06);
  transform: rotateY(180deg);
}

.flip-cards__term {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.flip-cards__spanish {
  font-size: 0.78rem;
  opacity: 0.6;
  margin-top: 0.2rem;
  font-style: italic;
}

.flip-cards__def {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
}

.flip-cards__card:focus {
  outline: 2px solid #0077B6;
  outline-offset: 2px;
  border-radius: 8px;
}

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

@media screen and (max-width: 47.999rem) {
  .flip-cards__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 24.999rem) {
  .flip-cards__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  .flip-cards__front {
    background: rgba(77, 184, 232, 0.08);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .flip-cards__back {
    background: rgba(46, 204, 155, 0.08);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .flip-cards__card:focus {
    outline-color: #4db8e8;
  }
}

@media print {
  .flip-cards__grid {
    display: block;
  }
  .flip-cards__card {
    perspective: none;
    min-height: auto;
    page-break-inside: avoid;
    margin-bottom: 0.5rem;
  }
  .flip-cards__inner {
    transform: none !important;
    position: static;
    min-height: auto;
  }
  .flip-cards__front,
  .flip-cards__back {
    position: static;
    backface-visibility: visible;
    transform: none;
    border: 1px solid #ccc;
    padding: 0.5rem;
  }
  .flip-cards__hint {
    display: none;
  }
}

/* ================================================================
   SHOT TRAJECTORY: animated SVG path drawing
   ================================================================ */
.shot-traj {
  margin: 1.5rem 0;
  text-align: center;
}

.shot-traj__label {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.shot-traj__court-wrap {
  display: inline-block;
  max-width: 200px;
  width: 100%;
}

.shot-traj__svg {
  width: 100%;
  height: auto;
  display: block;
}

.shot-traj__path {
  stroke: #FFD700;
  stroke-width: 3;
  fill: none;
}

.shot-traj__play {
  margin-top: 0.75rem;
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  background: transparent;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
  transition: background 0.15s, border-color 0.15s;
}

.shot-traj__play:hover {
  background: rgba(0, 119, 182, 0.08);
  border-color: #0077B6;
}

@keyframes traj-pulse {
  0% { r: 3; opacity: 0.5; }
  50% { r: 8; opacity: 1; }
  100% { r: 5; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .shot-traj__bounce {
    animation: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  .shot-traj__play:hover {
    background: rgba(77, 184, 232, 0.1);
    border-color: #4db8e8;
  }
}

@media print {
  .shot-traj {
    display: none;
  }
}

/* ================================================================
   RACKET PICKER: wizard to find the right racket
   ================================================================ */
.racket-picker {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.03);
}

.racket-picker__title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.racket-picker__q {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.racket-picker__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.racket-picker__opt {
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.15s, border-color 0.15s;
  background: transparent;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
}

.racket-picker__opt:hover {
  border-color: #0077B6;
  background: rgba(0, 119, 182, 0.05);
}

.racket-picker__opt.is-active {
  background: #0077B6;
  color: #fff;
  border-color: #0077B6;
}

.racket-picker__result-title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.racket-picker__cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.racket-picker__card {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.racket-picker__card strong {
  font-size: 1rem;
}

.racket-picker__card-meta,
.racket-picker__card-stats {
  font-size: 0.85rem;
  opacity: 0.75;
}

.racket-picker__restart,
.racket-picker__nojs {
  font-style: italic;
}

.racket-picker__restart {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 48px;
}

.racket-picker__restart:hover {
  background: rgba(128, 128, 128, 0.08);
}

@media screen and (max-width: 47.999rem) {
  .racket-picker__options {
    flex-direction: column;
  }
  .racket-picker__opt {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .racket-picker {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .racket-picker__opt:hover {
    border-color: #4db8e8;
    background: rgba(77, 184, 232, 0.08);
  }
  .racket-picker__opt.is-active {
    background: #4db8e8;
    color: #1a1a2e;
    border-color: #4db8e8;
  }
  .racket-picker__card {
    border-color: rgba(128, 128, 128, 0.3);
  }
}

@media print {
  .racket-picker {
    display: none;
  }
}

/* ================================================================
   RACKET TABLE: filterable and sortable comparison
   ================================================================ */
.racket-table {
  margin: 1.5rem 0;
}

.racket-table__filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.racket-table__filter-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.racket-table__filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 20px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
  min-height: 48px;
}

.racket-table__filter-btn:hover {
  border-color: #0077B6;
  color: #0077B6;
}

.racket-table__filter-btn.is-active {
  background: #0077B6;
  border-color: #0077B6;
  color: #fff;
}

.racket-table__wrapper {
  overflow-x: auto;
}

.racket-table__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.racket-table__table th {
  font-weight: 600;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid rgba(128, 128, 128, 0.3);
  white-space: nowrap;
  user-select: none;
}

.racket-table__table th:hover {
  color: #0077B6;
}

.racket-table__table th::after {
  content: ' ↕';
  font-size: 0.7rem;
  opacity: 0.4;
}

.racket-table__table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.racket-table__table tbody tr:hover {
  background: rgba(0, 119, 182, 0.04);
}

@media screen and (max-width: 47.999rem) {
  .racket-table__table {
    font-size: 0.82rem;
  }
  .racket-table__table th,
  .racket-table__table td {
    padding: 0.35rem 0.4rem;
  }
}

@media (prefers-color-scheme: dark) {
  .racket-table__filter-btn:hover {
    border-color: #4db8e8;
    color: #4db8e8;
  }
  .racket-table__filter-btn.is-active {
    background: #4db8e8;
    border-color: #4db8e8;
    color: #1a1a2e;
  }
  .racket-table__table th:hover {
    color: #4db8e8;
  }
  .racket-table__table tbody tr:hover {
    background: rgba(77, 184, 232, 0.06);
  }
}

@media print {
  .racket-table__filters {
    display: none;
  }
  .racket-table__table th::after {
    display: none;
  }
}

/* ================================================================
   LEVEL QUIZ: determine your padel level
   ================================================================ */
.level-quiz {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.03);
}

.level-quiz__title {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.level-quiz__progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.level-quiz__progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(128, 128, 128, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.level-quiz__progress-fill {
  height: 100%;
  background: #0077B6;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 10%;
}

.level-quiz__progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.7;
  white-space: nowrap;
}

.level-quiz__fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.level-quiz__legend {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: block;
}

.level-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.level-quiz__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 48px;
  font-size: 0.92rem;
}

.level-quiz__option:hover {
  background: rgba(0, 119, 182, 0.05);
  border-color: rgba(0, 119, 182, 0.3);
}

.level-quiz__option--selected {
  background: rgba(0, 119, 182, 0.08);
  border-color: #0077B6;
}

.level-quiz__radio-input {
  accent-color: #0077B6;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.level-quiz__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.5rem;
}

.level-quiz__btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.15s, border-color 0.15s;
  background: transparent;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
}

.level-quiz__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-quiz__btn:hover:not(:disabled) {
  background: rgba(0, 119, 182, 0.08);
  border-color: #0077B6;
}

.level-quiz__btn--next {
  background: #0077B6;
  color: #fff;
  border-color: #0077B6;
}

.level-quiz__btn--next:hover:not(:disabled) {
  background: #005f8f;
}

.level-quiz__btn--restart {
  margin-top: 1rem;
}

.level-quiz__result {
  text-align: center;
  padding: 1rem 0;
}

.level-quiz__result-level {
  margin-bottom: 1rem;
}

.level-quiz__result-level .skill-badge {
  font-size: 1.2rem;
  padding: 0.3rem 1rem;
}

.level-quiz__result-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 1rem;
}

.level-quiz__nojs {
  font-style: italic;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .level-quiz__progress-fill { transition: none; }
}

@media screen and (max-width: 47.999rem) {
  .level-quiz__option {
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (prefers-color-scheme: dark) {
  .level-quiz {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .level-quiz__progress-fill {
    background: #4db8e8;
  }
  .level-quiz__option--selected {
    background: rgba(77, 184, 232, 0.12);
    border-color: #4db8e8;
  }
  .level-quiz__option:hover {
    background: rgba(77, 184, 232, 0.08);
    border-color: rgba(77, 184, 232, 0.3);
  }
  .level-quiz__btn--next {
    background: #4db8e8;
    color: #1a1a2e;
    border-color: #4db8e8;
  }
  .level-quiz__btn--next:hover:not(:disabled) {
    background: #3aa0d0;
  }
  .level-quiz__radio-input {
    accent-color: #4db8e8;
  }
}

@media print {
  .level-quiz {
    display: none;
  }
}

/* ================================================================
   SCORE CALCULATOR: interactive match scorer
   ================================================================ */
.score-calc {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.03);
}

.score-calc__format {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.score-calc__format-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.score-calc__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.score-calc__board {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  text-align: center;
}

.score-calc__board th,
.score-calc__board td {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(128, 128, 128, 0.2);
  font-size: 1.1rem;
}

.score-calc__board th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.score-calc__name {
  font-weight: 600;
  min-width: 80px;
  text-align: left;
  cursor: text;
  outline: none;
}

.score-calc__name:focus {
  background: rgba(0, 119, 182, 0.08);
  border-radius: 3px;
}

.score-calc__set.is-current {
  background: rgba(0, 184, 148, 0.1);
  font-weight: 700;
}

.score-calc__pts {
  font-size: 1.3rem;
  font-weight: 700;
  min-width: 50px;
}

.score-calc__status {
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  min-height: 1.6rem;
  color: #0077B6;
  margin-bottom: 0.75rem;
}

.score-calc__status--fade {
  animation: sc-fade-in 0.3s ease-out;
}

@keyframes sc-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .score-calc__status--fade { animation: none; }
}

.score-calc__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.score-calc__btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: background 0.15s, border-color 0.15s;
  background: transparent;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
}

.score-calc__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.score-calc__btn--a {
  background: rgba(0, 184, 148, 0.1);
  border-color: rgba(0, 184, 148, 0.4);
  color: #00896e;
}

.score-calc__btn--a:hover:not(:disabled) {
  background: rgba(0, 184, 148, 0.2);
}

.score-calc__btn--b {
  background: rgba(0, 119, 182, 0.1);
  border-color: rgba(0, 119, 182, 0.4);
  color: #005f94;
}

.score-calc__btn--b:hover:not(:disabled) {
  background: rgba(0, 119, 182, 0.2);
}

.score-calc__btn--undo,
.score-calc__btn--reset {
  font-size: 0.85rem;
}

.score-calc__btn--undo:hover:not(:disabled),
.score-calc__btn--reset:hover:not(:disabled) {
  background: rgba(128, 128, 128, 0.1);
}

.score-calc__nojs {
  font-style: italic;
  opacity: 0.7;
}

@media screen and (max-width: 47.999rem) {
  .score-calc__controls {
    flex-direction: column;
  }
  .score-calc__btn {
    width: 100%;
  }
  .score-calc__board th,
  .score-calc__board td {
    padding: 0.4rem 0.4rem;
    font-size: 0.95rem;
  }
  .score-calc__pts {
    font-size: 1.1rem;
  }
}

@media (prefers-color-scheme: dark) {
  .score-calc {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .score-calc__status {
    color: #4db8e8;
  }
  .score-calc__btn--a {
    background: rgba(46, 204, 155, 0.12);
    border-color: rgba(46, 204, 155, 0.35);
    color: #2ecc9b;
  }
  .score-calc__btn--a:hover:not(:disabled) {
    background: rgba(46, 204, 155, 0.22);
  }
  .score-calc__btn--b {
    background: rgba(77, 184, 232, 0.12);
    border-color: rgba(77, 184, 232, 0.35);
    color: #4db8e8;
  }
  .score-calc__btn--b:hover:not(:disabled) {
    background: rgba(77, 184, 232, 0.22);
  }
  .score-calc__set.is-current {
    background: rgba(46, 204, 155, 0.15);
  }
}

@media print {
  .score-calc__controls,
  .score-calc__format {
    display: none;
  }
  .score-calc {
    border: 1px solid #ccc;
    background: none;
  }
}

/* ================================================================
   DRILL TIMER: training session timer
   ================================================================ */
.drill-timer {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.03);
}

.drill-timer__presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.drill-timer__presets-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.drill-timer__preset {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 20px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
  min-height: 48px;
}

.drill-timer__preset:hover {
  border-color: #0077B6;
  color: #0077B6;
}

.drill-timer__preset.is-active {
  background: #0077B6;
  border-color: #0077B6;
  color: #fff;
}

.drill-timer__display {
  text-align: center;
  margin: 1rem 0;
}

.drill-timer__phase-name {
  font-family: var(--MAIN-TITLES-font, sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.drill-timer__countdown {
  font-family: 'Courier New', Courier, monospace;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #0077B6;
}

.drill-timer__phases {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.drill-timer__phases li {
  padding: 0.3rem 0.5rem;
  margin: 0.2rem 0;
  border-radius: 4px;
  font-size: 0.92rem;
  transition: background 0.2s, opacity 0.2s;
}

.drill-timer__phases li.is-active {
  background: rgba(0, 184, 148, 0.12);
  font-weight: 600;
}

.drill-timer__phases li.is-done {
  opacity: 0.45;
  text-decoration: line-through;
}

.drill-timer__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.drill-timer__ctrl {
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: background 0.15s, border-color 0.15s;
  background: transparent;
  color: var(--INTERNAL-MAIN-TEXT-color, #2d3436);
}

.drill-timer__ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drill-timer__ctrl:hover:not(:disabled) {
  background: rgba(0, 119, 182, 0.08);
  border-color: #0077B6;
}

.drill-timer__nojs {
  font-style: italic;
  opacity: 0.7;
}

@media screen and (max-width: 47.999rem) {
  .drill-timer__countdown {
    font-size: 2.5rem;
  }
  .drill-timer__controls {
    flex-direction: column;
  }
  .drill-timer__ctrl {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .drill-timer {
    background: rgba(128, 128, 128, 0.06);
    border-color: rgba(128, 128, 128, 0.3);
  }
  .drill-timer__countdown {
    color: #4db8e8;
  }
  .drill-timer__preset:hover {
    border-color: #4db8e8;
    color: #4db8e8;
  }
  .drill-timer__preset.is-active {
    background: #4db8e8;
    border-color: #4db8e8;
    color: #1a1a2e;
  }
  .drill-timer__phases li.is-active {
    background: rgba(46, 204, 155, 0.15);
  }
  .drill-timer__ctrl:hover:not(:disabled) {
    background: rgba(77, 184, 232, 0.1);
    border-color: #4db8e8;
  }
}

@media print {
  .drill-timer {
    display: none;
  }
}

/* === CHILDREN CARDS: article listings on category pages === */
.children-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.children-card {
  display: flex;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: box-shadow 0.2s, background 0.15s;
  background: rgba(128, 128, 128, 0.03);
}

.children-card:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  background: rgba(128, 128, 128, 0.06);
}

.children-card__body {
  flex: 1;
}

.children-card__title {
  font-family: var(--MAIN-TITLES-font);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.children-card__desc {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.4;
}

.children-card__skill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.children-card__skill--beginner { background: #e6f7f2; color: #00896e; }
.children-card__skill--intermediate { background: #e0f0fa; color: #005f94; }
.children-card__skill--advanced { background: #fce8e6; color: #a03c2e; }
.children-card__skill--all { background: #f0f0f0; color: #555; }

@media (prefers-color-scheme: dark) {
  .children-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
  .children-card:hover { background: rgba(255, 255, 255, 0.07); }
  .children-card__skill--beginner { background: rgba(0, 137, 110, 0.2); color: #5dd9b8; }
  .children-card__skill--intermediate { background: rgba(0, 95, 148, 0.2); color: #6ab8e0; }
  .children-card__skill--advanced { background: rgba(160, 60, 46, 0.2); color: #e88a7c; }
  .children-card__skill--all { background: rgba(255, 255, 255, 0.1); color: #aaa; }
}

/* === TABLE WRAPPER: responsive scroll on mobile === */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}
.table-wrapper table {
  margin: 0;
}

/* === READING TIME: small label under heading === */
.reading-time {
  display: inline-block;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .reading-time {
    color: rgba(255, 255, 255, 0.45);
  }
}
@media print {
  .reading-time {
    display: none;
  }
}
.last-updated {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .last-updated {
    color: rgba(255, 255, 255, 0.4);
  }
}
@media print {
  .last-updated {
    display: none;
  }
}

/* === BACK TO TOP: fixed button on scroll === */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--MAIN-LINK-color, #0077B6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 2.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 90;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--MAIN-LINK-HOVER-color, #005f94);
}
@media print {
  .back-to-top {
    display: none;
  }
}
@media screen and (max-width: 47.999rem) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

/* === SHARE BUTTONS: WhatsApp, Telegram, Copy link === */
.share-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0 0;
  justify-content: flex-end;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
  position: relative;
}
.share-btn:hover {
  color: rgba(0, 0, 0, 0.8);
  border-color: rgba(0, 0, 0, 0.3);
  text-decoration: none;
}
.share-btn--whatsapp:hover { color: #25D366; border-color: #25D366; }
.share-btn--telegram:hover { color: #0088cc; border-color: #0088cc; }
.share-btn--copy:hover { color: #666; border-color: #666; }
.share-btn--copy.copied { color: #25D366; border-color: #25D366; }
.share-btn--copy.copied::after {
  content: attr(data-copied-text);
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  font-size: 0.7rem;
  background: #333;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  .share-btn {
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
  }
  .share-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
  }
  .share-btn--whatsapp:hover { color: #25D366; border-color: #25D366; }
  .share-btn--telegram:hover { color: #0088cc; border-color: #0088cc; }
  .share-btn--copy:hover { color: #aaa; border-color: #aaa; }
  .share-btn--copy.copied { color: #25D366; border-color: #25D366; }
}
@media print {
  .share-buttons { display: none; }
}

/* === ERROR REPORT: link before support CTA === */
.error-report {
  text-align: right;
  margin: 2rem 0 0;
  font-size: 0.85rem;
}
.error-report a {
  color: var(--MAIN-TEXT-color, #666);
  opacity: 0.65;
  text-decoration: none;
}
.error-report a:hover {
  opacity: 1;
  text-decoration: underline;
}
@media print {
  .error-report { display: none; }
}

/* === CLUB LOGOS: directory page === */
h3 + p > img[src*="/images/clubs/"] {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0.5rem 0 1rem;
}

/* ================================================================
   SEARCH: improved UX — sidebar autocomplete + dedicated page
   ================================================================ */

/* Sidebar search input: better visibility */
#R-sidebar .search-by {
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: var(--MAIN-BG-color, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
}

#R-sidebar .search-by:focus {
  border-color: var(--PRIMARY-color, #00b894);
  box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.2);
  outline: none;
}

/* Autocomplete dropdown: better contrast and hover */
#R-sidebar .autocomplete-suggestions {
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 60vh;
}

#R-sidebar .autocomplete-suggestion {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  cursor: pointer;
  transition: background 0.1s;
}

#R-sidebar .autocomplete-suggestion:hover,
#R-sidebar .autocomplete-suggestion.selected {
  background: rgba(0, 184, 148, 0.08);
}

#R-sidebar .autocomplete-suggestion:last-child {
  border-bottom: none;
}

/* Dedicated search page: larger input */
#R-search-by-detail {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
  background: var(--MAIN-BG-color, #fff);
  color: var(--INTERNAL-MAIN-TEXT-color, inherit);
  transition: border-color 0.15s, box-shadow 0.15s;
}

#R-search-by-detail:focus {
  border-color: var(--PRIMARY-color, #00b894);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
  outline: none;
}

/* Search results: better card-like appearance */
#R-searchresults .autocomplete-suggestion {
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 6px;
  transition: background 0.1s, border-color 0.15s;
}

#R-searchresults .autocomplete-suggestion:hover {
  background: rgba(0, 184, 148, 0.05);
  border-color: rgba(0, 184, 148, 0.3);
}

/* Search hint text */
.searchhint {
  color: var(--INTERNAL-MAIN-TEXT-color, inherit);
  opacity: 0.6;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Keyboard shortcut hint */
.search-shortcut-hint {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--INTERNAL-MAIN-TEXT-color, inherit);
  opacity: 0.4;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  margin-left: 0.5rem;
  vertical-align: middle;
  font-family: monospace;
}

/* ================================================================
   SECTION: MOBILE 360px / 320px
   Extends existing 400px breakpoint (line 553).
   GNRL-124 batch 4 (15.03.2026)
   ================================================================ */

/* --- 360px: Narrow mobile --- */
@media screen and (max-width: 22.5rem) {
  body #R-body-inner {
    font-size: 0.9rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  h1 {
    font-size: 1.3rem !important;
  }

  h2 {
    font-size: 1.15rem;
  }

  h3 {
    font-size: 1rem;
  }

  #R-body-inner table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #R-body-inner pre {
    overflow-x: auto;
    font-size: 0.8rem;
  }

  #R-body-inner img {
    max-width: 100%;
    height: auto;
  }
}

/* --- 320px: Ultra-narrow --- */
@media screen and (max-width: 20rem) {
  #R-body-inner {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Override Relearn theme h1/h2 overflow-x:hidden (theme.css) */
  h1, h2 {
    overflow-x: visible;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  body #R-body-inner {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  h1 {
    font-size: 1.2rem !important;
  }

  .hero {
    height: clamp(140px, 22vh, 200px);
  }

  .hero__icon {
    width: 36px;
    height: 36px;
  }
}

/* ================================================================
   SECTION: TOUCH TARGETS (WCAG 2.1 AA)
   Minimum 44x44px for interactive elements on touch devices
   ================================================================ */
@media (pointer: coarse) {
  #R-sidebar a,
  nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ================================================================
   READER MODE (Relearn variant)
   Toggle class on <html> hides sidebar/topbar, centers content.
   Activated via FAB button (JS in assets/js/custom.js).
   GNRL-124 batch 4 (15.03.2026)
   ================================================================ */

/* FAB toggle button */
.reader-mode-fab {
  position: fixed;
  bottom: 5rem;
  right: 1.25rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.reader-mode-fab:hover {
  background: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.reader-mode-fab:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Dark mode FAB */
[data-r-theme-variant*="dark"] .reader-mode-fab,
.dark .reader-mode-fab {
  background: #1f2937;
  color: #d1d5db;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-r-theme-variant*="dark"] .reader-mode-fab:hover,
.dark .reader-mode-fab:hover {
  background: #374151;
}

/* Active state */
html.reader-mode .reader-mode-fab {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

html.reader-mode .reader-mode-fab:hover {
  background: #2563eb;
}

/* Hide sidebar in reader mode */
html.reader-mode #R-sidebar {
  display: none !important;
}

/* Hide topbar in reader mode */
html.reader-mode #R-topbar {
  display: none !important;
}

/* Hide overlays */
html.reader-mode #R-body-overlay,
html.reader-mode #R-main-overlay {
  display: none !important;
}

/* Center and expand content */
html.reader-mode #R-body-inner {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.85;
}

html.reader-mode #R-body-inner h1 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

html.reader-mode #R-body-inner h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

html.reader-mode #R-body-inner p {
  margin-bottom: 1.25rem;
}

/* A11Y: Reduced motion for reader FAB */
@media (prefers-reduced-motion: reduce) {
  .reader-mode-fab {
    transition: none !important;
  }
}

/* Print: hide reader FAB */
@media print {
  .reader-mode-fab {
    display: none !important;
  }
}
