/* ================================================================
   Geopolitical Economics Monthly — Style Sheet
   Design: FT / Economist editorial aesthetic
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Source Serif Pro', 'Noto Serif SC', serif;
  color: #1A1A1A;
  background: #FFF8F0;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #2C5F7C; text-decoration: none; transition: color 0.15s; }
a:hover { color: #1A3F5C; }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.muted { color: #777; font-size: 0.9rem; }
.hidden { display: none !important; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-weight: 700;
  line-height: 1.25;
}

.section-heading {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #E8E5E0;
}
.section-heading-sub {
  float: right;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #BBB;
}

/* ── Navigation ───────────────────────────────────────────────── */
.site-nav {
  background: #FFF;
  border-bottom: 2px solid #1A1A1A;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #8B0000;
  letter-spacing: 0.05em;
}
.nav-brand:hover { color: #6B0000; }

.nav-brand-group {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-shrink: 0;
}

.nav-inst {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.03em;
  margin-left: 0.4rem;
  padding-left: 0.4rem;
  border-left: 1px solid #DDD;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 0.15rem; align-items: center; }

.nav-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  opacity: 0.7;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: #DDD;
  margin: 0 0.5rem;
}

.nav-link {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #555;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: #F5F0EB; color: #1A1A1A; }
.nav-link.active { color: #8B0000; font-weight: 600; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: #555; padding: 0.25rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 52px; left: 0; right: 0;
    background: #FFF;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 2px solid #1A1A1A;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-divider { display: none; }
  .nav-link { padding: 0.6rem 0.5rem; }
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: #1A1A1A;
  color: #999;
  margin-top: auto;
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-right: 0.5rem;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #DDD;
}
.footer-subtitle { font-size: 0.75rem; color: #777; }
.footer-meta { font-size: 0.72rem; color: #888; letter-spacing: 0.02em; }

/* ── Hero — Masthead ──────────────────────────────────────────── */
.hero {
  background: #FFF;
  padding: 3.5rem 0 2rem;
  text-align: center;
  border-bottom: 3px double #1A1A1A;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}
.hero-subtitle {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  color: #555;
  font-weight: 400;
  letter-spacing: 0.15em;
}
.hero-issue {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: #8B0000;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #E8E5E0;
  display: inline-block;
}

/* Hero colophon (homepage attribution) */
.hero-colophon {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.hero-inst {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.08em;
}
.hero-authors {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.06em;
}

/* ── Digest strip ─────────────────────────────────────────────── */
.digest-strip {
  background: #FFF;
  border-bottom: 1px solid #E8E5E0;
  padding: 1.75rem 0;
}
.digest-strip .container {
  max-width: 1400px;
}
.digest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.digest-card {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.3rem;
  background: #FDFCFA;
  border: 1px solid #E8E5E0;
  border-top: 3px solid var(--topic-color, #CCC);
  border-radius: 3px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.digest-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

.digest-label {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--topic-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.45rem;
}
.digest-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #333;
  flex: 1;
}
.digest-lead {
  margin: 0 0 0.5rem 0;
}
.digest-bullets {
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: none;
}
.digest-bullets li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: #444;
  line-height: 1.45;
}
.digest-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--topic-color);
  font-size: 0.9rem;
  line-height: 1.45;
}
.digest-text p {
  margin: 0 0 0.55rem 0;
}
.digest-text p:last-child {
  margin-bottom: 0;
}
.digest-more {
  display: block;
  margin-top: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--topic-color);
  letter-spacing: 0.02em;
}

@media (max-width: 1000px) {
  .digest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .digest-grid { grid-template-columns: 1fr; }
}

/* ── Homepage grid ────────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 2rem; }
  .home-sidebar { order: -1; }
}

/* Topic entry cards */
.topic-cards { display: flex; flex-direction: column; gap: 0; }

.topic-entry-card {
  display: block;
  background: #FFF;
  border-bottom: 1px solid #E8E5E0;
  padding: 1rem 0;
  transition: background 0.15s;
}
.topic-entry-card:hover { background: rgba(0,0,0,0.008); }

.topic-entry-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.topic-entry-label {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.topic-entry-name {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1A1A1A;
  flex: 1;
}
.topic-entry-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: #BBB;
  font-weight: 500;
}
.topic-entry-count::after { content: ' 条'; }

/* T5 standalone entry link */
.t5-entry-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  background: #F8F7F4;
  border: 1px solid #E8E5E0;
  border-left: 3px solid var(--topic-color, #455A64);
  border-radius: 3px;
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.85rem;
  color: #555;
  transition: background 0.15s, box-shadow 0.15s;
}
.t5-entry-link:hover {
  background: #F0EEED;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  color: #333;
}
.t5-entry-name {
  font-weight: 600;
  color: #1A1A1A;
}
.t5-entry-count {
  color: #999;
  font-size: 0.78rem;
}
.t5-entry-arrow {
  margin-left: auto;
  color: #BBB;
  font-size: 1rem;
}

.topic-entry-preview {
  margin-top: 0.5rem;
  padding-left: 0;
  list-style: none;
}
.topic-entry-preview li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #555;
  padding: 0.1rem 0;
}
.preview-date {
  font-family: 'DM Sans', sans-serif;
  color: #BBB;
  flex-shrink: 0;
  width: 3rem;
  font-size: 0.78rem;
}
.preview-title { color: #444; min-width: 0; overflow-wrap: break-word; }

/* Sidebar papers */
.home-sidebar { padding-top: 0; }

.sidebar-papers { display: flex; flex-direction: column; gap: 0.9rem; }

.sidebar-paper-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #F0EDE8;
}
.sidebar-paper-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: #BBB;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.sidebar-paper-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1A1A1A;
}
.sidebar-paper-title:hover { color: #8B0000; }
.sidebar-paper-authors {
  font-size: 0.78rem;
  color: #999;
  font-style: italic;
}

.view-all-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8B0000;
  letter-spacing: 0.02em;
}
.view-all-link:hover { color: #6B0000; }

/* ── Topic page hero ──────────────────────────────────────────── */
.topic-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 3px solid var(--topic-color, #8B0000);
  background: #FFF;
}
.topic-hero-title {
  font-size: 1.6rem;
  color: #1A1A1A;
}
.topic-hero-period {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #999;
  margin-left: 0.5rem;
}

.lit-hero, .archive-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #E8E5E0;
  background: #FFF;
  text-align: center;
}
.lit-hero-title, .archive-hero-title {
  font-size: 1.8rem;
  color: #1A1A1A;
}
.lit-hero-subtitle, .archive-hero-subtitle {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  color: #777;
  margin-top: 0.2rem;
}

/* ── Homepage grid ────────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-sidebar { order: -1; }
}

/* Topic entry cards */
.topic-cards { display: flex; flex-direction: column; gap: 0.75rem; }

.topic-entry-card {
  display: block;
  background: #FFF;
  border: 1px solid #E8E5E0;
  border-left: 3px solid var(--topic-color, #8B0000);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.topic-entry-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left-color: var(--topic-color);
}

.topic-entry-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.topic-entry-id {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--topic-color);
  letter-spacing: 0.05em;
}
.topic-entry-name {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1A1A1A;
  flex: 1;
}
.topic-entry-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: #888;
}

.topic-entry-preview {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  padding-left: 0;
  border-top: 1px solid #F0EDE8;
  list-style: none;
}
.topic-entry-preview li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #555;
  padding: 0.15rem 0;
}
.preview-date {
  font-family: 'DM Sans', sans-serif;
  color: #999;
  flex-shrink: 0;
  width: 3rem;
}
.preview-title { color: #333; min-width: 0; overflow-wrap: break-word; }

/* Sidebar papers */
.home-sidebar { padding-top: 0.25rem; }

.sidebar-papers { display: flex; flex-direction: column; gap: 0; }

.sidebar-paper-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid #F0EDE8;
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-paper-item:hover { background: rgba(0,0,0,0.012); }

.sidebar-paper-brief { display: flex; flex-direction: column; gap: 0.1rem; }
.sidebar-paper-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: #999;
  font-weight: 500;
}
.sidebar-paper-title-text {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1A1A1A;
}
.sidebar-paper-authors-text {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

.sidebar-paper-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.sidebar-paper-expandable.expanded .sidebar-paper-detail {
  max-height: 400px;
}
.sidebar-paper-detail > div {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.5;
  margin-top: 0.3rem;
}
.sp-journal { color: #777; }
.sp-note { color: #444; }
.sp-data, .sp-method { color: #666; font-size: 0.75rem; }
.sp-cite { color: #999; font-size: 0.72rem; }
.sp-doi { margin-top: 0.2rem; }
.sp-doi a { font-size: 0.72rem; font-weight: 600; }

.view-all-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2C5F7C;
}
.view-all-link:hover { color: #8B0000; }

/* ── Homepage grid ── (moved to above .lit-hero) */

/* ── Topic page ───────────────────────────────────────────────── */
.topic-body { padding: 2rem 0 3rem; }

.topic-overview {
  margin-bottom: 2.5rem;
  padding: 1.5rem 2rem 1.75rem;
  background: #FFF;
  border: 1px solid #E8E5E0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* Editorial prose — used in overview text */
.editorial-prose {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #333;
}
.editorial-prose p {
  margin-bottom: 1.15rem;
  text-indent: 2em;
}
.editorial-prose p:first-child { text-indent: 0; }
.editorial-prose p:last-child { margin-bottom: 0; }
.editorial-prose strong {
  color: #1A1A1A;
  font-weight: 700;
}
.editorial-prose p:first-child strong:first-child {
  color: #8B0000;
}
/* Overview bullet list (Bloomberg Intelligence style) */
.editorial-prose ul.overview-list {
  margin: 0.5rem 0 1rem;
  padding: 0 0 0 1.2rem;
  list-style: none;
}
.editorial-prose ul.overview-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #333;
  text-indent: 0;
}
.editorial-prose ul.overview-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #8B0000;
  font-weight: 600;
}

.editorial-prose blockquote.overview-note {
  margin: 0.6rem 0 1rem;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 2px solid #ccc;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.5;
}

/* Overview collapsible */
.overview-text.collapsed {
  max-height: 12em;
  overflow: hidden;
  position: relative;
}
.overview-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4em;
  background: linear-gradient(transparent, #FFF);
  pointer-events: none;
}
.overview-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0;
  background: none;
  border: none;
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8B0000;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.overview-toggle:hover { color: #6B0000; }
.overview-toggle.hidden { display: none; }

/* Week groups */
.week-group { margin-bottom: 2rem; }
.week-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.week-date-range {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #999;
  font-weight: 400;
}

.event-list { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Event card (T1-T4) ──────────────────────────────────────── */
.event-card {
  background: #FFF;
  border: 1px solid #E8E5E0;
  border-radius: 3px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.event-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  user-select: none;
}

.event-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: #888;
  flex-shrink: 0;
  width: 3.5rem;
}

.event-type-tag {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  color: #FFF;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.event-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1A1A1A;
  flex: 1;
  line-height: 1.35;
}

.event-toggle {
  font-size: 0.85rem;
  color: #999;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.event-card.expanded .event-toggle { transform: rotate(90deg); }

.event-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.event-card.expanded .event-card-body {
  max-height: 600px;
}

.event-card-content {
  padding: 0 1rem 0.85rem;
  border-top: 1px solid #F0EDE8;
}

.event-summary { margin-top: 0.6rem; }
.event-summary p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #333;
  padding: 0.2rem 0;
}

.event-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.metric-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  background: #F0EDE8;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  color: #555;
}

.event-sources {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #888;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.event-sources a { font-weight: 500; }
.sources-label {
  font-weight: 600;
  color: #666;
}
.source-tier-text {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  color: #999;
  font-size: 0.75rem;
}
.source-sep { color: #CCC; }

.event-footnotes {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.event-footnotes .footnote-item {
  font-size: 0.72rem;
  color: #999;
  line-height: 1.4;
}

/* ── Event row (T5 compact) ──────────────────────────────────── */
.t5-event-list { display: flex; flex-direction: column; gap: 0; }

.event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #F0EDE8;
  cursor: pointer;
  transition: background 0.15s;
}
.event-row:hover { background: rgba(0,0,0,0.015); }

.event-row-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: #999;
  flex-shrink: 0;
  width: 2.8rem;
}

.event-row-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.event-row-type {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: #999;
  flex-shrink: 0;
  width: 5rem;
}

.event-row-title {
  font-size: 0.88rem;
  color: #333;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-row-arrow {
  font-size: 0.75rem;
  color: #CCC;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.event-row.expanded .event-row-arrow { transform: rotate(90deg); }

.event-row-detail {
  padding: 0 0.75rem 0 7rem;
  border-bottom: 1px solid #F0EDE8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
/* JS sets inline max-height; CSS sibling selector as fallback */
.event-row.expanded + .event-row-detail {
  max-height: 300px;
  padding: 0.6rem 0.75rem 0.8rem 7rem;
}

.event-row-summary {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.55;
  margin-bottom: 0.3rem;
}
.event-row-sources { font-size: 0.78rem; color: #888; }

.t5-hint { margin-top: 1.5rem; text-align: center; font-size: 0.82rem; }

/* ── Month selector ───────────────────────────────────────────── */
.month-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.month-selector-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #888;
}
.month-select {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #E0DDD8;
  border-radius: 4px;
  background: #FFF;
  color: #333;
  cursor: pointer;
}
.month-select:hover { border-color: #CCC; }

/* ── Literature page ──────────────────────────────────────────── */
.lit-body { padding: 1.5rem 0 3rem; }

.lit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #E0DDD8;
}

.lit-tabs { display: flex; gap: 0.25rem; }

.lit-tab {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid #E0DDD8;
  border-radius: 4px;
  background: #FFF;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}
.lit-tab:hover { border-color: #CCC; color: #1A1A1A; }
.lit-tab.active {
  background: #8B0000;
  color: #FFF;
  border-color: #8B0000;
}

.lit-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.lit-select {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #E0DDD8;
  border-radius: 4px;
  background: #FFF;
  color: #333;
}

.lit-search-input {
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #E0DDD8;
  border-radius: 4px;
  width: 180px;
  color: #333;
}
.lit-search-input::placeholder { color: #BBB; }

.lit-list { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Paper card ───────────────────────────────────────────────── */
.paper-card {
  background: #FFF;
  border: 1px solid #E8E5E0;
  border-radius: 3px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.paper-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.paper-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  user-select: none;
}

.paper-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: #999;
  flex-shrink: 0;
  width: 2.5rem;
}

.paper-tier-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #8B0000;
  color: #8B0000;
  background: transparent;
  flex-shrink: 0;
}

.paper-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1A1A1A;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.paper-toggle {
  font-size: 0.85rem;
  color: #999;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.paper-card.expanded .paper-toggle { transform: rotate(90deg); }

.paper-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.paper-card.expanded .paper-card-body { max-height: 800px; }

.paper-card-content {
  padding: 0 1rem 0.85rem;
  border-top: 1px solid #F0EDE8;
}

.paper-authors {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #555;
}

.paper-journal {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.2rem;
}

.paper-tier-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 2px;
  background: #F0EDE8;
  color: #555;
  margin-left: 0.35rem;
}

.paper-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.topic-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  background: transparent;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid;
}

.paper-abstract {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #444;
}

.paper-notes {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #8B0000;
  font-weight: 500;
}

.paper-data-method {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #555;
}
.paper-data-method span { display: block; line-height: 1.5; }
.paper-data-method strong {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.paper-doi {
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
}

/* ── Archive page ─────────────────────────────────────────────── */
.archive-body { padding: 2rem 0 3rem; }

.archive-month-card {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E0DDD8;
}
.archive-month-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.archive-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.archive-topic-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid #E8E5E0;
  border-left: 3px solid var(--topic-color, #888);
  border-radius: 4px;
  background: #FFF;
  transition: box-shadow 0.15s;
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
}
.archive-topic-link:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

.archive-topic-link--empty {
  color: #CCC;
  border-color: #F0EDE8;
  border-left-color: #E0DDD8;
  cursor: default;
}

.archive-topic-name { font-weight: 500; color: #333; }
.archive-topic-link--empty .archive-topic-name { color: #CCC; }
.archive-topic-count { color: #888; }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 0.95rem;
}

/* ── Responsive tweaks ────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-title { font-size: 1.6rem; }
  .topic-hero-title { font-size: 1.4rem; }
  .event-card-header { padding: 0.6rem 0.75rem; gap: 0.4rem; }
  .event-card-content { padding: 0 0.75rem 0.75rem; }
  .lit-toolbar { flex-direction: column; align-items: stretch; }
  .lit-filters { flex-direction: column; }
  .lit-search-input { width: 100%; }
}

/* ── Literature pagination ─────────────────────────────────────── */
.lit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}

.pager-btn {
  padding: 0.45rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--color-text);
  border-radius: 3px;
  transition: background 0.15s, border-color 0.15s;
}

.pager-btn:hover:not(:disabled) {
  background: #f5f5f0;
  border-color: #999;
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pager-info {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #666;
}

/* ── Tier two-level filter ── */
.tier-filter-wrap {
  position: relative;
  display: inline-block;
}

.tier-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--color-text);
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.tier-filter-btn:hover,
.tier-filter-btn.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: #fdf5f5;
}

.tier-filter-arrow {
  font-size: 0.75rem;
  transition: transform 0.15s;
}

.tier-filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 280px;
  padding: 0.5rem 0;
}

.tier-filter-panel.open {
  display: block;
}

.tier-row {
  border-bottom: 1px solid #f0f0ee;
}

.tier-row:last-of-type {
  border-bottom: none;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.tier-header:hover {
  background: #fafaf7;
}

.tier-check {
  display: flex;
  align-items: center;
}

.tier-master-cb {
  cursor: pointer;
  width: 14px;
  height: 14px;
  accent-color: var(--color-accent);
}

.tier-label {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  color: #333;
  cursor: pointer;
  line-height: 1.3;
}

.tier-expand-arrow {
  font-size: 0.7rem;
  color: #888;
  padding: 0 2px;
  transition: transform 0.15s;
}

.tier-journal-list {
  display: none;
  flex-direction: column;
  padding: 0.2rem 0.9rem 0.5rem 2.4rem;
  gap: 0.15rem;
  max-height: 220px;
  overflow-y: auto;
}

.tier-journal-list.open {
  display: flex;
}

.journal-cb-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: #555;
  cursor: pointer;
  padding: 0.2rem 0;
  line-height: 1.35;
}

.journal-cb-label:hover {
  color: var(--color-accent);
}

.journal-cb {
  margin-top: 2px;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.tier-filter-footer {
  padding: 0.5rem 0.9rem 0.4rem;
  border-top: 1px solid #f0f0ee;
  text-align: right;
}

.tier-clear-btn {
  padding: 0.28rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 3px;
  color: #666;
  transition: border-color 0.12s, color 0.12s;
}

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