/* ===== IELTS Research Report — v3 Editorial Redesign ===== */
/* Principles: progressive disclosure · one thing per card · color as signifier · breathing room */
/* Research-informed by Stripe, Linear, Apple HIG, Pitchfork, Brainscape, Notion, Our World in Data, A24 */

:root {
  /* Category colors — semantic, not decorative */
  --rpt-cat-people: #6366F1;
  --rpt-cat-people-light: #EEF2FF;
  --rpt-cat-people-bg: #E0E7FF;
  --rpt-cat-places: #0D9488;
  --rpt-cat-places-light: #F0FDFA;
  --rpt-cat-places-bg: #CCFBF1;
  --rpt-cat-events: #D97706;
  --rpt-cat-events-light: #FFFBEB;
  --rpt-cat-events-bg: #FEF3C7;
  --rpt-cat-objects: #7C3AED;
  --rpt-cat-objects-light: #F5F3FF;
  --rpt-cat-objects-bg: #EDE9FE;

  /* Status colors */
  --rpt-new: #16A34A;
  --rpt-new-light: #F0FDF4;
  --rpt-new-bg: #DCFCE7;
  --rpt-highfreq: #D97706;
  --rpt-highfreq-light: #FFFBEB;
  --rpt-highfreq-bg: #FEF3C7;

  /* Neutrals */
  --rpt-bg: #FAFBFC;
  --rpt-surface: #FFFFFF;
  --rpt-text: #1E293B;
  --rpt-text-secondary: #64748B;
  --rpt-text-tertiary: #94A3B8;
  --rpt-border: #E2E8F0;
  --rpt-border-light: #F1F5F9;

  /* Spacing scale */
  --rpt-space-xs: 4px;
  --rpt-space-sm: 8px;
  --rpt-space-md: 16px;
  --rpt-space-lg: 24px;
  --rpt-space-xl: 32px;
  --rpt-space-2xl: 48px;
  --rpt-space-3xl: 64px;

  /* Radii */
  --rpt-radius-sm: 8px;
  --rpt-radius: 12px;
  --rpt-radius-lg: 16px;
  --rpt-radius-xl: 20px;

  /* Shadows */
  --rpt-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --rpt-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --rpt-shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --rpt-shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --rpt-shadow-xl: 0 24px 48px rgba(0,0,0,0.12);

  /* Transitions */
  --rpt-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  background: var(--rpt-bg);
  color: var(--rpt-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TOP NAVIGATION ===== */
.rpt-nav {
  background: var(--rpt-surface);
  border-bottom: 2px solid var(--rpt-border);
  padding: 0 var(--rpt-space-lg);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--rpt-shadow-xs);
  backdrop-filter: blur(8px);
}
.rpt-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--rpt-space-sm);
  font-family: 'Inter', 'SF Pro Display', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--rpt-text);
  text-decoration: none;
  transition: color var(--rpt-transition);
}
.rpt-nav-brand:hover { color: var(--rpt-cat-people); }
.brand-emoji { font-size: 1.2rem; }
.rpt-nav-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
}

/* ===== LAYOUT: SIDEBAR + MAIN ===== */
.rpt-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--rpt-space-xl);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--rpt-space-xl);
  align-items: start;
}
.rpt-main {
  min-width: 0;
}

/* ===== SIDEBAR ===== */
.rpt-sidebar {
  position: sticky;
  top: 84px;
}
.rpt-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rpt-sidebar-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--rpt-text-tertiary);
  padding: 0 14px;
  margin-bottom: var(--rpt-space-sm);
}
.rpt-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--rpt-radius);
  text-decoration: none;
  color: var(--rpt-text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--rpt-transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.rpt-sidebar-item:hover {
  background: var(--rpt-border-light);
  color: var(--rpt-text);
}
.rpt-sidebar-item.active {
  background: var(--rpt-cat-people-light);
  color: var(--rpt-cat-people);
  font-weight: 700;
}
.rpt-sidebar-icon { font-size: 1rem; flex-shrink: 0; }
.rpt-sidebar-count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
  background: var(--rpt-border-light);
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}
.rpt-sidebar-item.active .rpt-sidebar-count {
  background: var(--rpt-cat-people-bg);
  color: var(--rpt-cat-people);
}
.rpt-sidebar-divider {
  height: 1px;
  background: var(--rpt-border);
  margin: var(--rpt-space-sm) 14px;
}
.rpt-sidebar-sub {
  display: block;
  padding: 8px 14px 8px 30px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rpt-text-secondary);
  text-decoration: none;
  border-radius: var(--rpt-radius-sm);
  transition: all var(--rpt-transition);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
}
.rpt-sidebar-sub:hover {
  background: var(--rpt-border-light);
  color: var(--rpt-text);
}

/* ===== HERO ===== */
.rpt-hero {
  text-align: center;
  padding: var(--rpt-space-2xl) var(--rpt-space-lg) var(--rpt-space-xl);
  position: relative;
}
.rpt-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.rpt-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--rpt-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--rpt-space-md);
}
.rpt-hero-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--rpt-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--rpt-space-xl);
  line-height: 1.65;
}
.rpt-hero-stats {
  display: flex;
  gap: var(--rpt-space-md);
  justify-content: center;
  flex-wrap: wrap;
}
.rpt-hero-stat {
  background: var(--rpt-surface);
  padding: var(--rpt-space-md) var(--rpt-space-lg);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-sm);
  border: 1px solid var(--rpt-border);
  min-width: 110px;
  text-align: center;
}
.rpt-hero-stat-num {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--rpt-cat-people);
  line-height: 1.1;
}
.rpt-hero-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ===== TABS ===== */
.rpt-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--rpt-space-xl);
  background: var(--rpt-surface);
  border-radius: var(--rpt-radius);
  padding: 5px;
  box-shadow: var(--rpt-shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rpt-tab {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
  cursor: pointer;
  border-radius: 10px;
  transition: all var(--rpt-transition);
  white-space: nowrap;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rpt-tab:hover { color: var(--rpt-text); background: var(--rpt-border-light); }
.rpt-tab.active {
  background: var(--rpt-cat-people);
  color: #fff;
  box-shadow: var(--rpt-shadow-sm);
}
.rpt-tab-icon { font-size: 0.9rem; }

/* ===== PANELS ===== */
.rpt-panel { display: none; }
.rpt-panel.active { display: block; }

/* ===== SECTION HEADERS ===== */
.rpt-section-header {
  margin-bottom: var(--rpt-space-lg);
}
.rpt-section-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rpt-text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.rpt-section-header p {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--rpt-text-secondary);
  max-width: 520px;
}

/* ===== SEARCH & FILTER BAR ===== */
.rpt-search-wrap {
  background: var(--rpt-surface);
  border-radius: var(--rpt-radius-lg);
  padding: var(--rpt-space-md) var(--rpt-space-lg);
  border: 1px solid var(--rpt-border);
  box-shadow: var(--rpt-shadow-sm);
  margin-bottom: var(--rpt-space-lg);
}
.rpt-search-row {
  display: flex;
  gap: var(--rpt-space-sm);
  align-items: center;
  flex-wrap: wrap;
}
.rpt-search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid var(--rpt-border);
  border-radius: var(--rpt-radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--rpt-text);
  background: var(--rpt-bg);
  transition: border-color var(--rpt-transition);
}
.rpt-search-input:focus {
  outline: none;
  border-color: var(--rpt-cat-people);
  background: var(--rpt-surface);
}
.rpt-search-input::placeholder { color: var(--rpt-text-tertiary); }
.rpt-filter-select {
  padding: 10px 34px 10px 12px;
  border: 2px solid var(--rpt-border);
  border-radius: var(--rpt-radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rpt-text);
  background: var(--rpt-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--rpt-transition);
  min-width: 140px;
}
.rpt-filter-select:focus {
  outline: none;
  border-color: var(--rpt-cat-people);
  background: var(--rpt-surface);
}

/* Filter chips */
.rpt-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: var(--rpt-space-sm);
}
.rpt-filter-chip {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--rpt-border);
  background: transparent;
  color: var(--rpt-text-secondary);
  cursor: pointer;
  transition: all var(--rpt-transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.rpt-filter-chip:hover { background: var(--rpt-border-light); color: var(--rpt-text); }
.rpt-filter-chip.active {
  background: var(--rpt-cat-people-light);
  border-color: var(--rpt-cat-people-bg);
  color: var(--rpt-cat-people);
}
.rpt-results-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
  margin-bottom: var(--rpt-space-md);
}
.rpt-results-count strong { color: var(--rpt-cat-people); }
.rpt-empty-search {
  text-align: center;
  padding: var(--rpt-space-2xl);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--rpt-text-tertiary);
}

/* ===== PART 1: ACCORDION ===== */
.rpt-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--rpt-space-xl);
}
.rpt-accordion-item {
  background: var(--rpt-surface);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius);
  overflow: hidden;
  box-shadow: var(--rpt-shadow-xs);
  transition: all var(--rpt-transition);
}
.rpt-accordion-item:hover {
  box-shadow: var(--rpt-shadow-sm);
  border-color: var(--rpt-border);
}
.rpt-accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s;
}
.rpt-accordion-header:hover { background: var(--rpt-bg); }
.rpt-accordion-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--rpt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.rpt-accordion-icon.place { background: var(--rpt-cat-places-bg); }
.rpt-accordion-icon.event { background: var(--rpt-cat-events-bg); }
.rpt-accordion-icon.object { background: var(--rpt-cat-objects-bg); }
.rpt-accordion-icon.people { background: var(--rpt-cat-people-bg); }

.rpt-accordion-title {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rpt-text);
  line-height: 1.3;
}
.rpt-accordion-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.rpt-accordion-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.rpt-accordion-tag.people { background: var(--rpt-cat-people-bg); color: var(--rpt-cat-people); }
.rpt-accordion-tag.places { background: var(--rpt-cat-places-bg); color: var(--rpt-cat-places); }
.rpt-accordion-tag.events { background: var(--rpt-cat-events-bg); color: var(--rpt-cat-events); }
.rpt-accordion-tag.objects { background: var(--rpt-cat-objects-bg); color: var(--rpt-cat-objects); }

.rpt-accordion-freq {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--rpt-highfreq);
  background: var(--rpt-highfreq-bg);
  padding: 3px 10px;
  border-radius: 6px;
}
.rpt-accordion-new-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--rpt-new);
  background: var(--rpt-new-bg);
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}
.rpt-accordion-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--rpt-text-tertiary);
  transition: transform 0.25s ease;
}
.rpt-accordion-item.open .rpt-accordion-arrow {
  transform: rotate(180deg);
  color: var(--rpt-cat-people);
}
.rpt-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.rpt-accordion-item.open .rpt-accordion-body {
  max-height: 600px;
}
.rpt-accordion-content {
  padding: 0 18px 16px 66px;
}
.rpt-accordion-question {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.88rem;
  color: var(--rpt-text);
  padding: 8px 0;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--rpt-border-light);
}
.rpt-accordion-question:last-child { border-bottom: none; }
.rpt-accordion-qnum {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rpt-cat-people-light);
  color: var(--rpt-cat-people);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ===== CATEGORY SECTION HEADINGS ===== */
.rpt-cat-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rpt-text);
  margin: var(--rpt-space-lg) 0 var(--rpt-space-sm);
  display: flex;
  align-items: center;
  gap: var(--rpt-space-sm);
}
.rpt-cat-heading:first-child { margin-top: 0; }
.rpt-cat-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rpt-text-secondary);
  background: var(--rpt-border-light);
  padding: 2px 10px;
  border-radius: 10px;
}

/* ===== PART 2: CUE CARD GRID ===== */
.rpt-cuecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: var(--rpt-space-xl);
}
.rpt-cuecard {
  background: var(--rpt-surface);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-xs);
  overflow: hidden;
  transition: all var(--rpt-transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
}
/* Color accent strip — the only visual category indicator */
.rpt-cuecard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  transition: width var(--rpt-transition);
}
.rpt-cuecard.cat-people::before { background: var(--rpt-cat-people); }
.rpt-cuecard.cat-places::before { background: var(--rpt-cat-places); }
.rpt-cuecard.cat-events::before { background: var(--rpt-cat-events); }
.rpt-cuecard.cat-objects::before { background: var(--rpt-cat-objects); }

.rpt-cuecard:hover {
  box-shadow: var(--rpt-shadow-md);
  border-color: var(--rpt-border);
  transform: translateY(-1px);
}
.rpt-cuecard:hover::before { width: 4px; }

.rpt-cuecard-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.rpt-cuecard-topic {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rpt-text);
  line-height: 1.35;
  margin-bottom: var(--rpt-space-xs);
}
.rpt-cuecard-hint {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.82rem;
  color: var(--rpt-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: auto;
}
.rpt-cuecard-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--rpt-border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rpt-cuecard-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rpt-cuecard-tag.people { background: var(--rpt-cat-people-bg); color: var(--rpt-cat-people); }
.rpt-cuecard-tag.places { background: var(--rpt-cat-places-bg); color: var(--rpt-cat-places); }
.rpt-cuecard-tag.events { background: var(--rpt-cat-events-bg); color: var(--rpt-cat-events); }
.rpt-cuecard-tag.objects { background: var(--rpt-cat-objects-bg); color: var(--rpt-cat-objects); }
.rpt-cuecard-new-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--rpt-new);
  background: var(--rpt-new-bg);
  padding: 2px 8px;
  border-radius: 5px;
  text-transform: uppercase;
}

/* ===== FREQUENCY TAGS ===== */
.rpt-freq-extreme {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #DC2626, #EA580C);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.rpt-freq-high {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #EA580C, #F59E0B);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== ALL-TIME RANKINGS — EXPANDABLE ROWS ===== */
.rpt-rank-header {
  padding: 10px 14px !important;
  min-height: auto !important;
}
.rpt-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}
.rpt-rank-pos {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rpt-text-muted);
  min-width: 24px;
  text-align: center;
}
.rpt-rank-medal {
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
}
.rpt-rank-topic {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rpt-text);
  line-height: 1.4;
  min-width: 160px;
}
.rpt-rank-type {
  flex-shrink: 0;
}
.rpt-rank-seasons {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rpt-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rpt-rank-header .rpt-accordion-arrow {
  margin-left: auto;
}
@media (max-width: 640px) {
  .rpt-rank-row { gap: 8px; }
  .rpt-rank-topic { font-size: 0.75rem; min-width: 120px; }
  .rpt-rank-seasons { font-size: 0.65rem; }
  .rpt-freq-extreme, .rpt-freq-high { font-size: 0.55rem; padding: 2px 6px; }
}

/* ===== HOT TOPICS GRID ===== */
.rpt-hottopics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--rpt-space-md);
  margin-bottom: var(--rpt-space-2xl);
}
.rpt-ht-card {
  background: var(--rpt-surface);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}
.rpt-ht-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--rpt-radius-lg) 0 0 var(--rpt-radius-lg);
}
.rpt-ht-card.cat-people::before { background: var(--rpt-cat-people); }
.rpt-ht-card.cat-places::before { background: var(--rpt-cat-places); }
.rpt-ht-card.cat-events::before { background: var(--rpt-cat-events); }
.rpt-ht-card.cat-objects::before { background: var(--rpt-cat-objects); }
.rpt-ht-card:hover {
  box-shadow: var(--rpt-shadow-md);
  transform: translateY(-2px);
}
.rpt-ht-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--rpt-space-md) var(--rpt-space-md) 0 var(--rpt-space-md);
}
.rpt-ht-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.rpt-ht-card-title {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rpt-text);
  line-height: 1.4;
}
.rpt-ht-tag-extreme {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #DC2626, #EA580C);
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rpt-ht-tag-hot {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #EA580C, #F59E0B);
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rpt-ht-card-body {
  padding: var(--rpt-space-sm) var(--rpt-space-md) var(--rpt-space-md) calc(var(--rpt-space-md) + 30px);
}
.rpt-ht-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rpt-ht-bullets li {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--rpt-text-muted);
  line-height: 1.6;
  padding: 3px 0;
  position: relative;
  padding-left: 16px;
}
.rpt-ht-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--rpt-text-light);
}

/* ===== CARD DETAIL OVERLAY ===== */
.rpt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--rpt-space-lg);
  animation: rpt-overlay-in 0.2s ease;
}
.rpt-overlay.open { display: flex; }
@keyframes rpt-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rpt-overlay-card {
  background: var(--rpt-surface);
  border-radius: var(--rpt-radius-xl);
  box-shadow: var(--rpt-shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: rpt-card-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes rpt-card-in {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.rpt-overlay-close {
  position: sticky;
  top: 0;
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--rpt-border-light);
  color: var(--rpt-text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 12px 0 0;
  z-index: 10;
  transition: all var(--rpt-transition);
}
.rpt-overlay-close:hover {
  background: var(--rpt-border);
  color: var(--rpt-text);
}
.rpt-overlay-content {
  padding: 0 var(--rpt-space-lg) var(--rpt-space-lg);
}

/* Detail card header */
.rpt-detail-header {
  margin-bottom: var(--rpt-space-md);
}
.rpt-detail-category {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.rpt-detail-category.people { color: var(--rpt-cat-people); }
.rpt-detail-category.places { color: var(--rpt-cat-places); }
.rpt-detail-category.events { color: var(--rpt-cat-events); }
.rpt-detail-category.objects { color: var(--rpt-cat-objects); }
.rpt-detail-topic {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rpt-text);
  line-height: 1.25;
  margin-bottom: var(--rpt-space-xs);
}
.rpt-detail-source {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--rpt-text-tertiary);
}

/* Detail prompt box */
.rpt-detail-prompt {
  padding: var(--rpt-space-md);
  border-radius: var(--rpt-radius);
  margin-bottom: var(--rpt-space-md);
}
.rpt-detail-prompt.people { background: var(--rpt-cat-people-light); border: 1px solid var(--rpt-cat-people-bg); }
.rpt-detail-prompt.places { background: var(--rpt-cat-places-light); border: 1px solid var(--rpt-cat-places-bg); }
.rpt-detail-prompt.events { background: var(--rpt-cat-events-light); border: 1px solid var(--rpt-cat-events-bg); }
.rpt-detail-prompt.objects { background: var(--rpt-cat-objects-light); border: 1px solid var(--rpt-cat-objects-bg); }

.rpt-detail-describe {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rpt-text);
  margin-bottom: var(--rpt-space-sm);
  line-height: 1.4;
}
.rpt-detail-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rpt-text-secondary);
  margin-bottom: var(--rpt-space-sm);
}
.rpt-detail-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--rpt-space-sm);
}
.rpt-detail-bullet {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9rem;
  color: var(--rpt-text);
  padding: 4px 0;
  line-height: 1.6;
  display: flex;
  gap: 8px;
}
.rpt-detail-bullet-dot {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--rpt-cat-people);
}
.rpt-detail-explain {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.88rem;
  color: var(--rpt-text-secondary);
  font-style: italic;
  line-height: 1.6;
  padding-top: var(--rpt-space-sm);
  border-top: 1px solid var(--rpt-border-light);
  margin-top: var(--rpt-space-sm);
}

/* Detail badges row */
.rpt-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: var(--rpt-space-md);
}
.rpt-detail-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.rpt-detail-badge.new {
  background: var(--rpt-new-bg);
  color: var(--rpt-new);
}

/* ===== PART 2 CATEGORY HEADINGS ===== */
.rpt-p2-cat-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--rpt-text);
  margin: var(--rpt-space-xl) 0 var(--rpt-space-sm);
  display: flex;
  align-items: center;
  gap: var(--rpt-space-sm);
}
.rpt-p2-cat-heading:first-child { margin-top: 0; }

/* ===== RANKINGS TABLE ===== */
.rpt-table-wrap {
  background: var(--rpt-surface);
  border-radius: var(--rpt-radius-lg);
  border: 1px solid var(--rpt-border);
  box-shadow: var(--rpt-shadow-xs);
  overflow: hidden;
  margin-bottom: var(--rpt-space-xl);
}
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}
.rpt-table thead {
  background: var(--rpt-bg);
  border-bottom: 2px solid var(--rpt-border);
}
.rpt-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rpt-text-secondary);
}
.rpt-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rpt-border-light);
  color: var(--rpt-text);
  vertical-align: middle;
}
.rpt-table tbody tr:last-child td { border-bottom: none; }
.rpt-table tbody tr:hover { background: var(--rpt-bg); }
.rpt-table .rank-col { width: 50px; font-weight: 700; font-size: 1rem; color: var(--rpt-text-secondary); }
.rpt-table .medal-col { width: 36px; font-size: 1.1rem; text-align: center; }
.rpt-table .topic-col { font-weight: 600; font-size: 0.85rem; }
.rpt-table .seasons-col {
  font-weight: 700;
  color: var(--rpt-cat-people);
  text-align: center;
  width: 80px;
}
.rpt-table .type-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rpt-table .type-tag.people { background: var(--rpt-cat-people-bg); color: var(--rpt-cat-people); }
.rpt-table .type-tag.places { background: var(--rpt-cat-places-bg); color: var(--rpt-cat-places); }
.rpt-table .type-tag.events { background: var(--rpt-cat-events-bg); color: var(--rpt-cat-events); }
.rpt-table .type-tag.objects { background: var(--rpt-cat-objects-bg); color: var(--rpt-cat-objects); }

/* ===== INSIGHTS SECTION ===== */
.rpt-insights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--rpt-space-md);
  margin-bottom: var(--rpt-space-xl);
}
.rpt-insight-card {
  background: var(--rpt-surface);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius-lg);
  padding: var(--rpt-space-lg);
  box-shadow: var(--rpt-shadow-xs);
  transition: all var(--rpt-transition);
}
.rpt-insight-card:hover {
  box-shadow: var(--rpt-shadow-md);
  border-color: var(--rpt-cat-people-bg);
}
.rpt-insight-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--rpt-cat-people);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--rpt-space-sm);
}
.rpt-insight-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rpt-text);
  margin-bottom: var(--rpt-space-sm);
  line-height: 1.3;
}
.rpt-insight-detail {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--rpt-text-secondary);
  line-height: 1.6;
}

/* ===== RECOMMENDATIONS ===== */
.rpt-recos {
  background: linear-gradient(135deg, var(--rpt-cat-people-light), var(--rpt-bg));
  border: 1px solid var(--rpt-cat-people-bg);
  border-radius: var(--rpt-radius-xl);
  padding: var(--rpt-space-xl);
  margin-bottom: var(--rpt-space-xl);
}
.rpt-recos h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rpt-text);
  margin-bottom: var(--rpt-space-md);
}
.rpt-recos ul { list-style: none; padding: 0; }
.rpt-recos li {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--rpt-text);
  padding: 10px 0;
  border-bottom: 1px solid rgba(99,102,241,0.1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.rpt-recos li:last-child { border-bottom: none; }
.rpt-reco-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rpt-cat-people);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ===== METHODOLOGY ===== */
.rpt-methodology {
  background: var(--rpt-surface);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius-lg);
  padding: var(--rpt-space-lg);
  margin-bottom: var(--rpt-space-md);
  box-shadow: var(--rpt-shadow-xs);
}
.rpt-methodology h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rpt-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--rpt-space-md);
}
.rpt-methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--rpt-space-sm);
}
.rpt-method-item {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--rpt-text-secondary);
  line-height: 1.5;
}
.rpt-method-item strong {
  color: var(--rpt-text);
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* ===== FOOTER ===== */
.rpt-footer {
  text-align: center;
  padding: var(--rpt-space-lg);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--rpt-text-tertiary);
  border-top: 1px solid var(--rpt-border);
  margin-top: var(--rpt-space-xl);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .rpt-layout {
    grid-template-columns: 1fr;
    padding: var(--rpt-space-md);
    gap: var(--rpt-space-md);
  }
  .rpt-sidebar {
    position: static;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--rpt-space-sm);
  }
  .rpt-sidebar-nav {
    flex-direction: row;
    gap: 4px;
  }
  .rpt-sidebar-label { display: none; }
  .rpt-sidebar-divider { display: none; }
  .rpt-sidebar-item {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: var(--rpt-radius-sm);
  }
  .rpt-sidebar-count { display: none; }
  .rpt-sidebar-sub {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}
@media (max-width: 768px) {
  .rpt-hero h1 { font-size: 2rem; }
  .rpt-hero-stats { gap: var(--rpt-space-sm); }
  .rpt-hero-stat { min-width: 90px; padding: 12px 16px; }
  .rpt-hero-stat-num { font-size: 1.4rem; }
  .rpt-hero-desc { font-size: 0.84rem; }

  .rpt-cuecard-grid { grid-template-columns: 1fr; }
  .rpt-insights { grid-template-columns: 1fr; }
  .rpt-section-header h2 { font-size: 1.3rem; }

  .rpt-table { font-size: 0.76rem; }
  .rpt-table th, .rpt-table td { padding: 10px 12px; }

  .rpt-search-row { flex-direction: column; }
  .rpt-filter-select { width: 100%; }

  .rpt-recos { padding: var(--rpt-space-lg); }
  .rpt-methodology-grid { grid-template-columns: 1fr 1fr; }

  .rpt-tab { padding: 10px 12px; font-size: 0.78rem; }
  .rpt-tab-icon { display: none; }

  .rpt-accordion-content { padding: 0 12px 14px 46px; }
  .rpt-accordion-header { padding: 12px 14px; }
  .rpt-accordion-badges { flex-wrap: wrap; }

  .rpt-overlay-card { max-width: 100%; margin: 0; border-radius: var(--rpt-radius-lg); }
  .rpt-overlay { padding: var(--rpt-space-sm); align-items: flex-end; }

  .rpt-filter-chips { gap: 4px; }
  .rpt-filter-chip { font-size: 0.7rem; padding: 4px 10px; }
}

/* ===== PRINT ===== */
@media print {
  .rpt-nav { position: static; }
  .rpt-sidebar { display: none; }
  .rpt-layout { display: block; max-width: 100%; }
  .rpt-cuecard:hover { transform: none; box-shadow: var(--rpt-shadow-xs); }
  .rpt-overlay { display: none !important; }
}

/* ===== 必考题 MOBILE ===== */
@media (max-width: 640px) {
  .rpt-section-header h2 { font-size: 1.2rem; }
  /* One card per row: questions and vocab stack vertically */
  #panel-bikao ul li {
    width: 100%;
    margin: 4px 0;
  }
  #panel-bikao .rpt-hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  #panel-bikao .rpt-hero-stat-num { font-size: 1.5rem; }
  #panel-bikao .rpt-hero-stat-label { font-size: 0.7rem; }
}
.rpt-hl{background:#fef08a;color:#1e293b;padding:0 2px;border-radius:2px;font-weight:600}

/* ═══ SIDEBAR PILLS ═══ */
/* ═══ UNIFIED SIDEBAR CARDS ═══ */
.rpt-sb-card {
  background: var(--rpt-card-bg, #f8fafc);
  border: 1px solid var(--rpt-border, #e2e8f0);
  border-radius: var(--rpt-radius, 12px);
  overflow: hidden;
  margin-bottom: 12px;
}
.rpt-sb-card.rpt-sb-keebot {
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  border-color: #e9d5ff;
}
.rpt-sb-card-head {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--rpt-text-tertiary, #94a3b8);
  padding: 12px 14px 6px;
}
.rpt-sb-keebot .rpt-sb-card-head { color: #6d28d9; }
.rpt-sb-card-body {
  padding: 6px 10px 12px;
}
.rpt-sb-card-body p {
  font-size: 0.75rem;
  color: var(--rpt-text-secondary, #64748b);
  margin: 0 4px 8px;
  line-height: 1.4;
}
.rpt-sb-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 4px;
}
.rpt-sb-chip {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  background: #ede9fe;
  color: #6d28d9;
  transition: all 0.2s;
}
.rpt-sb-chip:hover {
  background: #ddd6fe;
  color: #5b21b6;
}
.rpt-sb-views .rpt-sidebar-item {
  margin: 1px 4px;
  padding: 8px 10px;
  border-radius: 8px;
}
.rpt-sb-divider {
  height: 1px;
  background: #e9d5ff;
  margin: 10px 4px;
}
.rpt-sb-book-title {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: var(--rpt-text, #1e293b) !important;
  margin-bottom: 8px !important;
}
.rpt-keebot-btn {
  width: calc(100% - 8px);
  margin: 0 4px 6px;
  padding: 8px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.rpt-keebot-btn:hover { background: #6d28d9; }
.rpt-booking-btn {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rpt-booking-wechat { background: #07c160; color: #fff; }
.rpt-booking-wechat:hover { background: #06a050; }
.rpt-booking-wa { background: #25d366; color: #fff; }
.rpt-booking-wa:hover { background: #1ebe57; }
.rpt-copy-hint { font-size: 0.65rem; opacity: 0.7; font-weight: 400; }

/* ═══ COPY TOAST ═══ */
.rpt-copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10000;
  animation: rptToastIn 0.3s ease;
}
@keyframes rptToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
