/* ══════════════════════════════════════
   STANDARD LIST PAGE STYLES
   参考: standard_list.html 原始样式
══════════════════════════════════════ */

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 0.85rem 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
  background: #fff;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb-sep {
  opacity: 0.35;
}
.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* ══════════════════════════════════════
   HERO BAND
══════════════════════════════════════ */
.std-hero {
  background: var(--ink);
  padding: 3rem 3rem 0;
  position: relative;
  overflow: hidden;
}

/* subtle grid texture */
.std-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
/* accent glow bottom */
.std-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, rgba(200,98,42,0.06));
  pointer-events: none;
}

.hero-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  position: relative;
  z-index: 1;
}

.hero-flag-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.hero-flag {
  font-size: 2rem;
  line-height: 1;
}
.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  text-transform: uppercase;
  margin-bottom: 0;
}

.hero-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  text-align: left;
}
.hero-title em {
  font-style: italic;
  color: var(--accent-light);
}
.hero-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 2rem;
}

/* Metadata chips row */
.hero-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  border: 1px solid;
  text-transform: uppercase;
}
.chip-cn {
  color: #86efac;
  background: rgba(134,239,172,0.08);
  border-color: rgba(134,239,172,0.25);
}
.chip-local {
  color: var(--accent-light);
  background: rgba(200,98,42,0.12);
  border-color: rgba(200,98,42,0.3);
}
.chip-year {
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}
.chip-level {
  color: #93c5fd;
  background: rgba(147,197,253,0.08);
  border-color: rgba(147,197,253,0.25);
}

/* Hero stats pills */
.hero-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  align-self: flex-start;
  flex-shrink: 0;
}
.hero-stat {
  padding: 1rem 1.6rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero-stat:nth-child(2n) {
  border-right: none;
}
.hero-stat:nth-last-child(-n+2) {
  border-bottom: none;
}
/* 第4格不是最后一项时恢复下边框（奇数总数），隔开下方空格防合并 */
.hero-stat:nth-child(4):not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero-stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.hero-stat-num span {
  font-size: 1rem;
  opacity: 0.6;
}
.hero-stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ══════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════ */
.std-search-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  padding: 1rem 3rem;
  position: sticky;
  top: 60px;
  z-index: 100;
}
.std-search-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.std-search-wrap {
  flex: 1;
  position: relative;
  max-width: 500px;
}
.std-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.std-search-input {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.std-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
  background: #fff;
}
.std-search-input::placeholder {
  color: var(--muted);
}
.std-search-hint {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.std-search-hint kbd {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper-warm);
  color: var(--muted);
}

/* ══════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════ */
.page-body {
  flex: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

/* ══════════════════════════════════════
   SECTION LABEL
══════════════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ══════════════════════════════════════
   SECTIONS LIST (门类 accordion)
══════════════════════════════════════ */
.sections-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s;
  animation: fadeUp 0.4s ease both;
}
.section-item:hover {
  border-color: rgba(200,98,42,0.2);
}
.section-item.open {
  border-color: rgba(200,98,42,0.28);
}

.section-trigger {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  list-style: none;
}
.section-trigger:hover {
  background: var(--paper);
}
.section-item.open .section-trigger {
  background: var(--paper);
  border-bottom: 1px solid var(--border-soft);
}

.section-letter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  width: 32px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.section-info {
  flex: 1;
  min-width: 0;
}
.section-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.section-count {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
}
.section-chevron {
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  flex-shrink: 0;
}
.section-item.open .section-chevron {
  transform: rotate(90deg);
}

/* Section body — division pills */
.section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1);
}
.section-item.open .section-body {
  max-height: 600px;
}

.divisions-grid {
  padding: 1rem 1.4rem 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.div-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.div-pill:hover {
  border-color: var(--accent);
  background: var(--accent-faint);
}
.div-pill-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
  min-width: 28px;
}
.div-pill-name {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.div-pill:hover .div-pill-name {
  color: var(--ink);
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.std-sidebar {
  position: sticky;
  top: 124px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 元数据独立小卡片 */
.sidebar-mini-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.mini-label {
  font-size: 0.62rem;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mini-val {
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}
.mini-val.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}

/* CTA card */
.sidebar-cta {
  background: var(--ink);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}
.sidebar-cta-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}
.sidebar-cta-sub {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.sidebar-cta-btn:hover {
  background: #b5531f;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-stats-row {
    border-radius: 12px;
  }
  .page-body {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3.5rem;
  }
  .std-sidebar {
    position: static;
  }
  .breadcrumb,
  .std-search-bar {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
  .std-hero {
    padding: 2.5rem 1.2rem 0;
  }
}

@media (max-width: 700px) {
  .breadcrumb,
  .std-search-bar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .std-search-bar {
    top: 54px;
  }
  .std-search-hint {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero-stats-row {
    flex-wrap: wrap;
  }
  .hero-stat {
    flex: 1;
    min-width: 80px;
  }
  .divisions-grid {
    grid-template-columns: 1fr 1fr;
  }
}
