:root {
  --bg: #fafafa; --card-bg: #fff; --border: #ddd;
  --accent: #4a90d9; --hi-old: #fdd; --hi-new: #dfd;
  --cat-meteg-removal: #1565c0;
  --cat-meteg-addition: #1e88e5;
  --cat-rafe: #2e7d32;
  --cat-varika: #00695c;
  --cat-accent-change: #ef6c00;
  --cat-accent-addition: #e65100;
  --cat-accent-removal: #f57c00;
  --cat-vowel-change: #6a1b9a;
  --cat-legarmeih-paseq: #ad1457;
  --cat-maqaf-afor: #78909c;
  --cat-dehi-removal: #c62828;
  --cat-tsinnor-removal: #0097a7;
  --cat-template-change: #795548;
  --cat-misc: #37474f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font: 15px/1.6 "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: #333;
  padding: 0 2rem 1.5rem; max-width: 1100px; margin: 0 auto;
}
h1 { font-size: 1.5rem; margin-bottom: .3rem; margin-top: 1rem; }
h2 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: .5rem; }
.subtitle { color: #666; font-size: .9rem; margin-bottom: 1.5rem; }
table.subtitle {
  border-collapse: collapse; margin-bottom: .5rem; max-width: 420px;
}
table.subtitle th, table.subtitle td {
  text-align: left; padding: .2rem .75rem; border-bottom: 1px solid var(--border);
}
table.subtitle th { background: #f0f0f0; font-weight: 600; }
table.summary {
  border-collapse: collapse; margin-bottom: 1.5rem; width: 100%; max-width: 500px;
}
table.summary th, table.summary td {
  text-align: left; padding: .35rem .75rem; border-bottom: 1px solid var(--border);
}
table.summary th { background: #f0f0f0; font-weight: 600; }
table.summary .cat-swatch {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 2px; margin-right: 6px; vertical-align: middle;
}
table.summary tr[data-cat] { cursor: pointer; }
table.summary tr[data-cat]:hover { background: #f5f5f5; }
table.summary tr.active { background: var(--accent); color: #fff; }
table.summary tr.total-row { font-weight: 600; cursor: default; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.filter-btn {
  font-size: .8rem; padding: .25rem .6rem;
  border: 1px solid var(--border); border-radius: 4px;
  background: #fff; cursor: pointer; transition: background .15s;
}
.filter-btn:hover { background: #eee; }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.diff-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: .5rem .8rem; margin-bottom: .4rem;
}
.diff-card.hidden { display: none; }
.verse-ref { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.ref-text { font-weight: 600; font-size: .9rem; }
.ref-link {
  font-size: .75rem; font-weight: normal;
  color: var(--accent); text-decoration: none; margin-left: .3rem;
}
.ref-link:hover { text-decoration: underline; }
.cat-badge {
  font-size: .7rem; padding: .1rem .45rem; border-radius: 3px;
  color: #fff; white-space: nowrap;
}
.heb {
  font-family: "Taamey D WOFF2", "SBL Hebrew", "Ezra SIL", "David", "Times New Roman", serif;
  font-size: 20pt; direction: rtl; unicode-bidi: embed;
  font-feature-settings: 'ss01';
}
.change-display {
  display: flex; align-items: center; gap: .5rem; margin-top: .2rem; flex-wrap: wrap;
}
.old-side, .new-side { padding: .15rem .5rem; border-radius: 4px; }
.old-side { background: var(--hi-old); }
.new-side { background: var(--hi-new); }
.old-side mark.diff-hi { background: #f9a0a0; border-radius: 2px; }
.new-side mark.diff-hi { background: #a0d8a0; border-radius: 2px; }
.arrow { font-size: 1.1rem; color: #888; }
.change-desc { font-size: .85rem; color: #555; }
.book-header { margin-top: 1.2rem; margin-bottom: .3rem; }
.book-header.hidden { display: none; }
.nusach-note {
  border-left: 3px solid #f9a825;
  background: #fffde7;
  padding: .3rem .6rem;
  margin-top: .3rem;
  border-radius: 4px;
}
.nusach-label {
  font-weight: 600;
  color: #f57f17;
  font-size: .8rem;
}
.nusach-body {
  direction: rtl;
  unicode-bidi: embed;
  margin-top: .1rem;
  font-size: .85rem;
}
.pointed-heb {
  font-family: "Taamey D WOFF2", "SBL Hebrew", "Ezra SIL", "David", "Times New Roman", serif;
  font-size: 20pt;
  font-feature-settings: 'ss01';
}
.letter-large { font-size: 130%; }
.letter-small { font-size: 75%; }
.letter-hung { vertical-align: super; font-size: 85%; }
@media (max-width: 700px) {
  .change-display { flex-direction: column; align-items: flex-start; }
}
ruby.paseq-ruby {
  ruby-position: over;
}
ruby.paseq-ruby rt {
  font-size: 60%;
  font-weight: normal;
  color: #888;
}
ruby.kq-pair rt {
  font-size: 20pt;
  font-family: "Taamey D WOFF2", "SBL Hebrew", "Ezra SIL", "David", "Times New Roman", serif;
  font-feature-settings: 'ss01';
}
.kq-k { color: #6a1b9a; }
.kq-q { color: #1565c0; }
.gray-maqaf { color: gray; }
.cat-meteg-removal { background: var(--cat-meteg-removal); }
.cat-meteg-addition { background: var(--cat-meteg-addition); }
.cat-rafe { background: var(--cat-rafe); }
.cat-varika { background: var(--cat-varika); }
.cat-accent-change { background: var(--cat-accent-change); }
.cat-accent-addition { background: var(--cat-accent-addition); }
.cat-accent-removal { background: var(--cat-accent-removal); }
.cat-vowel-change { background: var(--cat-vowel-change); }
.cat-legarmeih-paseq { background: var(--cat-legarmeih-paseq); }
.cat-maqaf-afor { background: var(--cat-maqaf-afor); }
.cat-dehi-removal { background: var(--cat-dehi-removal); }
.cat-tsinnor-removal { background: var(--cat-tsinnor-removal); }
.cat-template-change { background: var(--cat-template-change); }
.cat-misc { background: var(--cat-misc); }
@font-face {
    font-family: "Taamey D WOFF2";
    src: url("woff2/Taamey_D.woff2");
}