/* ============================================================
   Sportstech Design Tokens — Colors & Type
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,100..125,400..900;1,100..125,400..900&family=Inter:ital,opsz,wght@0,14..32,300..700;1,14..32,300..700&display=swap');

:root {
  /* Brand */
  --sportstech-red:  #E4002B;
  --sportstech-dark: #25282A;

  /* Neutrals */
  --warm-bg:         #E7E3D8;
  --warm-grey:       #D1CCBD;
  --off-white:       #F6F4EE;
  --fg-1: #25282A;
  --fg-2: #4A4D4F;
  --fg-3: #85888A;
  --dark-500: #6B6E71;
  --dark-300: #9FA2A4;

  /* Borders */
  --border-subtle: rgba(37, 40, 42, 0.10);
  --border-mid:    rgba(37, 40, 42, 0.20);

  /* Typography */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(37, 40, 42, 0.08);
  --shadow-card-hover: 0 8px 28px rgba(37, 40, 42, 0.13);
  --shadow-btn:  0 4px 12px rgba(228, 0, 43, 0.18);
  --shadow-btn-hover: 0 8px 24px rgba(228, 0, 43, 0.28);

  /* Radii */
  --radius-card:  20px;
  --radius-input: 10px;
  --radius-pill:  999px;

  /* Animation */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Knowledge Base specific */
  --success:       #1A7F4B;
  --success-bg:    rgba(26, 127, 75, 0.08);
  --info-bg:       rgba(228, 0, 43, 0.05);
  --code-bg:       #1A1D1F;
  --code-header:   #252A2D;
  --sidebar-width: 272px;
  --header-height: 64px;
  --content-max:   740px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-1);
  background: var(--warm-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--warm-grey); border-radius: 3px; }

/* ============================================================
   APP SHELL
   ============================================================ */

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.app-header .logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
}

.app-header .header-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--fg-1);
  flex: 1;
  display: none;
}

.global-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
/* header-title needs flex:1 so global-progress pushes right */
.app-header { gap: 12px; }

.global-progress-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}

.global-progress-bar {
  width: 100px;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.global-progress-fill {
  height: 100%;
  background: var(--sportstech-red);
  border-radius: 3px;
  transition: width 400ms var(--ease-out);
  width: 0%;
}

.global-progress-count {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  font-stretch: 112%;
  color: var(--fg-1);
  min-width: 32px;
}

/* ── Header actions (lang + reset-all) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  transition: border-color 0.15s, color 0.15s;
}
.lang-toggle:hover { border-color: var(--fg-2); color: var(--fg-1); }
.lang-sep { color: var(--border-mid); }
.lang-opt { transition: color 0.15s; }
.lang-opt.active { color: var(--sportstech-red); }

.reset-all-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-3);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.reset-all-btn:hover {
  color: var(--sportstech-red);
  border-color: var(--sportstech-red);
  background: rgba(228, 0, 43, 0.04);
}

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  color: var(--fg-1);
  margin-right: 4px;
}
.hamburger-btn:hover { background: var(--border-subtle); }

.app-layout {
  display: flex;
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--off-white);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}

.sidebar-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 16px;
}
.sidebar-label:first-child { margin-top: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  transition: all 160ms var(--ease-out);
  position: relative;
}
.sidebar-link:hover {
  background: rgba(37, 40, 42, 0.06);
  color: var(--fg-1);
}
.sidebar-link.active {
  background: rgba(228, 0, 43, 0.08);
  color: var(--sportstech-red);
  font-weight: 600;
}

.sidebar-link-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 160ms;
}
.sidebar-link.active .sidebar-link-icon {
  background: rgba(228, 0, 43, 0.12);
}

.sidebar-link-text { flex: 1; line-height: 1.3; }

.sidebar-link-progress {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sidebar-mini-bar {
  width: 32px; height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.sidebar-mini-fill {
  height: 100%;
  background: var(--sportstech-red);
  border-radius: 2px;
  transition: width 400ms var(--ease-out);
  width: 0%;
}
.sidebar-link.done .sidebar-mini-fill { background: var(--success); }

.sidebar-count {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  font-stretch: 112%;
  color: var(--fg-3);
  min-width: 22px;
  text-align: right;
}
.sidebar-link.active .sidebar-count { color: var(--sportstech-red); }
.sidebar-link.done .sidebar-count { color: var(--success); }

/* ── Sidebar sub-navigation ── */
.sidebar-subnav {
  display: none;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 4px 16px;
  margin-top: -2px;
}
.sidebar-subnav.open { display: flex; }

.sidebar-subnav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  transition: all 140ms var(--ease-out);
  border-left: 2px solid transparent;
}
.sidebar-subnav-item:hover {
  color: var(--fg-1);
  background: rgba(37, 40, 42, 0.05);
}
.sidebar-subnav-item.active {
  color: var(--sportstech-red);
  border-left-color: var(--sportstech-red);
  background: rgba(228, 0, 43, 0.05);
  font-weight: 500;
}
.sidebar-subnav-num {
  font-size: 10px;
  font-weight: 600;
  color: inherit;
  opacity: 0.65;
  flex-shrink: 0;
  min-width: 14px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 48px 40px 100px;
  max-width: calc(var(--sidebar-width) + var(--content-max) + 80px);
}

.content-inner {
  max-width: var(--content-max);
}

/* ── Section wrapper ── */
.kb-section {
  margin-bottom: 80px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.section-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sportstech-red);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: 28px;
  line-height: 1.15;
  color: var(--fg-1);
  margin: 0 0 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--fg-2);
  margin: 0 0 32px;
  line-height: 1.6;
}

/* ── Welcome hero ── */
.welcome-hero {
  background: var(--fg-1);
  border-radius: var(--radius-card);
  padding: 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(228, 0, 43, 0.12);
  pointer-events: none;
}

.welcome-hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.welcome-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
  color: #fff;
  margin: 0 0 14px;
}

.welcome-hero-title em {
  font-style: italic;
  color: var(--sportstech-red);
}

.welcome-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 160ms;
  font-weight: 500;
}
.welcome-badge:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.welcome-badge .badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sportstech-red);
  flex-shrink: 0;
}

/* ── Info cards ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.info-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.info-card-icon {
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1;
}

.info-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 14px;
  color: var(--fg-1);
  margin-bottom: 6px;
}

.info-card-text {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
}

/* ── Subsection ── */
.kb-subsection {
  margin-bottom: 40px;
}
.kb-subsection[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.subsection-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.subsection-number {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--fg-1);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.subsection-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 17px;
  color: var(--fg-1);
  margin: 0;
}

.subsection-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 32px 0;
}

/* ── Callout ── */
.callout {
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout-info {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.15);
}
.callout-warning {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.20);
}
.callout-success {
  background: var(--success-bg);
  border: 1px solid rgba(26, 127, 75, 0.20);
}
.callout-red {
  background: var(--info-bg);
  border: 1px solid rgba(228, 0, 43, 0.15);
  border-left: 3px solid var(--sportstech-red);
}
.callout-icon {
  font-size: 18px;
  line-height: 1.4;
  flex-shrink: 0;
}
.callout-body { flex: 1; }
.callout-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 13px;
  color: var(--fg-1);
  margin-bottom: 4px;
}
.callout-text {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
}
.callout-text a {
  color: var(--sportstech-red);
  text-decoration: none;
  font-weight: 500;
}
.callout-text a:hover { text-decoration: underline; }

/* ── Checklist ── */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 16px 0;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 120ms;
  position: relative;
  user-select: none;
}
.check-item:hover { background: rgba(37, 40, 42, 0.04); }
.check-item.is-done { background: var(--success-bg); }

.check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.check-box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-mid);
  background: #fff;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms var(--ease-out);
}

.check-item.is-done .check-box {
  background: var(--success);
  border-color: var(--success);
}

.check-box::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid transparent;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0);
  transition: transform 180ms var(--ease-out);
  margin-top: -2px;
}

.check-item.is-done .check-box::after {
  border-color: #fff;
  transform: rotate(45deg) scale(1);
}

.check-label {
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.5;
  flex: 1;
}
.check-item.is-done .check-label {
  color: var(--success);
  text-decoration: line-through;
  text-decoration-color: rgba(26, 127, 75, 0.4);
}

/* ── Section progress badge ── */
.section-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.section-progress-bar {
  width: 60px; height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.section-progress-fill {
  height: 100%;
  background: var(--sportstech-red);
  border-radius: 2px;
  transition: width 400ms var(--ease-out);
}
.section-progress-fill.full { background: var(--success); }

.section-progress-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  font-stretch: 112%;
  color: var(--fg-3);
}

.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: color 120ms;
}
.reset-btn:hover { color: var(--sportstech-red); }

/* ── Code blocks ── */
.code-block {
  background: var(--code-bg);
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(255,255,255,0.06);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--code-header);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.code-lang {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 140ms;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.9);
}
.copy-btn.copied {
  background: rgba(26, 127, 75, 0.2);
  border-color: rgba(26, 127, 75, 0.3);
  color: #4ade80;
}

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #E5E7EB;
  white-space: pre;
  display: block;
}

/* Syntax highlight classes */
.code-comment { color: #6B7280; }
.code-keyword { color: #F472B6; }
.code-string  { color: #86EFAC; }
.code-cmd     { color: #93C5FD; }
.code-path    { color: #FCD34D; }
.code-flag    { color: #C4B5FD; }

/* ── Tabs (Mac/Windows) ── */
.os-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
}
.os-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 140ms;
}
.os-tab.active {
  color: var(--fg-1);
  border-bottom-color: var(--fg-1);
}
.os-panel { display: none; }
.os-panel.active { display: block; }

/* ── Link button ── */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--sportstech-red);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-btn);
  transition: all 200ms var(--ease-out);
  cursor: pointer;
  border: none;
}
.link-btn:hover {
  background: #CC0027;
  box-shadow: var(--shadow-btn-hover);
  color: #fff;
  transform: translateY(-1px);
}
.link-btn svg { flex-shrink: 0; }

.link-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1.5px solid var(--border-mid);
  color: var(--fg-1);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 160ms var(--ease-out);
}
.link-btn-outline:hover {
  background: var(--off-white);
  border-color: var(--fg-1);
}

/* ── YouTube embed ── */
.yt-container {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  margin: 20px 0;
  background: #000;
}
.yt-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.yt-placeholder {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  margin: 20px 0;
  background: var(--code-bg);
  border: 1px dashed rgba(255,255,255,0.15);
}
.yt-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.yt-placeholder-icon {
  font-size: 36px;
  opacity: 0.4;
}
.yt-placeholder-text {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Model comparison table ── */
.model-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid var(--border-subtle);
  background: #fff;
}
.model-table th {
  background: var(--off-white);
  padding: 10px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--border-subtle);
}
.model-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--fg-1);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.model-table tr:last-child td { border-bottom: none; }
.model-table tr:hover td { background: rgba(37,40,42,0.02); }
.model-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-default {
  background: rgba(228,0,43,0.1);
  color: var(--sportstech-red);
}
.badge-power {
  background: rgba(139,92,246,0.1);
  color: #7C3AED;
}
.badge-fast {
  background: rgba(16,185,129,0.1);
  color: #059669;
}

/* ── Tip cards ── */
.tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.tip-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.tip-card-icon {
  font-size: 20px;
  margin-bottom: 8px;
}
.tip-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 13px;
  color: var(--fg-1);
  margin-bottom: 6px;
}
.tip-card-text {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.55;
}

/* ── Steps list ── */
.steps-list {
  counter-reset: steps;
  list-style: none;
  padding: 0; margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  counter-increment: steps;
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--off-white);
  border: 1px solid var(--border-mid);
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 12px;
  color: var(--fg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-body {
  flex: 1;
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.5;
  padding-top: 3px;
}
.step-body strong { font-weight: 600; }
.step-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(37,40,42,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--fg-1);
}
.step-body .code-block code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #E5E7EB;
  font-size: 13px;
}

/* ── Doc link ── */
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-1);
  text-decoration: none;
  transition: all 140ms;
  margin: 8px 0 16px;
}
.doc-link:hover {
  background: #fff;
  border-color: var(--border-mid);
  box-shadow: var(--shadow-card);
}
.doc-link-icon { font-size: 15px; }

/* ── Download row ── */
.download-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
}
.download-row-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.download-row-info { flex: 1; }
.download-row-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 14px;
  color: var(--fg-1);
  margin-bottom: 2px;
}
.download-row-desc {
  font-size: 12px;
  color: var(--fg-3);
}

/* ── Inline code ── */
p code, li code, td code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(37,40,42,0.07);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--fg-1);
}

/* ── Prose text ── */
.prose {
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-2);
  margin-bottom: 16px;
}
.prose a {
  color: var(--sportstech-red);
  text-decoration: none;
}
.prose a:hover { text-decoration: underline; }

/* ── Section footer ── */
.section-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .hamburger-btn { display: flex; }
  .app-header .header-title { display: block; }
  .global-progress-bar { width: 60px; }
  .global-progress-label { display: none; }
  .reset-all-btn span[data-i18n] { display: none; }
  .reset-all-btn { padding: 5px 8px; }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    transition: transform 280ms var(--ease-out);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(37,40,42,0.15);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(37,40,42,0.4);
    z-index: 49;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.open { display: block; }

  .main-content {
    margin-left: 0;
    padding: 32px 20px 80px;
  }

  .info-grid { grid-template-columns: 1fr; }
  .tip-grid  { grid-template-columns: 1fr; }
  .welcome-hero { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .model-table { font-size: 12px; }
  .model-table td, .model-table th { padding: 10px 12px; }
  .download-row { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   YOUTUBE EMBED
   ============================================================ */
.yt-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 20px;
  background: var(--sportstech-dark);
  box-shadow: var(--shadow-card);
}
.yt-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ============================================================
   COLLAPSIBLE SECTIONS
   ============================================================ */
.collapsible-trigger {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.collapsible-trigger:hover .subsection-title { color: var(--sportstech-red); }

.collapse-icon {
  margin-left: auto;
  font-size: 18px;
  color: var(--fg-3);
  transition: transform 0.25s var(--ease-out);
  line-height: 1;
  flex-shrink: 0;
}
.collapsible-section.is-collapsed .collapse-icon { transform: rotate(-90deg); }

.collapsible-body {
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out), opacity 0.25s ease;
  max-height: 9999px;
  opacity: 1;
}
.collapsible-section.is-collapsed .collapsible-body {
  max-height: 0;
  opacity: 0;
}

/* All subsection-headers get collapsible treatment via JS */
.subsection-header { position: relative; }

/* ============================================================
   TECH STACK BLOCK
   ============================================================ */
.techstack-block {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}
.techstack-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-1);
  margin: 0 0 20px;
}
.techstack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.techstack-card {
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.techstack-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.techstack-icon { font-size: 28px; margin-bottom: 8px; }
.techstack-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-1);
  margin-bottom: 2px;
}
.techstack-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sportstech-red);
  margin-bottom: 8px;
}
.techstack-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
}

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */
.arch-block {
  margin-top: 48px;
  padding: 36px;
  background: var(--sportstech-dark);
  border-radius: 20px;
  color: #fff;
}
.arch-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  text-align: center;
}
.arch-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin: 0 0 32px;
}
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  row-gap: 16px;
}
.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 18px 20px;
  min-width: 110px;
  text-align: center;
  transition: background 0.2s;
}
.arch-node:hover { background: rgba(255,255,255,0.12); }
.arch-node-icon { font-size: 28px; margin-bottom: 6px; }
.arch-node-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.arch-node-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.45);
}
.arch-node--claude { border-color: rgba(228, 0, 43, 0.5); }
.arch-node--n8n    { border-color: rgba(255, 107, 0, 0.5); }
.arch-node--vercel { border-color: rgba(255,255,255,0.3); }
.arch-node--github { border-color: rgba(255,255,255,0.2); }

.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.arch-arrow-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}
.arch-note {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin: 24px 0 0;
  line-height: 1.6;
}

/* responsive */
@media (max-width: 680px) {
  .techstack-grid { grid-template-columns: 1fr; }
  .arch-block { padding: 24px 20px; }
  .arch-diagram { flex-direction: column; gap: 8px; }
  .arch-arrow { transform: rotate(90deg); }
}

/* ── Claude Modi: Chat / Cowork / Code ─────────────────── */
.claude-modes-block {
  margin: 0 0 8px;
}
.claude-modes-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-1);
  margin: 0 0 6px;
}
.claude-modes-sub {
  font-size: 13px;
  color: var(--fg-2);
  margin: 0 0 20px;
  line-height: 1.5;
}
.claude-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 820px) {
  .claude-modes-grid { grid-template-columns: 1fr; }
}
.claude-mode-card {
  background: var(--off-white);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.claude-mode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.claude-mode-card--chat::before   { background: #3d9970; }
.claude-mode-card--cowork::before { background: #e4002b; }
.claude-mode-card--code::before   { background: #3d6fa8; }

.claude-mode-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.claude-mode-card--chat   .claude-mode-tag { color: #3d9970; }
.claude-mode-card--cowork .claude-mode-tag { color: #e4002b; }
.claude-mode-card--code   .claude-mode-tag { color: #3d6fa8; }

.claude-mode-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-1);
  line-height: 1.25;
}
.claude-mode-desc {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.6;
  flex: 1;
}
.claude-mode-bestfor {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 4px;
}
.claude-mode-bestfor-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.claude-mode-bestfor ul {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.claude-mode-bestfor ul li {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.45;
}

/* ============================================================
   AI Governance — site-native styling
   ============================================================ */
.governance-intro {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}
.governance-intro .section-title em {
  color: var(--sportstech-red);
  font-style: italic;
}
.governance-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.governance-stat + .governance-stat {
  border-left: 1px solid var(--border-subtle);
  padding-left: 24px;
}
.governance-stat {
  padding-right: 24px;
}
.governance-stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
.governance-stat-num span {
  font-size: 22px;
  vertical-align: baseline;
  color: var(--sportstech-red);
}
.governance-stat-lab {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Principles */
.principle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.principle-card {
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
}
.principle-card--full {
  grid-column: 1 / -1;
  background: var(--fg-1);
  color: var(--off-white);
  border-color: var(--fg-1);
}
.principle-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.principle-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  background: var(--fg-1);
  color: var(--off-white);
  border-radius: 4px;
}
.principle-card--full .principle-num {
  background: var(--sportstech-red);
  color: #fff;
}
.principle-cat {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.principle-card--full .principle-cat { color: var(--warm-grey); }
.principle-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--fg-1);
}
.principle-card--full .principle-title {
  color: #fff;
  font-size: 24px;
}
.principle-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0;
}
.principle-card--full .principle-body { color: var(--warm-grey); }
.principle-praxis {
  margin-top: 18px;
  border-left: 3px solid var(--sportstech-red);
  padding: 4px 0 4px 14px;
}
.principle-praxis-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sportstech-red);
  font-weight: 600;
  margin-bottom: 6px;
}
.principle-praxis p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}
.principle-card--full .principle-praxis p { color: var(--off-white); }

/* Ownership / role cards */
.role-ceo-card {
  background: var(--fg-1);
  color: var(--off-white);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  margin-top: 4px;
}
.role-ceo-card .role-tier {
  color: var(--warm-grey);
}
.role-ceo-card .role-name {
  color: #fff;
  font-size: 24px;
}
.role-ceo-card .role-contact {
  color: var(--warm-grey);
}
.role-ceo-card .role-desc {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--warm-grey);
}
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}
.role-card {
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
}
.role-card--center {
  background: var(--sportstech-red);
  color: #fff;
  border-color: var(--sportstech-red);
  box-shadow: var(--shadow-btn);
}
.role-tier {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 600;
}
.role-tier--accent { color: var(--sportstech-red); }
.role-tier--center { color: #ffd9d2; }
.role-name {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
  color: var(--fg-1);
}
.role-card--center .role-name { color: #fff; font-size: 22px; }
.role-contact {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.role-card--center .role-contact { color: #ffcdc4; }
.role-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-2);
}
.role-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
}
.role-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--fg-3);
}
.role-card--center .role-list { color: #fff; }
.role-card--center .role-list li::before { color: #ffcdc4; }
.role-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Six rules grid */
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
  margin-top: 18px;
  position: relative;
}
.rule-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-subtle);
}
.rule-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
}
.rule-item:nth-child(-n+2) { border-top: 0; }
.rule-arrow {
  color: var(--sportstech-red);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}
.rule-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
}
.rule-item strong {
  color: var(--fg-1);
  font-weight: 600;
}

/* Closing statement */
.governance-closing {
  margin-top: 32px;
  padding: 28px 28px 28px;
  background: var(--off-white);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--sportstech-red);
  border-radius: var(--radius-card);
}
.governance-closing-stmt {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin: 0;
}
.governance-closing-stmt em {
  color: var(--sportstech-red);
  font-style: italic;
}
.governance-closing-sig {
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 600;
}

@media (max-width: 880px) {
  .governance-stats { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .governance-stat + .governance-stat { border-left: 0; padding-left: 0; }
  .governance-stat:nth-child(even) {
    border-left: 1px solid var(--border-subtle);
    padding-left: 18px;
  }
  .principle-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid::before { display: none; }
  .rule-item { border-top: 1px solid var(--border-subtle); }
  .rule-item:nth-child(2) { border-top: 1px solid var(--border-subtle); }
}
