/* ============================================================
   EO Guangzhou - Unified Design System
   Source colors from official materials:
   - Primary teal palette (from terminology doc formatting)
   - Noodle brand accents (from primary color asset)
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  /* Primary brand */
  --eo-primary:        #2A8F7C;
  --eo-primary-dark:   #1B6B5C;
  --eo-primary-darker: #165247;
  --eo-primary-light:  #3AA68E;
  --eo-primary-pale:   #E9F6F3;
  --eo-primary-bg:     #F4FBF9;

  /* Noodle accent palette */
  --n-coral:           #FF6B5A;
  --n-blue:            #4B5CE6;
  --n-pink:            #EE3377;
  --n-gold:            #F0AD30;
  --n-teal:            #40B89E;
  --n-slate:           #555F7A;

  /* Neutral scale */
  --text-primary:      #1A2B33;
  --text-secondary:    #4A5D66;
  --text-muted:        #7A8E99;
  --border-light:      #E2EBE8;
  --border-default:    #D0DDD9;
  --bg-white:          #FFFFFF;
  --bg-page:           #FAFCFB;
  --bg-warm:           #FEFDFB;
  --bg-subtle:         #EEF3F1;

  /* Typography */
  --font-base: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-en:  "Noto Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing & radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --space-xs:  .35rem;
  --space-sm:  .75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-xxl: 5rem;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(26,43,51,.06);
  --shadow-md:  0 4px 16px rgba(26,43,51,.08);
  --shadow-lg:  0 8px 32px rgba(26,43,51,.10);
  --shadow-xl:  0 16px 48px rgba(26,43,51,.12);

  /* Transitions */
  --ease: cubic-bezier(.25,.46,.45,.94);
}

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

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--eo-primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--eo-primary-dark); }
h1, h2, h3, h4 { line-height: 1.35; color: var(--text-primary); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);  letter-spacing: -.01em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
p + p { margin-top: .65em; }

/* ── Layout Container ── */
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}

.section { padding-block: var(--space-xl); }
.section--alt { background: var(--bg-white); }
.section--warm { background: var(--bg-warm); }
.section--primary-bg { background: linear-gradient(135deg, var(--eo-primary) 0%, var(--eo-primary-dark) 100%); color: #fff; }
.section--primary-bg h2,
.section--primary-bg h3,
.section--primary-bg p { color: inherit; }

/* ── Navigation Bar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.navbar__logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.navbar__links a {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all .22s var(--ease);
}
.navbar__links a:hover,
.navbar__links a[aria-current="page"] {
  background: var(--eo-primary-pale);
  color: var(--eo-primary);
}
.navbar__links a[aria-current="page"] {
  font-weight: 600;
}

/* Mobile nav toggle (hidden by default) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 22px; height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .navbar__links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(14px);
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    gap: .2rem;
    box-shadow: var(--shadow-md);
    transform-origin: top;
    transition: opacity .25s var(--ease), visibility .25s;
  }
  .navbar__links.collapsed { opacity: 0; visibility: hidden; pointer-events: none; }
  .navbar__links a { padding: .65rem 1rem; font-size: 1rem; border-radius: var(--radius-sm); }
}

/* ── Hero Section ── */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(160deg, var(--eo-primary) 0%, #1a6b5c 50%, #124a3f 100%);
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/noodles-pattern.png') no-repeat right 5% bottom 10%;
  background-size: auto 60%;
  opacity: .12;
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1.1rem;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.90);
  margin-bottom: 1.25rem;
}
.hero__title { color: #fff; margin-bottom: .6rem; }
.hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  opacity: .88;
  max-width: 680px;
  margin-inline: auto;
  font-weight: 300;
  line-height: 1.65;
}
.hero__logo-img {
  height: 48px;
  filter: brightness(0) invert(1);
  margin: 0 auto 1.5rem;
}
.hero__cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .72rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .22s var(--ease);
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
}
.btn--primary {
  background: var(--eo-primary);
  color: #fff;
  border-color: var(--eo-primary);
}
.btn--primary:hover {
  background: var(--eo-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.btn--outline:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.7);
  color: #fff;
  transform: translateY(-1px);
}
.btn--light {
  background: #fff;
  color: var(--eo-primary);
  border-color: #fff;
}
.btn--light:hover {
  background: var(--eo-primary-pale);
  color: var(--eo-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--sm { padding: .5rem 1.1rem; font-size: .86rem; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  text-align: center;
}
.stat-card {
  padding: 1.5rem 1rem;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-card__num {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--eo-primary);
  line-height: 1.2;
}
.stat-card__label {
  font-size: .87rem;
  color: var(--text-muted);
  margin-top: .25rem;
  font-weight: 500;
}

/* ── Values Grid ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.value-card {
  padding: 1.75rem 1.5rem;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--eo-primary);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.value-card:nth-child(2) { border-color: var(--n-blue); }
.value-card:nth-child(3) { border-color: var(--n-gold); }
.value-card:nth-child(4) { border-color: var(--n-pink); }
.value-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.value-card__icon {
  font-size: 1.8rem;
  margin-bottom: .6rem;
  display: block;
}
.value-card__title {
  font-size: 1.1rem;
  margin-bottom: .4rem;
}
.value-card__desc {
  font-size: .91rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Benefits Grid ── */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.benefit-card {
  padding: 2rem 1.75rem;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.benefit-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--eo-primary);
}
.benefit-card:nth-child(2)::before { background: var(--n-blue); }
.benefit-card:nth-child(3)::before { background: var(--n-pink); }
.benefit-card:nth-child(4)::before { background: var(--n-gold); }
.benefit-card:nth-child(5)::before { background: var(--n-teal); }
.benefit-card:nth-child(6)::before { background: var(--n-slate); }
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.benefit-card__icon {
  font-size: 2.2rem;
  margin-bottom: .75rem;
  display: block;
}
.benefit-card__title {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.benefit-card__desc {
  font-size: .91rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.benefit-card__tag {
  display: inline-block;
  padding: .18rem .6rem;
  background: var(--eo-primary-pale);
  color: var(--eo-primary);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  margin-top: .75rem;
}

/* ── Process Steps (vertical timeline - number centered ON line) ── */
/* Classic reliable pattern: border-left = line, ::before = centered circle */
.process-timeline {
  position: relative;
  margin-top: .5rem;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 0 0 2.4rem 3.2rem;
  border-left: 2px solid var(--border-default);
  min-height: 48px;
}
.process-step:last-child {
  border-color: transparent;
  padding-bottom: 0;
}
/* Number circle - centered exactly on the 2px border */
/* left offset = -(circle_diameter/2 + line_width/2) = -(44/2 + 2/2) = -23px */
.process-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -23px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--eo-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 0 0 5px var(--eo-primary-pale);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.process-step:hover::before {
  transform: scale(1.08);
  box-shadow: 0 0 0 6px var(--eo-primary-pale), 0 4px 14px rgba(42,143,124,.20);
}
/* Per-step brand colors */
.process-step:nth-child(1)::before { background: var(--eo-primary); }
.process-step:nth-child(2)::before { background: var(--n-blue); box-shadow: 0 0 0 5px rgba(75,92,230,.15); }
.process-step:nth-child(3)::before { background: var(--n-gold); box-shadow: 0 0 0 5px rgba(240,173,48,.18); }
.process-step:nth-child(4)::before { background: var(--n-pink); box-shadow: 0 0 0 5px rgba(238,51,119,.14); }
.process-step:nth-child(5)::before { background: var(--n-teal); box-shadow: 0 0 0 5px rgba(64,184,158,.16); }
.process-step__title {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: .2rem;
  color: var(--text-primary);
}
.process-step__desc {
  font-size: .93rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Chapter Info Card ── */
.chapter-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.chapter-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.fact-item {
  padding: 1rem 1.25rem;
  background: var(--eo-primary-pale);
  border-radius: var(--radius-md);
}
.fact-item__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--eo-primary);
}
.fact-item__label {
  font-size: .83rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: .15rem;
}
.chapter-intro p {
  font-size: .96rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .chapter-info { grid-template-columns: 1fr; }
  .chapter-facts { grid-template-columns: 1fr 1fr; }
}

/* ── Contact / Footer Area ── */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.contact-links dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem 1rem;
  align-items: baseline;
}
.contact-links dt {
  font-weight: 600;
  color: var(--text-primary);
  font-size: .93rem;
}
.contact-links dd {
  font-size: .91rem;
  color: var(--text-secondary);
}
.contact-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.contact-qr img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.contact-qr span {
  font-size: .84rem;
  color: var(--text-muted);
  font-weight: 500;
}
@media (max-width: 768px) {
  .contact-section { grid-template-columns: 1fr; text-align: center; }
  .contact-links dl { grid-template-columns: 1fr; gap: .4rem; }
  .contact-links dt { text-align: center; }
}

/* ── Page Footer ── */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 0;
  font-size: .86rem;
  text-align: center;
}
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: #fff; }
.footer__brand { text-align: left; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 520px) {
  .footer__inner { flex-direction: column; text-align: center; }
}

/* ── Terminology Page Specific ── */

/* Search bar */
.search-bar {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
}
.search-bar__input {
  width: 100%;
  padding: .85rem 1.2rem .85rem 3rem;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: var(--font-base);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  background: var(--bg-white);
  color: var(--text-primary);
}
.search-bar__input:focus {
  border-color: var(--eo-primary);
  box-shadow: 0 0 0 4px var(--eo-primary-pale);
}
.search-bar__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar__count {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .81rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Category tabs */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
}
.cat-tab {
  padding: .5rem 1.1rem;
  border: 1.5px solid var(--border-default);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  font-family: var(--font-base);
  cursor: pointer;
  transition: all .2s var(--ease);
  background: transparent;
  color: var(--text-secondary);
  user-select: none;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: var(--eo-primary);
  color: var(--eo-primary);
  background: var(--eo-primary-pale);
}
.cat-tab.active {
  background: var(--eo-primary);
  border-color: var(--eo-primary);
  color: #fff;
  font-weight: 600;
}
.cat-tab__count {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0 .3rem;
  margin-left: .15rem;
  font-size: .72rem;
  line-height: 1.5;
  text-align: center;
  border-radius: 999px;
  background: rgba(42,143,124,.14);
  color: var(--eo-primary);
  font-weight: 600;
}
.cat-tab.active .cat-tab__count {
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* ── Letter Group (A-Z sections) ── */
.letter-group { margin-bottom: 1.5rem; }
.letter-group:last-child { margin-bottom: 0; }
.letter-group__header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--eo-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: .85rem;
  box-shadow: 0 2px 8px rgba(42,143,124,.25);
}

/* ── Category Group (semantic sections) ── */
.cat-group { margin-bottom: 2.2rem; }
.cat-group:last-child { margin-bottom: 0; }
.cat-group__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--eo-primary-pale);
}
.cat-group__header::before {
  content: "";
  width: 4px;
  height: 1.05rem;
  border-radius: 3px;
  background: var(--eo-primary);
  flex: none;
}
.cat-group__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .02em;
}
.cat-group__count {
  font-size: .74rem;
  line-height: 1;
  color: #fff;
  background: var(--eo-primary);
  padding: .22rem .5rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ── Term Cards (card grid, clickable to expand) ── */
.letter-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
  align-items: start;
}
.term-card--card {
  padding: 0;
  margin-bottom: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  cursor: pointer;
  animation: fadeInUp .3s var(--ease) both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.term-card--card:hover {
  border-color: var(--eo-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.term-card--card.is-expanded {
  border-color: var(--eo-primary);
  box-shadow: 0 6px 20px rgba(42,143,124,.15);
}

/* Card head row (always visible) */
.term-card__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
}
.term-card__main { flex: 1 1 auto; min-width: 0; }
.term-card__arrow {
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.term-card__abbr {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
}
.term-card__en {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  font-style: italic;
  margin-left: .35rem;
}
.term-card__badge {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  padding: .22rem .5rem;
  margin-left: .5rem;
  border-radius: 999px;
  color: #8a5a00;
  background: rgba(240,173,48,.18);
  border: 1px solid rgba(240,173,48,.45);
  letter-spacing: .04em;
  vertical-align: middle;
}
.term-card__zh {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: .2rem 0 0;
  line-height: 1.4;
}

/* Expanded detail body */
.term-card__body {
  border-top: 1px solid var(--border-default);
  animation: slideDown .28s var(--ease) both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to   { opacity: 1; max-height: 500px; padding-top: 1rem; padding-bottom: 1rem; }
}

.term-card__detail {
  padding: 0 1.25rem 1rem;
}
.term-detail-row {
  display: flex;
  gap: .6rem;
  margin-bottom: .55rem;
  align-items: baseline;
}
.term-detail-row:last-child { margin-bottom: 0; }
.term-detail-label {
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 700;
  color: var(--eo-primary-dark);
  background: var(--eo-primary-pale);
  padding: .18rem .6rem;
  border-radius: 5px;
  white-space: nowrap;
}
.term-detail-value {
  flex: 1 1 auto;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.term-detail-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* No results state */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.no-results-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* Highlight for search matches */
mark, mark.hl {
  background: rgba(240,173,48,.30);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Terminology stats bar */
.terms-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.terms-stat {
  text-align: center;
}
.terms-stat__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--eo-primary);
}
.terms-stat__label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Responsive Utilities ── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── Bilingual (中 / EN) Helpers ── */
.bilingual .zh { display: block; }
.bilingual .en-block {
  display: block;
  margin-top: .45rem;
  font-family: var(--font-en);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.65;
}
.section-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-top: .4rem;
}
.section-sub .en {
  display: block;
  font-family: var(--font-en);
  font-size: .85rem;
  margin-top: .15rem;
}

/* ── Section title (unified across page) ── */
.section-title {
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background: var(--eo-primary);
  margin: .6rem auto 0;
}

/* ── Section lead paragraph (longer intro prose) ── */
.section-lead {
  max-width: 720px;
  margin: .65rem auto 0;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
  text-align: center;
}
.en-inline {
  font-family: var(--font-en);
  color: var(--text-muted);
  font-style: italic;
}

/* ── Scroll Reveal (progressive enhancement) ── */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ── Navbar scrolled state ── */
.navbar.is-scrolled {
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow-md);
}

/* ── Hero entrance animation ── */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero .container > * { animation: heroRise .7s var(--ease) both; }
.hero .container > *:nth-child(1) { animation-delay: .00s; }
.hero .container > *:nth-child(2) { animation-delay: .08s; }
.hero .container > *:nth-child(3) { animation-delay: .16s; }
.hero .container > *:nth-child(4) { animation-delay: .24s; }
.hero .container > *:nth-child(5) { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .hero .container > * { animation: none; }
}

/* ── Back-to-top button ── */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--eo-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
  z-index: 1100;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover { background: var(--eo-primary-dark); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .3s; transform: none; }
  .back-to-top.is-visible { transform: none; }
}

/* ── Terminology Hero (search-first recomposition) ── */
.hero--term {
  padding-block: clamp(2.75rem, 7vw, 4.75rem);
}
.hero__search {
  margin-top: 2rem;
}
.hero__search .search-bar {
  max-width: 600px;
}
.hero__search .search-bar__input {
  background: rgba(255,255,255,.96);
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(18,82,71,.18);
}

/* Per-category color cue on group + its cards (--cat injected by JS) */
.terms-group__header {
  border-bottom-color: color-mix(in srgb, var(--cat, var(--eo-primary)) 22%, var(--border-light));
}
.terms-group__count {
  color: var(--cat, var(--eo-primary-dark));
  background: color-mix(in srgb, var(--cat, var(--eo-primary)) 14%, #fff);
}
.term-card:hover {
  border-left-color: var(--cat, var(--eo-primary));
}

/* Reduced-motion: disable stagger entrance for term cards */
@media (prefers-reduced-motion: reduce) {
  .term-card { animation: none; }
}

/* ══════════════════════════════════════════════════════════
   Members Directory Page Specific
   ══════════════════════════════════════════════════════════ */

/* Filter toolbar (category + status + sort) */
.filter-bar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  padding: .85rem 0;
  position: sticky;
  top: 64px;
  z-index: 40;
}
.filter-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.filter-bar__row + .filter-bar__row { margin-top: .55rem; }
.filter-bar__label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: .25rem;
  flex: 0 0 auto;
  letter-spacing: .02em;
}
.filter-bar__spacer { flex: 1 1 auto; }
.sort-select {
  flex: 0 0 auto;
  padding: .45rem .9rem;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.sort-select:focus {
  border-color: var(--eo-primary);
  box-shadow: 0 0 0 4px var(--eo-primary-pale);
}

/* Collapsible filter toggle (mobile only — hidden on desktop) */
.filter-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .7rem .95rem;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.filter-toggle__text { display: inline-flex; align-items: center; gap: .4rem; }
.filter-toggle__badge {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  background: var(--eo-primary);
  border-radius: 999px;
  padding: .12rem .55rem;
  white-space: nowrap;
}
.filter-toggle__chev { flex: 0 0 auto; transition: transform .25s var(--ease); }
.filter-bar.is-open .filter-toggle__chev,
#catNav.is-open .filter-toggle__chev { transform: rotate(180deg); }

/* Category nav on terminology page (extract inline sticky into a class) */
.cat-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--bg-subtle);
  padding: .7rem 0;
  border-bottom: 1px solid var(--border-default);
}

/* Members stats bar (reuse terms-stats look already defined) */
.members-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.8rem;
  padding: 1.1rem 0;
}

/* Members grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

/* Member card */
.member-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
  animation: fadeInUp .35s var(--ease) both;
  display: flex;
  flex-direction: column;
}
.member-card:hover {
  border-color: var(--eo-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.member-card.is-expanded {
  border-color: var(--cat, var(--eo-primary));
  box-shadow: 0 8px 28px rgba(42,143,124,.14);
}
.member-card--leave { opacity: .92; }

/* Card head (always visible, clickable) */
.member-card__head {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.15rem 1.25rem .9rem;
  cursor: pointer;
  user-select: none;
}
.member-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: var(--cat, var(--eo-primary));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--cat, var(--eo-primary)) 35%, transparent);
}
.member-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
}
.member-card__initial {
  position: relative;
  z-index: 0;
}
.member-card__id { flex: 1 1 auto; min-width: 0; }
.member-card__name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .15rem .45rem;
}
.member-card__en {
  font-size: .82rem;
  font-weight: 500;
  font-family: var(--font-en);
  font-style: italic;
  color: var(--text-muted);
}
.member-card__role {
  font-size: .84rem;
  color: var(--text-secondary);
  margin: .25rem 0 0;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-card__arrow {
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  font-size: 1.1rem;
  line-height: 1;
}
.member-card.is-expanded .member-card__arrow { transform: rotate(180deg); }

/* Tags row */
.member-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0 1.25rem .95rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .62rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag--cat {
  color: var(--cat, var(--eo-primary));
  background: color-mix(in srgb, var(--cat, var(--eo-primary)) 13%, #fff);
  border-color: color-mix(in srgb, var(--cat, var(--eo-primary)) 30%, #fff);
}
.tag--industry { background: var(--eo-primary-pale); color: var(--eo-primary); }
.tag--warn {
  color: #B4540E;
  background: rgba(240,173,48,.18);
  border-color: rgba(240,173,48,.45);
}
.tag--type-1 {
  color: var(--eo-primary-dark);
  background: var(--eo-primary-pale);
  border-color: color-mix(in srgb, var(--eo-primary) 30%, #fff);
}
.tag--type-05 {
  color: #9A6B00;
  background: rgba(240,173,48,.16);
  border-color: rgba(240,173,48,.45);
}

/* Status badge — top-right of card head (正式会员 has no marker) */
.member-card__status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: .24rem .62rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: .02em;
}
.member-card__status--leave {
  color: #8a5a00;
  background: rgba(240,173,48,.18);
  border-color: rgba(240,173,48,.45);
}
.member-card__status--10 {
  color: #8a5a00;
  background: rgba(240,173,48,.18);
  border-color: rgba(240,173,48,.45);
}
.member-card__status--05 {
  color: #8a5a00;
  background: rgba(240,173,48,.18);
  border-color: rgba(240,173,48,.45);
}

/* Expanded detail body */
.member-card__body {
  border-top: 1px solid var(--border-default);
  animation: slideDown .28s var(--ease) both;
  padding: .9rem 1.25rem 1.2rem;
}
.member-detail-row {
  display: flex;
  gap: .65rem;
  margin-bottom: .55rem;
  align-items: baseline;
}
.member-detail-row:last-of-type { margin-bottom: 0; }
.member-detail-label {
  flex: 0 0 5.2rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--eo-primary-dark);
  background: var(--eo-primary-pale);
  padding: .18rem .5rem;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
}
.member-detail-value {
  flex: 1 1 auto;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}
.member-detail-value a { font-weight: 600; }
.member-intro {
  margin-top: .8rem;
  padding: .85rem 1rem;
  background: var(--bg-page);
  border-left: 3px solid var(--cat, var(--eo-primary));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.member-intro__title {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--cat, var(--eo-primary-dark));
  margin-bottom: .3rem;
  letter-spacing: .03em;
}

@media (max-width: 540px) {
  .members-grid { grid-template-columns: 1fr; }
  .filter-bar__label { width: 100%; }
  .member-detail-label { flex-basis: 4.4rem; }
}

/* ── Mobile: collapse filter / category bars so they stop covering content ── */
@media (max-width: 768px) {
  /* No longer pin the bar — let it scroll with the page so the list is never blocked */
  .filter-bar,
  #catNav { position: static; }

  /* Thin sticky-only toggle button (stays at top while its own section is on screen) */
  .filter-toggle {
    display: flex;
    position: sticky;
    top: 64px;
    z-index: 45;
    margin-bottom: .15rem;
  }

  /* Collapse the chip rows by default; expand only when toggled open */
  .filter-bar__body,
  #catButtons {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height .3s var(--ease), padding .3s var(--ease);
  }
  .filter-bar.is-open .filter-bar__body,
  #catNav.is-open #catButtons {
    max-height: 72vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: .6rem;
    padding-bottom: .5rem;
  }

  /* Tighter chip spacing on small screens */
  .filter-bar__row { gap: .4rem; }
  #catButtons { gap: .4rem; }
}

