/* ═══════════════════════════════════════════════════
   TrackLab — Profile Pages (Horse, Trainer, Jockey)
   Loaded only on profile pages via v2_extra_css block.
   Inherits design tokens from v2.css (.v2-page scope).
   ═══════════════════════════════════════════════════ */

/* ── Accent variables per role ── */
.profile--trainer {
  --profile-accent: var(--accent-amber);
  --profile-glow: rgba(245,158,11,0.08);
  --profile-border: rgba(245,158,11,0.2);
}
.profile--jockey {
  --profile-accent: var(--accent-blue);
  --profile-glow: rgba(59,130,246,0.08);
  --profile-border: rgba(59,130,246,0.2);
}
.profile--horse {
  --profile-accent: var(--accent-lime);
  --profile-glow: rgba(200,255,0,0.06);
  --profile-border: rgba(200,255,0,0.15);
}
.profile--guide {
  --profile-accent: var(--accent-lime);
  --profile-glow: rgba(200,255,0,0.06);
  --profile-border: rgba(200,255,0,0.15);
}
.profile--terms {
  --profile-accent: var(--accent-blue);
  --profile-glow: rgba(59,130,246,0.06);
  --profile-border: rgba(59,130,246,0.15);
}
.profile--responsible {
  --profile-accent: var(--accent-amber);
  --profile-glow: rgba(245,158,11,0.06);
  --profile-border: rgba(245,158,11,0.15);
}

/* ── Layout ── */
.profile-page { max-width: 1080px; padding-bottom: 80px; }
.profile-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Sidebar ── */
.profile-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sb-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 18px;
  transition: color 0.2s;
}
.sb-back:hover { color: var(--text-primary); }

.sb-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.sb-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--profile-glow);
  border: 2px solid var(--profile-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: var(--profile-accent);
  margin-bottom: 8px;
}

.sb-silk {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}

.sb-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.sb-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.role-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--profile-glow);
  color: var(--profile-accent);
  border: 1px solid var(--profile-border);
}

.sb-breed {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sb-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--profile-glow);
  border: 1px solid var(--profile-border);
  border-radius: 8px;
  padding: 6px 12px;
}
.sb-score .ss-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--profile-accent);
  line-height: 1;
}
.sb-score .ss-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--profile-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  line-height: 1.2;
}

.sb-stat-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.sb-mini-stat { text-align: center; }
.sb-mini-stat .sms-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--profile-accent);
  line-height: 1;
}
.sb-mini-stat .sms-lbl {
  font-size: 9px;
  color: var(--text-muted);
}

/* ── TOC ── */
.profile-sidebar .toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.toc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.toc-list a:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.toc-list a.active {
  color: var(--profile-accent);
  background: var(--profile-glow);
  border-left-color: var(--profile-accent);
}
.toc-list .toc-icon { font-size: 12px; width: 16px; text-align: center; flex-shrink: 0; }

/* ── Section headings ── */
.profile-main .sec-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  scroll-margin-top: 24px;
}
.sec-heading .sec-emoji { font-size: 18px; }
.sec-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 14px;
}

/* ── Sections & Prose ── */
.profile-main .section { margin-bottom: 40px; }
.profile-main .prose {
  font-size: 15px; line-height: 1.8; color: var(--text-secondary);
}
.profile-main .prose p { margin-bottom: 14px; }
.profile-main .prose p:last-child { margin-bottom: 0; }
.profile-main .prose strong { color: var(--text-primary); font-weight: 600; }
.profile-main .prose a {
  color: var(--accent-lime);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.profile-main .prose a:hover { color: var(--accent-green); }
.profile-main .prose ul {
  margin: 0 0 14px 20px; color: var(--text-secondary);
  font-size: 15px; line-height: 1.8;
}
.profile-main .prose li { margin-bottom: 4px; }

/* ── Synopsis + Infobox ── */
.prof-synopsis {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  margin-bottom: 36px;
  animation: profFadeUp 0.4s ease;
}
.synopsis-text h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
}
.synopsis-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.infobox {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: fit-content;
  position: relative;
}
.infobox-header {
  background: var(--profile-glow);
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.infobox-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 12px;
}
.infobox-row:last-child { border-bottom: none; }
.infobox-row .ib-key {
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(255,255,255,0.015);
  border-right: 1px solid rgba(255,255,255,0.03);
}
.infobox-row .ib-val { padding: 8px 10px; color: var(--text-secondary); }
.infobox-row .ib-val strong { color: var(--text-primary); font-weight: 600; }

/* ── Glance grid ── */
.glance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 36px;
  animation: profFadeUp 0.4s ease 0.05s backwards;
}
.glance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.glance-card .gc-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}
.glance-card .gc-label { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.gc-num.lime { color: var(--accent-lime); }
.gc-num.green { color: var(--accent-green); }
.gc-num.amber { color: var(--accent-amber); }
.gc-num.blue { color: var(--accent-blue); }
.gc-num.white { color: var(--text-primary); }

/* ── Analysis block ── */
.analysis-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  animation: profFadeUp 0.4s ease 0.1s backwards;
  position: relative;
}
.analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.analysis-header .ah-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15px; }
.analysis-header .ah-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 3px 8px; border-radius: 4px;
}
.analysis-body { padding: 20px; }
.analysis-body p {
  font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 14px;
}
.analysis-body p:last-child { margin-bottom: 0; }
.analysis-body p strong { color: var(--text-primary); font-weight: 600; }

/* ── Trend bars ── */
.trend-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 36px;
  position: relative;
}
.trend-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.trend-title {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px;
  color: var(--text-secondary);
}
.trend-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100px;
  padding-bottom: 24px;
  position: relative;
}
.trend-bars::after {
  content: ''; position: absolute; bottom: 22px; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.trend-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 6px; position: relative; z-index: 1;
}
.trend-bar {
  width: 100%; max-width: 28px; border-radius: 3px 3px 0 0;
  transition: height 0.6s ease; min-height: 2px;
}
.trend-label {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text-muted);
  position: absolute; bottom: 0;
}
.trend-pct {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 600;
  color: var(--text-secondary);
}
.trend-line {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.trend-line polyline {
  fill: none;
  stroke: var(--profile-accent);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
  vector-effect: non-scaling-stroke;
}

/* ── Preferences ── */
.pref-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}
.pref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.pref-card-title {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px;
  color: var(--text-secondary); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.pref-rows { display: flex; flex-direction: column; gap: 8px; }
.pref-row {
  display: grid;
  grid-template-columns: 1fr 80px 52px;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.pref-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.pref-bar-wrap {
  width: 80px; height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px; overflow: hidden;
}
.pref-bar { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.pref-tag {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; letter-spacing: 0.02em; min-width: 48px; text-align: center;
}
.pref-tag.loves { background: rgba(200,255,0,0.12); color: var(--accent-lime); }
.pref-tag.likes { background: rgba(34,197,94,0.12); color: var(--accent-green); }
.pref-tag.ok { background: rgba(245,158,11,0.1); color: var(--accent-amber); }
.pref-tag.avoids { background: rgba(239,68,68,0.08); color: var(--accent-red); }

/* ── Partner cards ── */
.partner-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}
.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.partner-card.primary { border-color: var(--profile-border); background: var(--profile-glow); }

.pc-info .pc-name {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
}
.pc-info .pc-name .badge {
  font-size: 9px; font-weight: 700;
  background: rgba(59,130,246,0.1); color: var(--accent-blue);
  padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.pc-stats { display: flex; gap: 14px; }
.pc-stat { text-align: center; }
.pc-stat .pcs-num {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px;
  color: var(--text-secondary);
}
.pc-stat .pcs-num.accent { color: var(--profile-accent); }
.pc-stat .pcs-lbl { font-size: 9px; color: var(--text-muted); }

/* ── Top horses (stars grid) ── */
.stars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 36px;
}
.star-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.star-info { flex: 1; min-width: 0; }
.star-name {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.star-meta { font-size: 11px; color: var(--text-muted); }
.star-score {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 20px;
  color: var(--accent-lime); flex-shrink: 0;
}

/* ── Course record table ── */
.track-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
}
.track-table { width: 100%; border-collapse: collapse; }
.track-table th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-muted); padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.track-table th:last-child { text-align: right; }
.track-table td {
  padding: 10px 14px; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.track-table tr:last-child td { border-bottom: none; }
.tt-course { font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-primary); }
.tt-desc { font-size: 11px; color: var(--text-muted); }
.tt-winpct {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; text-align: right;
}
.tt-winpct.high { color: var(--accent-lime); }
.tt-winpct.mid { color: var(--accent-amber); }
.tt-winpct.low { color: var(--text-muted); }

/* ── Recent results (person) ── */
.recent-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 36px; }
.recent-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}
.recent-row.win-row { border-color: rgba(245,158,11,0.15); }
.rr-date { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.rr-info { min-width: 0; }
.rr-horse { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; }
.rr-detail { font-size: 11px; color: var(--text-muted); }
.rr-pos {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; text-align: center; min-width: 32px;
}
.rr-pos.won { background: rgba(34,197,94,0.12); color: var(--accent-green); }
.rr-pos.placed { background: rgba(245,158,11,0.1); color: var(--accent-amber); }
.rr-pos.missed { background: rgba(100,116,139,0.08); color: var(--text-muted); }
.rr-score {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px;
  min-width: 28px; text-align: right;
}

/* ── Next Race CTA (horse) ── */
.next-race-cta {
  background: var(--bg-card);
  border: 1px solid var(--profile-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.nr-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  color: var(--profile-accent);
  background: var(--profile-glow);
  border: 1px solid var(--profile-border);
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.nr-info { flex: 1; min-width: 150px; }
.nr-info .nr-venue { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 15px; }
.nr-info .nr-detail { font-size: 12px; color: var(--text-muted); }

/* ── Strengths & Risks (horse) ── */
.sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}
.sw-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.sw-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.sw-card.strengths::before { background: linear-gradient(90deg, var(--accent-green), var(--accent-lime)); }
.sw-card.weaknesses::before { background: linear-gradient(90deg, var(--accent-red), var(--accent-amber)); }
.sw-title {
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.sw-title.green { color: var(--accent-green); }
.sw-title.red { color: var(--accent-red); }
.sw-list { display: flex; flex-direction: column; gap: 8px; }
.sw-item {
  display: flex; gap: 8px; font-size: 13px;
  color: var(--text-secondary); line-height: 1.45;
}
.sw-item .sw-icon { flex-shrink: 0; margin-top: 1px; font-size: 12px; }

/* ── Recent runs timeline (horse) ── */
.run-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 36px; }
.run-entry {
  display: grid;
  grid-template-columns: 60px 28px 1fr;
  gap: 0;
  align-items: start;
  min-height: 72px;
}
.run-date {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-muted); padding-top: 14px; text-align: right; padding-right: 10px;
}
.run-dot-col { display: flex; flex-direction: column; align-items: center; position: relative; }
.run-dot {
  width: 12px; height: 12px; border-radius: 50%;
  margin-top: 16px; z-index: 1; flex-shrink: 0;
}
.run-dot.win { background: var(--accent-amber); box-shadow: 0 0 8px rgba(245,158,11,0.3); }
.run-dot.place { background: var(--text-secondary); }
.run-dot.other { background: var(--text-muted); opacity: 0.5; }
.run-line { width: 2px; flex: 1; background: var(--border); }
.run-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 6px 0 6px 8px;
}
.run-card.win-card { border-color: rgba(245,158,11,0.2); }
.run-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.run-result { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 15px; }
.run-result.p1 { color: var(--accent-amber); }
.run-result.p2 { color: var(--text-secondary); }
.run-result.p3 { color: #c8956c; }
.run-result.other { color: var(--text-muted); }
.run-score-pip {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(200,255,0,0.1); color: var(--accent-lime);
}
.run-venue { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 13px; }
.run-details { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }

/* ── Expandable lists ── */
.profile-overflow { display: none; }
.profile-overflow.open { display: contents; }
.profile-table-overflow { display: none; }
.profile-table-overflow.open { display: table-row-group; }
.profile-more-btn {
  display: block;
  width: 100%;
  padding: 10px 0;
  margin-top: 4px;
  background: none;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.profile-more-btn:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.15); }

/* ── Animations ── */
@keyframes profFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar {
    position: relative; top: 0;
    display: flex; gap: 12px; flex-wrap: wrap;
  }
  .sb-card { margin-bottom: 0; flex: 0 0 auto; }
  .profile-sidebar .toc { flex: 1; min-width: 200px; }
  .toc-list { flex-direction: row; flex-wrap: wrap; gap: 0; }
  .toc-list a { border-left: none; padding: 4px 8px; font-size: 11px; }
  .prof-synopsis { grid-template-columns: 1fr; }
  .infobox { order: -1; }
  .glance-grid { grid-template-columns: repeat(2, 1fr); }
  .pref-cards { grid-template-columns: 1fr; }
  .sw-grid { grid-template-columns: 1fr; }
  .stars-grid { grid-template-columns: 1fr; }
}

/* ── Stat baselines ── */
.gc-baseline {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

/* ── Synopsis AI source label ── */
.synopsis-source {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

@media (max-width: 480px) {
  .glance-grid { grid-template-columns: 1fr; }
  .run-entry { grid-template-columns: 50px 20px 1fr; }
}
