/* ==========================================================================
   PARENTING NOTES (育儿有术) - DESIGN SYSTEM & STYLESHEET
   Bilingual Editorial Reading Experience for Thoughtful Families
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Color Theme: Paper (Default - 宣纸暖柔) */
  --bg-app: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F5EFEB;
  --bg-surface-elevated: #FFFFFF;
  --bg-card-hover: #FDFBF7;
  --bg-quote: #F7EFE6;
  --bg-badge: #EFE8DE;

  --text-main: #23201D;
  --text-body: #3A3530;
  --text-muted: #7A746B;
  --text-subtle: #9E978D;
  --text-inverse: #FAF8F5;

  --border-subtle: #EAE3D8;
  --border-strong: #D6CCC0;
  --border-focus: #9E472A;

  --accent-primary: #9E472A; /* Heritage terracotta / warm bronze */
  --accent-primary-hover: #82381E;
  --accent-soft: #F9EFE9;
  --accent-gold: #C07D38;
  --accent-gold-soft: #FBF4E9;

  --shadow-sm: 0 1px 3px rgba(35, 32, 29, 0.05);
  --shadow-md: 0 4px 12px rgba(35, 32, 29, 0.08);
  --shadow-lg: 0 12px 32px rgba(35, 32, 29, 0.12);
  --shadow-drawer: -4px 0 24px rgba(35, 32, 29, 0.14);

  /* Font Families */
  --font-serif: "Newsreader", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "Georgia", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", monospace;

  /* Typography Sizing (Scale Factor) */
  --scale: 1;
  --font-size-base: calc(17px * var(--scale));
  --line-height-body: 1.85;

  /* Layout dimensions */
  --reading-max-width: 720px;
  --container-max-width: 1180px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Color Theme: Light (清爽纯白) */
[data-theme="light"] {
  --bg-app: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F1F3F5;
  --bg-surface-elevated: #FFFFFF;
  --bg-card-hover: #F8F9FA;
  --bg-quote: #F1F3F7;
  --bg-badge: #E9ECEF;

  --text-main: #1A1A1A;
  --text-body: #333333;
  --text-muted: #6C757D;
  --text-subtle: #ADB5BD;

  --border-subtle: #E9ECEF;
  --border-strong: #CED4DA;
  --border-focus: #2B6CB0;

  --accent-primary: #8C3B1E;
  --accent-primary-hover: #702E15;
  --accent-soft: #FBF1EC;
  --accent-gold: #B36B24;
  --accent-gold-soft: #FAF2E8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
  --shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.12);
}

/* Color Theme: Night (柔夜护眼) */
[data-theme="night"] {
  --bg-app: #151413;
  --bg-surface: #1E1C1A;
  --bg-surface-subtle: #282522;
  --bg-surface-elevated: #2A2724;
  --bg-card-hover: #262421;
  --bg-quote: #23201D;
  --bg-badge: #302C28;

  --text-main: #EFEBE5;
  --text-body: #D4CDC3;
  --text-muted: #9E9588;
  --text-subtle: #756D62;
  --text-inverse: #151413;

  --border-subtle: #2E2B27;
  --border-strong: #443F39;
  --border-focus: #D4794C;

  --accent-primary: #D4794C;
  --accent-primary-hover: #E89267;
  --accent-soft: #30211A;
  --accent-gold: #DCA159;
  --accent-gold-soft: #2F261B;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.6);
}

/* Font Size Scales */
[data-font-size="small"] { --scale: 0.9; }
[data-font-size="normal"] { --scale: 1; }
[data-font-size="large"] { --scale: 1.15; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

body {
  background-color: var(--bg-app);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Top Pinned Navigation Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.site-header__inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-anchor {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}
.buffett-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding-right: 16px;
  border-right: 1px solid var(--border-strong);
  color: var(--accent-primary);
  font-size: 13px;
  white-space: nowrap;
}
.buffett-home:hover, .buffett-home:focus-visible { text-decoration: underline; }
.site-header__inner > .header-actions { margin-left: auto; }
@media (max-width: 760px) {
  .site-header { height: auto; }
  .site-header .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 4px;
    padding-block: 2px 5px;
  }
  .buffett-home { grid-column: 1 / -1; justify-self: start; border: 0; min-height: 26px; }
  .site-header .header-context { display: none; }
  .article-card, .theme-group { scroll-margin-top: 90px; }
}

.brand-seal {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-primary);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(158, 71, 42, 0.25);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Header Middle - Context Indicator (Reading Progress) */
.header-context {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.header-context.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-context__pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bg-badge);
  color: var(--accent-primary);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.header-context__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Utilities (Language, Theme, Font, Poster) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-icon:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.lang-toggle {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.lang-toggle .language-switch, .lang-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.is-active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.btn-poster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-poster:hover {
  background: var(--accent-primary);
  color: #FFF;
  border-color: var(--accent-primary);
}

/* Reading Progress Bar attached to header bottom */
.reading-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: var(--accent-primary);
  transition: width 0.1s linear;
  z-index: 101;
}

/* --- Layout Container --- */
.main-content {
  flex: 1;
  max-width: var(--container-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ==========================================================================
   CATALOG PAGE (目录总览页)
   ========================================================================== */
.catalog-view {
  display: block;
}

/* Hero Section */
.hero-editorial {
  padding: 40px 0 32px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 36px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-editorial__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-editorial__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-editorial__subhead {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 24px;
}

.hero-editorial__stats {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 500;
}

.hero-editorial__stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Problem-Oriented Dilemma Fast Track (家长高频痛点速寻) */
.dilemma-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.dilemma-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.dilemma-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dilemma-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.dilemma-heading {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.dilemma-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.dilemma-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dilemma-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.dilemma-chip:hover {
  background: var(--bg-quote);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.dilemma-chip.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(158, 71, 42, 0.25);
}

.dilemma-chip__count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}

.dilemma-chip.is-active .dilemma-chip__count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFF;
}

/* Control Bar: Search + Density + Theme Filter */
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 280px;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  display: none;
}

.search-clear-btn.is-visible {
  display: block;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.view-mode-toggle {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.view-mode-btn {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.view-mode-btn.is-active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* Theme Filter Sticky Pills */
.theme-nav-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.theme-pill-btn {
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-pill-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
}

.theme-pill-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

/* Theme Group & Article Card Stream */
.theme-group {
  margin-bottom: 56px;
}

.theme-group__header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-subtle);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-group__title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.theme-group__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 1px;
}

.theme-group__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.theme-group__summary {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  width: 100%;
}

.theme-group__range {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* Detailed Card Grid */
.articles-grid--detailed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all var(--transition-normal);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.article-card:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.article-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.article-card__id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
}

.article-card__status {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.article-card__theme-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.article-card__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.article-card:hover .article-card__title {
  color: var(--accent-primary);
}

.article-card__subtitle {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
  border-left: 2px solid var(--border-subtle);
  padding-left: 10px;
}

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: auto;
}

.article-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.article-card__tag {
  background: var(--bg-badge);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

/* Compact Matrix View */
.articles-grid--compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compact-row {
  display: flex;
  align-items: baseline;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  cursor: pointer;
  gap: 16px;
}

.compact-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.compact-row__id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 32px;
}

.compact-row__title {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.compact-row__subtitle {
  flex: 1.2;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-row__badge {
  font-size: 11px;
  color: var(--accent-gold);
  white-space: nowrap;
}

.compact-row__theme {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ==========================================================================
   ARTICLE READING PAGE (沉浸式阅读页)
   ========================================================================== */
.reader-view {
  display: block;
  max-width: var(--reading-max-width);
  margin: 0 auto;
}

/* Reading Navigation / Context bar */
.reader-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-back:hover {
  background: var(--accent-soft);
  border-color: var(--accent-primary);
}

.reader-theme-crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.reader-theme-crumb strong {
  color: var(--text-main);
}

.btn-open-drawer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-open-drawer:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--text-main);
}

/* Article Heading & Metadata */
.article-header {
  margin-bottom: 36px;
}

.article-header__meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-header__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 4px;
}

.article-header__theme {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.article-header__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

/* Core Mindset Callout (The Subtitle Callout Box) */
.article-mindset-box {
  background: var(--bg-quote);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin-bottom: 28px;
  position: relative;
}

.article-mindset-box__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-mindset-box__text {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-main);
}

.article-header__reading-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-subtle);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Article Body Typography */
.article-body {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--text-body);
  margin-bottom: 64px;
}

.article-body p {
  margin-bottom: 1.45em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.article-body strong {
  font-weight: 700;
  color: var(--text-main);
  background: var(--accent-soft);
  padding: 0 3px;
  border-radius: 3px;
}

.article-body em {
  font-style: italic;
  color: var(--text-main);
}

.article-body blockquote {
  margin: 1.8em 0;
  padding: 16px 22px;
  background: var(--bg-quote);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-serif);
  font-size: 1.05em;
  color: var(--text-main);
}

/* Sample Article Notice (for 04-24, 27-52) */
.sample-notice-box {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  margin: 36px 0;
}

.sample-notice-box__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.sample-notice-box__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.sample-notice-box__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 20px;
}

.sample-jump-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sample-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sample-jump-btn:hover {
  background: var(--accent-primary);
  color: #FFF;
}

/* Article Footer Reflection & Actions */
.article-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border-subtle);
}

/* Sequential Prev / Next Navigator */
.sequential-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-card--prev {
  text-align: left;
}

.nav-card--next {
  text-align: right;
}

.nav-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-card--next .nav-card__label {
  justify-content: flex-end;
}

.nav-card__title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* End-of-Collection Completion Card (for #53) */
.completion-card {
  background: var(--bg-quote);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 40px;
}

.completion-card__seal {
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}

.completion-card__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.completion-card__desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.completion-card__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   DRAWER / IN-SITU TABLE OF CONTENTS OVERLAY
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 16, 14, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-drawer);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
}

.drawer-backdrop.is-open .drawer-panel {
  transform: translateX(0);
}

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

.drawer-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.btn-close-drawer:hover {
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.drawer-theme-block {
  margin-bottom: 24px;
}

.drawer-theme-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-body);
  font-size: 13.5px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.drawer-item:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
}

.drawer-item.is-current {
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-weight: 700;
  border-left: 3px solid var(--accent-primary);
}

.drawer-item__id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  min-width: 24px;
}

.drawer-item__title {
  flex: 1;
  line-height: 1.4;
}

.drawer-item__badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-primary);
  color: #FFF;
  font-weight: 600;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   COLUMN POSTER MODAL (栏目全景海报)
   ========================================================================== */
.poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 16, 14, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
}

.poster-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.poster-canvas {
  background: var(--bg-app);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  position: relative;
  padding: 48px 40px;
  margin: auto;
}

.poster-top-actions {
  position: sticky;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
  z-index: 10;
}

.poster-header {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 24px;
}

.poster-seal {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.poster-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.poster-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.poster-theme-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.poster-theme-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.poster-article-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
}

.poster-article-item:hover {
  color: var(--accent-primary);
}

.poster-article-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
}

/* ==========================================================================
   PRINT STYLES FOR POSTER (海报打印友好)
   ========================================================================== */
@media print {
  .site-header,
  .poster-top-actions,
  .dilemma-section,
  .catalog-controls,
  .theme-nav-pills,
  .btn-back,
  .drawer-panel,
  .drawer-backdrop {
    display: none !important;
  }

  body {
    background: #FFF !important;
    color: #000 !important;
  }

  .poster-modal {
    position: static;
    background: none;
    padding: 0;
    opacity: 1;
  }

  .poster-canvas {
    max-height: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .poster-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-tagline {
    display: none;
  }

  .header-context {
    display: none;
  }

  .btn-poster span {
    display: none;
  }

  .main-content {
    padding: 20px 16px 60px;
  }

  .hero-editorial {
    padding: 24px 0 20px;
    margin-bottom: 24px;
  }

  .dilemma-section {
    padding: 18px 16px;
    margin-bottom: 24px;
  }

  .dilemma-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .articles-grid--detailed {
    grid-template-columns: 1fr;
  }

  .compact-row__subtitle {
    display: none;
  }

  .sequential-nav {
    grid-template-columns: 1fr;
  }

  .nav-card--next {
    text-align: left;
  }

  .nav-card--next .nav-card__label {
    justify-content: flex-start;
  }

  .drawer-panel {
    max-width: 100%;
    top: auto;
    bottom: 0;
    height: 85vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    transform: translateY(100%);
  }

  .drawer-backdrop.is-open .drawer-panel {
    transform: translateY(0);
  }

  .poster-canvas {
    padding: 24px 16px;
  }

  .poster-grid {
    grid-template-columns: 1fr;
  }
}

/* Stable document routes, native dialogs and reading controls. */
[hidden], dialog:not([open]) { display: none !important; }
a { text-decoration: none; }
.article-card, .theme-group { scroll-margin-top: calc(var(--header-height) + 16px); }
.skip { position: fixed; left: 16px; top: -100px; z-index: 500; padding: 10px; background: var(--bg-surface); }
.skip:focus { top: 8px; }
.site-foot { border-top: 1px solid var(--border-subtle); padding: 24px 16px 72px; text-align: center; color: var(--text-muted); font-size: 13px; }
.site-foot a { display: inline-block; margin: 4px 9px; color: inherit; }
.site-foot p { margin-top: 12px; }
.modal-open { overflow: hidden; }
dialog { color: var(--text-main); border: 0; }
dialog::backdrop { background: rgba(18,16,14,.48); backdrop-filter: blur(4px); }
dialog.drawer-panel[open] { inset: 0 0 0 auto; height: 100dvh; max-height: 100dvh; margin: 0; transform: none; padding: 0; }
dialog.poster-sheet { width: min(960px, 96vw); max-width: 96vw; margin: auto; padding: 0; border-radius: var(--radius-lg); background: var(--bg-app); }
.poster-canvas { max-height: 87dvh; }
.reading-dock { position: fixed; bottom: max(12px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 80; display: none; gap: 1px; padding: 3px; border: 1px solid var(--border-subtle); background: var(--bg-surface); border-radius: 40px; box-shadow: var(--shadow-md); }
.reading-dock.is-visible, .reading-dock:focus-within { display: flex; }
.reading-dock a { color: var(--accent-primary); padding: 7px 14px; white-space: nowrap; font-size: 13px; border-radius: 40px; }
.reading-dock a:last-child { background: var(--accent-primary); color: white; }
@media (max-width: 480px) {
  .reading-dock { left: max(8px, env(safe-area-inset-left)); transform: none; }
  body:has(#ec-feedback-launch) .reading-dock { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .reading-dock a { padding-inline: 8px; }
}
.compact .articles-grid--detailed { display: flex; flex-direction: column; gap: 6px; }
.compact .article-card { display: grid; grid-template-columns: 60px minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 10px; padding: 12px 15px; }
.compact .article-card__top, .compact .article-card__title, .compact .article-card__subtitle { margin: 0; }
.compact .article-card__title { font-size: 16px; }
.compact .article-card__theme-pill, .compact .article-card__meta { display: none; }
:lang(en) .article-body p { text-align: start; }
@keyframes parenting-enter { from { opacity: .5; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) { .parenting-enter { animation: parenting-enter .32s ease-out; } }
@media (max-width:640px) {
  .site-header__inner { gap: 4px; padding: 0 10px; }
  .header-actions, .brand-anchor { gap: 4px; }
  .brand-title { line-height: 1.1; }
  .btn-poster { flex-shrink: 0; }
  .search-wrap { min-width: 0; flex-basis: 100%; }
  .reader-theme-crumb { order: 3; flex-basis: 100%; justify-content: center; }
  .reader-view, .article-card { overflow-wrap: anywhere; }
  dialog.drawer-panel[open] { inset: auto 0 0; height: 85dvh; }
  .compact .article-card { grid-template-columns: 48px minmax(0,1fr); }
  .compact .article-card__subtitle { display: none; }
  .poster-top-actions { flex-wrap: wrap; }
}
@media print {
  .reading-dock, .site-foot { display:none !important; }
  body:has(.poster-sheet[open]) > :not(.poster-sheet) { display:none !important; }
  dialog.poster-sheet[open], .poster-canvas { position: static; width: 100%; max-width: none; max-height: none; overflow: visible; }
  .poster-theme-col { break-inside: avoid; }
}

html:not(.reader-ready) .js-only { display: none !important; }
