:root {
  --bg: #f5f0e7;
  --paper: #fffaf0;
  --panel: #fffdf7;
  --ink: #1d1a16;
  --muted: #6f655b;
  --border: #d8cbb8;
  --accent: #8f2d22;
  --accent-dark: #692018;
  --gold: #c89a35;
  --green: #193d2e;
  --shadow: 0 18px 38px rgba(55, 38, 18, .14);
  --soft-shadow: 0 7px 0 rgba(80, 55, 20, .24), 0 16px 24px rgba(45, 29, 8, .12);
}
* { box-sizing: border-box; }
html { direction: rtl; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
  background: radial-gradient(circle at top right, #fff4db 0, var(--bg) 36%, #ece5d8 100%);
  color: var(--ink);
  line-height: 1.65;
  text-align: right;
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 240, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--green), #245a43);
  color: #fff7df;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
  flex: 0 0 auto;
}
.brand-text { font-weight: 800; font-size: clamp(1rem, 2vw, 1.25rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a, .nav-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 13px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}
.nav-links a:hover, .nav-links a.active { background: #efe2cf; color: var(--ink); border-color: var(--border); }
.nav-toggle { display: none; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 32px 18px 56px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 18px;
}
.hero-copy, .hero-card, .method-card, .correction-box, .filters-panel, .time-jump, .record-detail {
  background: rgba(255, 253, 247, .88);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: clamp(28px, 5vw, 54px); }
.hero-card { padding: 26px; border-top: 7px solid var(--gold); }
.eyebrow { color: var(--accent); font-weight: 900; letter-spacing: .06em; margin: 0 0 8px; }
h1 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.07; margin: 0 0 18px; }
h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 2.4vw, 2rem); }
h3 { margin: 0 0 8px; }
.lead { font-size: clamp(1.12rem, 2vw, 1.45rem); margin: 0 0 18px; color: #3d352e; }
.principle { font-weight: 800; background: #f2e5cf; border-right: 6px solid var(--gold); padding: 14px 18px; border-radius: 16px; }
.hero-actions, .section-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 16px;
  padding: 11px 18px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.12);
  cursor: pointer;
  transform: translateY(0);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn-primary { background: linear-gradient(145deg, var(--accent), var(--accent-dark)); color: #fff9ea; box-shadow: var(--soft-shadow); }
.btn-secondary { background: linear-gradient(145deg, #f5d286, #c49228); color: #2c1b05; box-shadow: var(--soft-shadow); }
.btn-small { min-height: 38px; padding: 8px 13px; background: #efe2cf; }
.btn:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(80, 55, 20, .24), 0 8px 14px rgba(45, 29, 8, .12); }
.stats-grid, .usage-grid, .method-grid { display: grid; gap: 16px; margin: 26px 0; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.usage-grid, .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card, .usage-grid article, .publication-card, .source-card, .entity-card, .event-card {
  background: rgba(255, 253, 247, .82);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(55, 38, 18, .08);
}
.stat-card strong { display: block; font-size: 2.2rem; line-height: 1; color: var(--green); }
.stat-card span { color: var(--muted); font-weight: 800; }
.panel-section, .usage-section { margin-top: 34px; }
.page-title { margin: 26px 0; }
.page-title h1 { margin-bottom: 8px; }
.filters-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(180px, 1fr) minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.filters-panel label { font-weight: 800; color: #3f352d; }
input, select {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 12px;
  font: inherit;
  background: #fffdf7;
  color: var(--ink);
}
.cards-list { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.cards-list.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.publication-card { display: grid; gap: 10px; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .95rem; font-weight: 800; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #efe2cf; border: 1px solid var(--border); font-weight: 800; }
.badge.trust-A { background: #e3f0df; color: #1f4d22; }
.badge.trust-B { background: #e5eef9; color: #244d75; }
.badge.trust-C { background: #f9edd0; color: #76510d; }
.card-title { font-size: 1.25rem; font-weight: 900; margin: 0; }
.card-summary { margin: 0; color: #3d352e; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: #f6ecd9; border: 1px solid #e4d4bd; color: #5d5044; border-radius: 999px; padding: 3px 9px; font-size: .9rem; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.time-jump { padding: 16px; margin: 18px 0; }
.year-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.year-button { border: 1px solid var(--border); background: #fff7e6; border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 900; }
.year-button.active { background: var(--green); color: #fff7df; }
.timeline-list { position: relative; display: grid; gap: 14px; margin-top: 16px; }
.event-card { border-right: 7px solid var(--gold); }
.record-detail { padding: clamp(18px, 4vw, 34px); }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.record-field { background: #f7edda; border-radius: 16px; padding: 12px; border: 1px solid var(--border); }
.record-field strong { display: block; color: var(--muted); margin-bottom: 4px; }
.alert-note { background: #fff2c9; border: 1px solid #e7ca79; border-right: 7px solid var(--gold); border-radius: 18px; padding: 14px 16px; font-weight: 700; }
.muted { color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); padding: 26px 18px; text-align: center; color: var(--muted); background: rgba(255,250,240,.72); }
ol { padding-right: 24px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stats-grid, .usage-grid, .method-grid, .cards-list.compact, .record-grid { grid-template-columns: 1fr; }
  .filters-panel { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; width: 100%; padding-top: 12px; }
  .nav-links.open { display: flex; }
  .nav-shell { flex-wrap: wrap; }
  .brand-text { white-space: normal; }
}
