/* ReNikud — professional light hero + warm body */

:root {
  --bg-hero: #fafbfc;
  --bg-dark-2: #1e1b28;
  --bg-light: #fafbfc;
  --bg-light-2: #f3f1ec;
  --text-primary: #363636;
  --text-secondary: #6b7280;
  --text-muted: #78716c;
  --accent: #44403c;
  --accent-hover: #292524;
  --accent-soft: #f3f1ec;
  --accent-3: #059669;
  --border: #e5e7eb;
  --border-light: #e5e7eb;
  --shadow: 0 8px 32px rgba(30, 27, 40, 0.06);
  --radius: 12px;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-hebrew: "Noto Sans Hebrew", var(--font-body);
  --wrap: min(1080px, calc(100% - 2rem));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.wrap { width: var(--wrap); margin-inline: auto; }
.narrow { max-width: 720px; }

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 251, 252, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo span { color: var(--accent); }

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  font-family: var(--font-serif);
  font-size: 0.975rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Hero — split layout, not centered stack */

.hero {
  background: linear-gradient(180deg, #fff 0%, var(--bg-light) 72%);
  border-bottom: 1px solid var(--border);
  padding: 4.25rem 0 4.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 3.25rem;
  align-items: stretch;
}

.hero-main { padding-top: 0.25rem; }

.hero-aside {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hero-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  padding: 1.65rem 1.75rem 1.5rem;
  background: var(--accent-soft);
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}

.kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hero-title .accent { color: var(--accent); }

.paper-title {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  max-width: 34rem;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.author-block {
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.author-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.author-line a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 0;
}

.author-line a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.author-line sup {
  margin-left: 0.12em;
  font-size: 0.72em;
}

.author-equal {
  margin-left: 0.1em;
  margin-right: -0.02em;
  font-size: 0.78em;
  color: var(--text-muted);
  font-weight: 400;
}

.author-footnote {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.author-footnote sup {
  margin-right: 0.18em;
  font-size: 0.72em;
}

.affil-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  margin-top: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.affil-line span {
  white-space: nowrap;
}

.affil-line sup {
  margin-right: 0.12em;
  font-size: 0.72em;
}


.cta-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.625rem;
  max-width: 100%;
  margin-top: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 0.45rem;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(30, 27, 40, 0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    color 0.15s ease;
}

.btn-icon {
  width: 1.0625rem;
  height: 1.0625rem;
  flex-shrink: 0;
  display: block;
}

.btn-icon--arxiv {
  width: 1.0625rem;
  height: 1.0625rem;
}

.btn-paper {
  background: var(--accent-soft);
  border-color: rgba(68, 64, 60, 0.18);
}

.btn-icon--hf {
  width: 1.1875rem;
  height: 1.1875rem;
}

.btn small {
  margin-left: 0.05rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.btn-main {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(30, 27, 40, 0.12);
}

.btn-main:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 3px 10px rgba(30, 27, 40, 0.14);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border-color: rgba(68, 64, 60, 0.14);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #fff;
  border-color: rgba(68, 64, 60, 0.28);
  text-decoration: none;
  color: var(--accent-hover);
  box-shadow: 0 3px 10px rgba(30, 27, 40, 0.08);
  transform: translateY(-1px);
}

.btn-paper:hover {
  background: #fff;
}

/* Hero aside — showcase panel */

.hero-panel-head {
  flex-shrink: 0;
  margin-bottom: 1.25rem;
}

.hero-panel-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text-primary);
}

.hero-panel-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 11.5rem;
  padding: 2rem 1.5rem 1.85rem;
  background: #fff;
  border: 1px solid rgba(68, 64, 60, 0.08);
  border-radius: var(--radius);
}

.hero-panel-he {
  font-family: var(--font-hebrew);
  font-size: clamp(2.75rem, 4.5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.05;
  direction: rtl;
  unicode-bidi: isolate;
  color: var(--text-primary);
}

.hero-panel-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  max-width: 17.5rem;
}

.hero-panel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  text-align: center;
}

.hero-panel-col + .hero-panel-col {
  border-left: 1px solid var(--border-light);
}

.hero-panel-col-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.hero-panel-col-ipa {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.3;
}

.hero-panel-col .pron-audio {
  justify-content: center;
  flex-wrap: wrap;
}

.hero-panel-col .pron-audio .hero-panel-col-ipa {
  flex-basis: 100%;
}

.hero-panel-col--formal .hero-panel-col-ipa {
  color: #9f1239;
  text-decoration: line-through;
  text-decoration-color: #e11d48;
  text-decoration-thickness: 1.5px;
}

.hero-panel-col--spoken .hero-panel-col-ipa {
  font-size: 1.08rem;
  font-weight: 500;
  color: #047857;
}

.hero-panel-meta {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-top: 1.15rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.hero-panel-meta-sep {
  color: var(--text-muted);
  opacity: 0.65;
}

.stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
}

.align-demo-caption,
.method-demo-caption {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.align-demo-caption code,
.method-demo-caption code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--text-primary);
}

.align-demo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.align-demo-source {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(68, 64, 60, 0.12);
}

.align-demo-head .method-demo-caption {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.align-demo-gloss {
  color: var(--text-muted);
  font-size: 0.9em;
}

.align-grid {
  display: grid;
  gap: 0.34rem;
  padding: 0.5rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(68, 64, 60, 0.1);
}

.align-row {
  display: grid;
  grid-template-columns: 2.7rem repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
}

.align-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(68, 64, 60, 0.1);
  border-radius: 7px;
}

.align-inputs {
  display: grid;
  gap: 0.34rem;
  padding: 0.42rem;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(68, 64, 60, 0.12);
}

.align-input-title,
.align-output-title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.align-output-title {
  margin: 0.08rem 0 0.1rem;
  padding-left: 3.05rem;
}

.align-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem;
  margin: 0.3rem 0 0.08rem;
  color: var(--text-muted);
}

.align-bridge span {
  height: 1px;
  background: rgba(68, 64, 60, 0.12);
}

.align-bridge b {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.align-pair-row {
  display: grid;
  grid-template-columns: 2.7rem repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
}

.align-pair {
  display: grid;
  grid-template-rows: 3.05rem 3.25rem;
  gap: 0;
  min-width: 0;
  padding: 0.18rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(68, 64, 60, 0.1);
}

.align-input-axis {
  display: grid;
  grid-template-rows: 3.05rem 3.25rem;
  gap: 0.36rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.align-input-axis span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(68, 64, 60, 0.1);
}

.align-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.42rem 0.32rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-primary);
  border-radius: 7px 7px 3px 3px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(68, 64, 60, 0.1);
  border-bottom-color: rgba(68, 64, 60, 0.06);
}

.align-row-label--sigma {
  font-family: var(--font-body);
  font-style: italic;
}

.align-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.42rem 0.32rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-primary);
  background: #fafafa;
  border: 1px solid var(--border-light);
}

.align-pair .align-cell.he {
  font-family: var(--font-hebrew);
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: rgba(68, 64, 60, 0.14);
  border-radius: 3px 3px 7px 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  direction: rtl;
  unicode-bidi: isolate;
}

.align-cell code {
  font-family: var(--font-mono);
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.align-cell.muted {
  color: var(--text-muted);
  font-size: inherit;
}

.align-cell--stress {
  color: var(--text-primary);
  font-weight: 600;
}

.align-cell--link {
  cursor: crosshair;
  outline: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.align-cell--link:hover,
.align-cell--link:focus,
.align-cell--link.is-linked {
  color: var(--text-primary);
  background: rgba(5, 150, 105, 0.09);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
}

.align-cell--link:focus-visible {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12), inset 0 0 0 1px rgba(5, 150, 105, 0.18);
}

[data-align-part] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.65em;
  border-radius: 4px;
  cursor: crosshair;
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.align-pair.is-linked {
  border-color: rgba(5, 150, 105, 0.24);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.1);
}

[data-align-part].is-linked {
  color: var(--text-primary);
  opacity: 1;
  background: rgba(5, 150, 105, 0.16);
  box-shadow: inset 0 -1px 0 rgba(5, 150, 105, 0.24);
}

.align-demo-note,
.method-demo-note {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.align-demo-note code,
.method-demo-note code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--text-secondary);
}

/* Page body */

.page-body {
  background: var(--bg-light);
}

.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-light-2); }

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head.left { text-align: left; }

.section-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--text-secondary);
  max-width: 34rem;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.55;
}

.section-head.left p { margin-inline: 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.prose p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.prose p:last-child { margin-bottom: 0; }

/* Examples (shared compare cards) */

.examples {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.he {
  font-family: var(--font-hebrew);
  font-weight: 600;
  text-align: right;
}

/* Method stages */

.method-stages {
  position: relative;
  max-width: 920px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.method-stages::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 3rem;
  bottom: 3rem;
  width: 1px;
  background: linear-gradient(180deg, var(--border) 0%, rgba(68, 64, 60, 0.35) 50%, var(--border) 100%);
  pointer-events: none;
}

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.step-num {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 0 0 4px var(--bg-light-2);
}

.section-alt .step-num {
  box-shadow: 0 0 0 4px var(--bg-light-2);
}

.step-body {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.6rem 1.85rem;
  box-shadow: 0 4px 16px rgba(26, 23, 34, 0.05);
}

.step-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.step-body > p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.step-body .pipeline-demo,
.step-body .align-demo {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.step-body .align-demo {
  margin-bottom: 1rem;
}

.step-body .chips {
  margin-top: 0.15rem;
}

.pipeline-filter {
  padding: 0.85rem;
  border-radius: 10px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
}

.pipeline-filter-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.65rem;
}

.pipeline-verdicts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pipeline-verdict {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #fff;
}

.pipeline-verdict-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 4rem;
  justify-content: center;
}

.pipeline-verdict-pair code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.pipeline-verdict--fail .pipeline-verdict-pair code,
.pipeline-verdict--fail .he-glyphs {
  color: var(--text-muted);
}

.pipeline-verdict-tag {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.pipeline-verdict--pass .pipeline-verdict-tag {
  color: #047857;
  background: #ecfdf5;
}

.pipeline-verdict--fail .pipeline-verdict-tag {
  color: #9f1239;
  background: #fff1f2;
}

.pipeline-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pipeline-asr {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  min-height: 5.5rem;
}

.pipeline-asr-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pipeline-asr-out {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 3rem;
  padding: 0.45rem;
  border-radius: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
}

.pipeline-asr-out code {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
}

.he-glyphs--compact {
  font-size: 1.35rem;
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow: visible;
}

.chip {
  position: relative;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.chip--tip {
  cursor: help;
  outline: none;
}

.chip--tip:focus-visible {
  border-color: rgba(68, 64, 60, 0.35);
  box-shadow: 0 0 0 3px rgba(68, 64, 60, 0.1);
}

.chip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.6rem);
  z-index: 20;
  display: grid;
  gap: 0.35rem;
  width: max-content;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.7rem 0.78rem;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(68, 64, 60, 0.14);
  box-shadow: 0 14px 34px rgba(30, 27, 40, 0.12);
  color: var(--text-secondary);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.25rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.chip-tip::after {
  content: "";
  position: absolute;
  left: calc(50% + var(--caret-shift, 0px));
  bottom: -0.36rem;
  width: 0.7rem;
  height: 0.7rem;
  background: #ffffff;
  border-right: 1px solid rgba(68, 64, 60, 0.14);
  border-bottom: 1px solid rgba(68, 64, 60, 0.14);
  transform: translateX(-50%) rotate(45deg);
}

.chip--tip:hover .chip-tip,
.chip--tip:focus-visible .chip-tip,
.chip--tip:focus-within .chip-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chip-tip-title {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.chip-tip code {
  display: block;
  max-width: 100%;
  padding: 0.42rem 0.5rem;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  background: var(--accent-soft);
  border: 1px solid rgba(68, 64, 60, 0.1);
}

.chip-tip-note {
  display: block;
  max-width: 16rem;
  font-size: 0.74rem;
  line-height: 1.35;
}

/* Spoken examples — typographic compare */

.spoken-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.compare-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.35rem;
  box-shadow: 0 2px 16px rgba(26, 23, 34, 0.04);
  direction: ltr;
}

.compare-category {
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.compare-he {
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.he-glyphs {
  display: block;
  width: 100%;
  font-family: var(--font-hebrew);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  text-align: right;
  direction: rtl;
  unicode-bidi: isolate;
}

.he-glyphs--inline {
  display: inline;
  width: auto;
  font-size: inherit;
  font-weight: 600;
}

.align-demo-caption .he-glyphs--inline {
  font-size: 0.95em;
}

.compare-pron {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pron-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.pron-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  flex-shrink: 0;
}

.pron-baseline .pron-label {
  color: var(--text-secondary);
}

.pron-target .pron-label {
  color: #047857;
}

.pron-ipa {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: right;
  direction: ltr;
  unicode-bidi: isolate;
}

.pron-baseline .pron-ipa {
  color: #9f1239;
  text-decoration: line-through;
  text-decoration-color: #e11d48;
  text-decoration-thickness: 1.5px;
}

.pron-target .pron-ipa {
  font-size: 1.05rem;
  color: #065f46;
  font-weight: 500;
}

/* Pronunciation audio controls */

.pron-audio {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.pron-audio audio {
  display: none;
}

.audio-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(68, 64, 60, 0.14);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(30, 27, 40, 0.04);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.audio-play-btn:hover {
  border-color: rgba(68, 64, 60, 0.24);
  color: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(30, 27, 40, 0.08);
  transform: translateY(-1px);
}

.audio-play-btn.is-playing {
  background: var(--accent-soft);
  border-color: rgba(68, 64, 60, 0.2);
  color: var(--accent);
}

.audio-play-icon {
  display: block;
  width: 0.62rem;
  height: 0.72rem;
  margin-left: 0.08rem;
}

.audio-play-btn.is-playing .audio-play-icon {
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0;
}

/* Citation */

.cite {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 5rem 1.25rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(26, 23, 34, 0.04);
}

.cite pre {
  overflow-x: auto;
  margin: 0;
}

.cite pre code.hljs {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.75;
  padding: 0;
  background: transparent;
  tab-size: 2;
}

.cite .hljs {
  background: transparent;
  color: var(--text-primary);
}

.cite .hljs-keyword {
  color: #6d28d9;
  font-weight: 600;
}

.cite .hljs-symbol {
  color: #0369a1;
  font-weight: 500;
}

.cite .hljs-attr {
  color: #b45309;
  font-weight: 500;
}

.cite .hljs-string {
  color: #047857;
}

.cite .hljs-punctuation {
  color: var(--text-muted);
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-light);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

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

/* Footer */

.footer {
  background: var(--bg-light);
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 768px) {
  .nav { display: none; }

  .hero {
    padding: 2rem 1.5rem 2.35rem;
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    display: flex;
  }

  .hero .wrap {
    width: 100%;
  }

  .hero-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1.35rem;
    align-items: stretch;
  }

  .hero-main {
    padding-top: 0;
  }

  .kicker {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.45rem, 9.5vw, 3.15rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin-bottom: 0.7rem;
  }

  .paper-title {
    font-size: 1.08rem;
    line-height: 1.42;
    max-width: 31rem;
    margin-bottom: 1.15rem;
  }

  .hero-lead {
    font-size: 1rem;
    max-width: 33rem;
    margin-bottom: 1.65rem;
    line-height: 1.65;
  }

  .author-block {
    margin-bottom: 1.55rem;
    padding-bottom: 1.35rem;
  }

  .author-line {
    gap: 0.4rem 0.9rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .affil-line {
    gap: 0.3rem 0.75rem;
    margin-top: 0.55rem;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .author-footnote {
    margin-top: 0.6rem;
  }

  .hero-aside {
    display: flex;
    min-height: auto;
  }

  .hero-panel {
    padding: 1.15rem;
  }

  .hero-panel-stage {
    min-height: 0;
    padding: 1.1rem 1rem;
    gap: 0.85rem;
  }

  .hero-panel-compare {
    max-width: none;
  }

  .two-col,
  .spoken-grid {
    grid-template-columns: 1fr;
  }

  .method-stages::before {
    display: none;
  }

  .align-demo-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .pipeline-split,
  .pipeline-verdicts {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
    padding-top: 0;
  }

  .btn {
    flex: 1 1 calc(50% - 0.25rem);
    padding: 0.62rem 0.75rem;
  }

  /* Body sections */
  .section {
    padding: 2.75rem 0;
  }

  .page-body > .section:first-child {
    padding-top: 2.25rem;
  }

  .section-head {
    margin-bottom: 2rem;
  }

  .section-head.left {
    text-align: center;
  }

  .section-head.left p,
  .section-head.left h2 {
    margin-inline: auto;
  }

  .wrap.narrow {
    max-width: 100%;
  }

  .prose p {
    padding-inline: 0.15rem;
  }

  /* Method — badge inside card */
  .method-stages {
    gap: 1.35rem;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step-num {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    width: 38px;
    height: 38px;
    margin: 1rem 0 0 1rem;
    font-size: 0.925rem;
    box-shadow: 0 0 0 3px var(--bg-light-2);
  }

  .step-body {
    grid-column: 1;
    grid-row: 1;
    padding: 1.15rem 1.15rem 1.25rem;
  }

  .step-body h3 {
    font-size: 1.05rem;
    padding-left: 2.85rem;
    min-height: 2.35rem;
    display: flex;
    align-items: center;
  }

  .step-body .pipeline-demo,
  .step-body .align-demo {
    width: 100%;
    max-width: 22rem;
    margin-inline: auto;
    text-align: center;
  }

  .step-body .method-demo-caption,
  .step-body .method-demo-note,
  .step-body .align-demo-note {
    text-align: center;
  }

  .step-body .chips {
    justify-content: center;
  }


  .align-row {
    grid-template-columns: 2.45rem repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .align-pair-row {
    grid-template-columns: 2.45rem repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .align-pair,
  .align-input-axis {
    grid-template-rows: 2.7rem 2.7rem;
  }

  .align-guide {
    min-height: 2.7rem;
    font-size: 0.82rem;
  }

  .align-cell {
    min-height: 2.7rem;
  }

  .align-pair .align-cell.he {
    font-size: 1.28rem;
  }

  .align-output-title {
    padding-left: 2.7rem;
  }
}

@media (max-width: 480px) {
  .hero { padding: 1.55rem 1.25rem 1.9rem; }

  .hero .wrap {
    width: 100%;
  }

  .hero-grid {
    gap: 1.15rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 11vw, 2.55rem);
    margin-bottom: 0.55rem;
  }

  .paper-title {
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 1.05rem;
  }

  .hero-lead {
    display: none;
  }

  .author-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.1rem;
  }

  .author-line {
    gap: 0.35rem 0.75rem;
    font-size: 0.9rem;
  }

  .affil-line {
    gap: 0.25rem 0.65rem;
    font-size: 0.78rem;
  }

  .author-footnote {
    display: none;
  }

  .cta-row {
    padding-top: 0;
  }

  .hero-panel {
    padding: 1rem;
  }

  .hero-panel-head {
    margin-bottom: 0.8rem;
  }

  .hero-panel-title {
    font-size: 1rem;
  }

  .hero-panel-he {
    font-size: clamp(2.15rem, 13vw, 2.8rem);
  }

  .hero-panel-col-label {
    font-size: 0.68rem;
  }

  .hero-panel-col-ipa,
  .hero-panel-col--spoken .hero-panel-col-ipa {
    font-size: 0.82rem;
  }

  .hero-panel-meta {
    margin-top: 0.75rem;
    font-size: 0.68rem;
  }

  .section {
    padding: 2.35rem 0;
  }

  .page-body > .section:first-child {
    padding-top: 1.85rem;
  }

  .step-body h3 {
    padding-left: 2.55rem;
    min-height: 2.15rem;
  }

  .step-num {
    width: 34px;
    height: 34px;
    margin: 0.9rem 0 0 0.85rem;
    font-size: 0.875rem;
  }
}
