.page-header { background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 3rem 0 2.5rem; }

/* ── GLOSSARY ── */
.glossary-tabs { margin-top: 2.5rem; }
.gloss-tab-bar { margin-bottom: 0; border-bottom: 1px solid var(--border); padding-bottom: 0; border-radius: 0; gap: 0; }
.gloss-tab-bar .tab-btn { border-radius: var(--radius) var(--radius) 0 0; border-bottom: none; margin-bottom: -1px; }
.gloss-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 2rem;
}
.gloss-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.gloss-term {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}
.gloss-term:hover { border-color: var(--border-bright); }
.term-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.term-header code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 2px 8px;
  border-radius: 4px;
}
.gloss-term p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.65; }

/* ── DICTIONARY TABLE ── */
.dict-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}
.dict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.dict-table thead { background: var(--bg-panel); }
.dict-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dict-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.dict-table tr:last-child td { border-bottom: none; }
.dict-table tr:hover td { background: rgba(255,255,255,0.02); }
.group-row td {
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
}
.dict-table code {
  font-family: var(--font-mono);
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
}
code.ex { color: var(--text-muted); background: rgba(74,101,128,0.15); }
.req-yes  { color: var(--green);  font-weight: 600; font-size: 0.72rem; }
.req-no   { color: var(--text-muted); font-size: 0.72rem; }
.req-cond { color: var(--amber);  font-weight: 600; font-size: 0.72rem; }

/* ── LINEAGE ── */
.lineage-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.lineage-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
}
.lineage-row--2 { max-width: 800px; }
.lineage-node {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  max-width: 300px;
}
.lineage-node strong { font-size: 0.875rem; color: var(--text-primary); }
.lineage-node small  { font-size: 0.72rem;  color: var(--text-muted); line-height: 1.4; }
.lineage-node code   { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); background: rgba(74,101,128,0.15); padding: 2px 6px; border-radius: 3px; }
.ln-icon { font-size: 1.25rem; }
.ln-source  { border-color: rgba(29,111,164,0.5);  }
.ln-raw     { border-color: rgba(245,158,11,0.3);   }
.ln-product { border-color: rgba(0,200,215,0.4); background: rgba(0,200,215,0.04); }
.ln-consumer{ border-color: rgba(0,214,143,0.3);  }

.lineage-arrow {
  color: var(--border-bright);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.lineage-arrow span { font-family: var(--font-mono); }

.lineage-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(0,200,215,0.05);
  border: 1px solid rgba(0,200,215,0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  width: 100%;
}
.lineage-note span { font-size: 1.1rem; flex-shrink: 0; }
.lineage-note p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }

/* ── EDC GRID ── */
.edc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.edc-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.25s;
}
.edc-item:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.edc-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.edc-item h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.edc-item p  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; }

@media (max-width: 900px) {
  .gloss-grid { grid-template-columns: 1fr; }
  .edc-grid   { grid-template-columns: 1fr 1fr; }
  .lineage-row--2 { flex-direction: column; }
}
@media (max-width: 600px) {
  .edc-grid { grid-template-columns: 1fr; }
}
