/* LAYOUT */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  margin-top: 70px;
}

.page-header {
  padding-bottom: 1.8rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.breadcrumb {
  font-size: .7rem;
  color: var(--text-muted);
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none
}

.breadcrumb a:hover {
  color: var(--accent-green)
}

.breadcrumb span {
  opacity: .35
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .4rem;
  letter-spacing: .02em
}

.page-desc {
  font-size: .87rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

/* STAT BADGES inline with header */
.header-stats {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  justify-content: center;
}

.h-stat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .75rem;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: .7rem;
  font-weight: 600
}

.h-stat-n {
  color: var(--accent-green)
}

.h-stat-l {
  color: var(--text-muted)
}

.section {
  margin-bottom: 2.8rem
}

.s-title {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: .5rem
}

.s-title::before {
  content: '';
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--accent-purple);
  flex-shrink: 0
}

/* PROSE */
.prose p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: .9rem
}

.prose p:last-child {
  margin-bottom: 0
}

.prose strong {
  color: var(--text-secondary);
  font-weight: 600
}

/* PIPELINE */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative
}

.pipeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-purple), var(--accent-green));
  opacity: .3
}

.pipe-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: .9rem 0
}

.pipe-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid;
  position: relative;
  z-index: 1
}

.p1 .pipe-num {
  background: rgba(139, 92, 246, .1);
  border-color: rgba(139, 92, 246, .3);
  color: var(--accent-purple)
}

.p2 .pipe-num {
  background: rgba(59, 130, 246, .1);
  border-color: rgba(59, 130, 246, .3);
  color: var(--accent-blue)
}

.p3 .pipe-num {
  background: rgba(16, 185, 129, .1);
  border-color: rgba(16, 185, 129, .3);
  color: var(--accent-green)
}

.p4 .pipe-num {
  background: rgba(20, 184, 166, .1);
  border-color: rgba(20, 184, 166, .3);
  color: var(--accent-teal)
}

.p5 .pipe-num {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .3);
  color: var(--accent-gold)
}

.pipe-body {
  padding-top: .2rem
}

.pipe-title {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .2rem
}

.pipe-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6
}

/* SOURCES */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: .6rem
}

.source-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem
}

.src-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: .05rem
}

.src-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: .15rem
}

.src-desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.55
}

/* ACCURACY CARD */
.accuracy-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem
}

.acc-big {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-green);
  margin-bottom: .2rem
}

.acc-label {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em
}

.acc-bars {
  display: flex;
  flex-direction: column;
  gap: .65rem
}

.acc-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .76rem
}

.acc-row-label {
  color: var(--text-muted);
  min-width: 150px
}

.acc-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden
}

.acc-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-teal))
}

.acc-val {
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 36px;
  text-align: right
}

/* CORPUS STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center
}

.stat-n {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .2rem
}

.stat-l {
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1.4
}

/* DOMAINS */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem
}

.domain-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: .85rem 1rem
}

.domain-icon {
  font-size: 1.1rem;
  flex-shrink: 0
}

.domain-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .1rem
}

.domain-count {
  font-size: .68rem;
  color: var(--text-muted)
}

/* SAMPLE ENTRY */
.sample-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem
}

.se-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color)
}

.se-arabic {
  font-family: 'Amiri', serif;
  font-size: 3rem;
  color: var(--accent-gold);
  direction: rtl;
  line-height: 1;
  flex-shrink: 0
}

.se-info {}

.se-translit {
  font-size: .7rem;
  color: var(--text-muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .3rem
}

.se-meaning {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .5rem
}

.se-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem
}

.se-chip {
  padding: .18rem .6rem;
  border-radius: 100px;
  font-size: .6rem;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted)
}

.se-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .4rem
}

.se-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .45rem .6rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm)
}

.sf-label {
  font-size: .7rem;
  color: var(--text-muted)
}

.sf-val {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary)
}