/* --- Global Variables & Themes --- */
:root {
  --bg-primary: #FAF9F6;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4F3EF;
  --text-main: #18181B;
  --text-muted: #71717A;
  --text-light: #A1A1AA;
  --border-color: #E4E2DC;
  --border-light: #ECEAE4;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.08);

  /* Category colors */
  --astro-color: #7C3AED;
  --astro-bg: #F5F3FF;
  --quantum-color: #0284C7;
  --quantum-bg: #F0F9FF;
  --fin-color: #059669;
  --fin-bg: #ECFDF5;
  --ai-color: #EA580C;
  --ai-bg: #FFF7ED;
  --bio-color: #0D9488;
  --bio-bg: #F0FDFA;
}

[data-theme="dark"] {
  --bg-primary: #0C0E12;
  --bg-card: #14171E;
  --bg-subtle: #1C2029;
  --text-main: #F4F4F6;
  --text-muted: #9CA3AF;
  --text-light: #6B7280;
  --border-color: #272B35;
  --border-light: #1F232D;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.5);

  --astro-color: #A78BFA;
  --astro-bg: rgba(124, 58, 237, 0.15);
  --quantum-color: #38BDF8;
  --quantum-bg: rgba(2, 132, 199, 0.15);
  --fin-color: #34D399;
  --fin-bg: rgba(5, 150, 105, 0.15);
  --ai-color: #FB923C;
  --ai-bg: rgba(234, 88, 12, 0.15);
  --bio-color: #2DD4BF;
  --bio-bg: rgba(13, 148, 136, 0.15);
}

/* --- Base & Layout --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  width: 100%;
}

.container {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 36px;
}

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
}

.brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-mark {
  font-size: 1.3rem;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.logo-text .tld {
  color: var(--accent);
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Date Picker & Archive Dropdown --- */
.date-picker-wrapper {
  position: relative;
  display: inline-block;
}

.date-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.date-picker-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.date-picker-btn .calendar-icon {
  font-size: 0.95rem;
}

.date-picker-btn .chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.date-picker-wrapper.open .date-picker-btn .chevron {
  transform: rotate(180deg);
}

.date-picker-wrapper.open .date-picker-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.date-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.date-picker-wrapper.open .date-dropdown-menu {
  display: flex;
}

.date-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.archive-count {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  font-size: 0.7rem;
}

.date-dropdown-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-dropdown-item {
  display: flex;
  flex-direction: column;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
  text-decoration: none;
  font-family: inherit;
}

.date-dropdown-item:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-light);
}

.date-dropdown-item.active {
  background-color: rgba(37, 99, 235, 0.08);
  border-color: var(--accent);
}

.date-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.date-item-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
}

.date-item-badge.badge-today {
  background: #10B981;
  color: #FFFFFF;
}

.date-item-badge.badge-past {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.date-item-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 3px;
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--border-color);
}

.btn-secondary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

/* --- Meta Strip (Ticker + Sponsor) --- */
.meta-strip {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stats-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sponsor-mini {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
}

.sponsor-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: 3px;
}

.sponsor-text {
  color: var(--text-muted);
}

.sponsor-text strong {
  color: var(--text-main);
}

.sponsor-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
}

/* --- 2-Column Main Layout --- */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
  margin-top: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.feed-column {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.sidebar-column {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-tag.sponsor-tag {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
}

.verified-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10B981;
}

.sponsor-card-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text-main);
}

.sponsor-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.sidebar-btn-cta {
  display: block;
  text-align: center;
  background: var(--text-main);
  color: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.sidebar-btn-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sponsor-footer-note {
  margin-top: 10px;
  text-align: center;
}

.sponsor-footer-note a {
  font-size: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
}

.sponsor-footer-note a:hover {
  color: var(--accent);
}

/* Scientific Pulse Card */
.sidebar-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
}

.sidebar-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.pulse-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pulse-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pulse-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.pulse-chip.active {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--bg-card) !important;
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent);
}

.pulse-chip .chip-count {
  font-size: 0.68rem;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 500;
}

[data-theme="dark"] .pulse-chip .chip-count {
  background: rgba(255, 255, 255, 0.12);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg-subtle);
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.metric-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.metric-num.highlight {
  color: #D97706;
}

.metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pro-upsell-box {
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.pro-upsell-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pro-upsell-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.pro-upsell-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.pro-upsell-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
}

@media (max-width: 980px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
  }
  .sidebar-column {
    position: static;
    width: 100%;
    max-width: 100%;
  }
}

/* --- Category Navigation & View Switcher --- */
.category-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.pill.active {
  background: var(--text-main);
  color: var(--bg-card);
  border-color: var(--text-main);
}

.pill .badge-count {
  font-size: 0.75rem;
  padding: 1px 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
}

.pill.active .badge-count {
  background: rgba(255,255,255,0.25);
}

.view-switcher {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.switch-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.switch-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* --- Editorial Rationale Box --- */
.editorial-box {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

.editorial-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 4px;
}

.editorial-box p {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* --- Featured Papers Grid --- */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 24px;
  margin-bottom: 48px;
  width: 100%;
  min-width: 0;
}

.expand-curated-box {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 24px;
}

.btn-expand-curated {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-expand-curated:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.paper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.paper-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--text-light);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.cat-badge.astrophysics { background: var(--astro-bg); color: var(--astro-color); }
.cat-badge.quantum { background: var(--quantum-bg); color: var(--quantum-color); }
.cat-badge.quant-finance { background: var(--fin-bg); color: var(--fin-color); }
.cat-badge.ai { background: var(--ai-bg); color: var(--ai-color); }
.cat-badge.biotech { background: var(--bio-bg); color: var(--bio-color); }

.impact-pill {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  padding: 3px 8px;
  border-radius: 4px;
}

.read-time {
  font-size: 0.74rem;
  color: var(--text-light);
  font-family: var(--font-mono);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.52rem;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 600;
}

.card-hook {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: 8px;
}

.card-authors {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --- Full Radar Section (Pro Firehose) --- */
.radar-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 48px;
}

.radar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.radar-header h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
}

.radar-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pro-tag-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pro-badge {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Radar & Feed Active Theme Filter Banner */
.radar-active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--text-main);
  gap: 12px;
  flex-wrap: wrap;
}

.radar-active-filter-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.radar-filter-tag-badge {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.82rem;
}

.btn-clear-filter {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-clear-filter:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
  color: var(--text-main);
}

.radar-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.radar-category-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  position: sticky;
  top: 0;
  z-index: 5;
}

.radar-category-divider:first-child {
  border-top: none;
}

.radar-category-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.radar-category-meta {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.radar-row {
  display: grid;
  grid-template-columns: 85px 170px 1fr 110px;
  align-items: center;
  gap: 20px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  transition: background 0.15s;
}

.radar-row:hover {
  background: var(--bg-subtle);
}

.radar-score {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.84rem;
  color: #D97706;
}

.radar-cat {
  font-size: 0.78rem;
  font-weight: 600;
}

.radar-content strong {
  display: block;
  color: var(--text-main);
  font-size: 0.94rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.radar-content span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.radar-action {
  text-align: right;
}

.radar-action a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  display: inline-block;
}

.radar-action a:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
}

/* --- Drawer (Slide-Over) --- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.paper-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 720px;
  background: var(--bg-card);
  z-index: 60;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.paper-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.drawer-content {
  padding: 28px;
  overflow-y: auto;
  flex-grow: 1;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-main);
}

.drawer-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.breakdown-block {
  margin-bottom: 24px;
}

.block-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hook-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.5;
}

.analogy-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  padding: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.impact-box {
  background: var(--fin-bg);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.takeaway-list {
  list-style: none;
  padding-left: 0;
}

.takeaway-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--text-main);
}

.takeaway-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.original-paper-box {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.original-paper-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.original-paper-name {
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 12px;
  color: var(--text-main);
}

.paper-links {
  display: flex;
  gap: 12px;
}

.btn-link {
  font-size: 0.82rem;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 500;
  transition: all 0.2s;
}

.btn-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Email CTA --- */
.email-cta {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-sm);
}

.email-cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.mini-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.8px;
}

.email-cta h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-top: 4px;
  margin-bottom: 8px;
}

.email-cta p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
}

.email-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.email-form input {
  flex-grow: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.email-form input:focus {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.9;
}

.subscribe-message {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fin-color);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-main); }

.disclaimer {
  font-size: 0.78rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .container { 
    padding: 0 16px; 
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    gap: 24px;
  }
  .feed-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .header-inner { 
    padding: 16px; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 14px; 
  }
  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .meta-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .sponsor-mini {
    width: 100%;
    box-sizing: border-box;
  }
  .category-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-pills {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 4px 2px 10px 2px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .pill {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .view-switcher {
    width: 100%;
    display: flex;
  }
  .switch-btn {
    flex: 1;
    text-align: center;
  }
  .papers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
  }
  .paper-card {
    padding: 18px 16px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .card-title {
    font-size: 1.15rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .card-hook {
    font-size: 0.88rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  /* Email CTA & Subscribe Form Mobile Responsive Stacking */
  .email-cta {
    padding: 24px 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 36px;
  }
  .email-cta-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
  }
  .email-cta-text {
    width: 100%;
  }
  .email-cta h2 {
    font-size: 1.4rem;
  }
  .email-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    box-sizing: border-box;
  }
  .email-form input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 13px 14px;
    font-size: 0.95rem;
  }
  .email-form .btn-primary {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
    padding: 13px 16px;
    font-size: 0.95rem;
    white-space: normal;
  }
  .radar-row { 
    grid-template-columns: 55px 1fr; 
    padding: 12px 10px;
  }
  .radar-cat, .radar-action { 
    display: none; 
  }
  .drawer-header {
    padding: 16px 18px;
  }
  .drawer-content {
    padding: 20px 16px;
  }
  .drawer-title {
    font-size: 1.45rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  .paper-card {
    padding: 16px 14px;
    border-radius: var(--radius-sm);
  }
  .card-title {
    font-size: 1.05rem;
  }
  .card-top {
    margin-bottom: 10px;
  }
  .card-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* --- Development Preview PIN Gate (PIN: 1222) --- */
.pin-gate-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #090B10;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(16px);
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

.pin-gate-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pin-gate-card {
  background: #12151D;
  border: 1px solid #232836;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.pin-gate-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: inline-block;
  animation: pulse 2.5s infinite;
}

.pin-gate-title {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: #F4F4F6;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.pin-gate-title .tld {
  color: var(--accent);
}

.pin-gate-sub {
  font-size: 0.85rem;
  color: #9CA3AF;
  margin-bottom: 22px;
  line-height: 1.4;
}

.pin-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.pin-input {
  background: #0C0E14;
  border: 1.5px solid #2D3344;
  color: #FFFFFF;
  font-size: 1.6rem;
  font-family: var(--font-mono);
  letter-spacing: 6px;
  text-align: center;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pin-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.pin-submit-btn {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s, transform 0.15s;
}

.pin-submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.pin-submit-btn:active {
  transform: translateY(0);
}

.pin-error {
  color: #EF4444;
  font-size: 0.82rem;
  font-weight: 500;
  min-height: 20px;
  margin-top: 4px;
}

.pin-input.shake {
  animation: shake 0.4s ease;
  border-color: #EF4444;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* --- Ask The Paper Interactive Copilot (Sleek Redesign) --- */
.ask-paper-box {
  margin-top: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.ask-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.ask-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
}

.pro-badge-mini {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ask-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
  padding: 4px 0;
  max-height: 380px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-msg {
  padding: 12px 18px;
  line-height: 1.6;
  font-size: 0.92rem;
  animation: fadeIn 0.25s ease-out;
}

.chat-msg.system {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  border: 1px dashed var(--border-color);
}

.chat-msg.user {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  max-width: 82%;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.chat-msg.bot {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 18px 18px 18px 4px;
  align-self: flex-start;
  max-width: 90%;
  box-shadow: var(--shadow-sm);
}

.chat-msg.bot .bot-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

/* Typing pulse animation */
.chat-msg.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: bounceDot 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Modern Pill Input Bar */
.ask-form {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 6px 4px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ask-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: var(--bg-card);
}

.ask-form input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.92rem;
  padding: 10px 0;
  outline: none;
}

.ask-form input::placeholder {
  color: var(--text-light);
}

.btn-ask {
  background: var(--text-main);
  color: var(--bg-card);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.btn-ask:hover {
  transform: scale(1.05);
  background: var(--accent);
}

.btn-ask:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --- Sleek Toast Notifications --- */
.gist-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.gist-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* --- Full Research Radar Table & Clickable Rows --- */
.radar-table-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.radar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.radar-row:hover {
  background-color: var(--bg-subtle);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.radar-score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: #D97706;
  white-space: nowrap;
  min-width: 65px;
}

.radar-cat {
  min-width: 130px;
}

.radar-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radar-content strong {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.35;
}

.radar-content span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.radar-action {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.radar-read-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.radar-action a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.radar-action a:hover {
  color: var(--text-main);
  border-color: var(--border-color);
  background-color: var(--bg-subtle);
}

/* --- Radar Drawer & On-Demand Deep Dive --- */
.on-demand-deepdive-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.on-demand-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.on-demand-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.on-demand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-generate-deepdive {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-generate-deepdive:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  opacity: 0.95;
}

.btn-generate-deepdive:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.abstract-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-main);
  max-height: 280px;
  overflow-y: auto;
}

/* --- Reader Mode / Audience Tabs (The Gist vs PhD Scholar) --- */
.drawer-mode-tabs {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.mode-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.mode-tab-btn:hover {
  color: var(--text-main);
}

.mode-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pro-preview-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* --- PhD Scholar Brief Layout --- */
.phd-brief-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.25s ease-out;
}

.phd-pro-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phd-pro-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phd-pro-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

.phd-pro-text strong {
  color: #7C3AED;
}

.phd-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.2s ease;
}

.phd-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.phd-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.phd-card-icon {
  font-size: 1rem;
}

.phd-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.phd-card-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-main);
}

.phd-card.highlight {
  border-left: 3px solid #7C3AED;
  background: rgba(124, 58, 237, 0.03);
}

.phd-card.warning {
  border-left: 3px solid #D97706;
  background: rgba(217, 119, 6, 0.03);
}

.phd-questions-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phd-question-item {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.15s ease;
}

.phd-question-item:hover {
  color: #7C3AED;
}

.phd-question-item::before {
  content: "❓";
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* Prompt to generate PhD brief */
.phd-generate-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(37, 99, 235, 0.06) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phd-generate-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.phd-generate-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.55;
  margin: 0;
}

.phd-generate-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.phd-feat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
}

.btn-generate-phd {
  background: linear-gradient(135deg, #7C3AED 0%, #4338CA 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-generate-phd:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  opacity: 0.95;
}

.btn-generate-phd:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

