/* ===== עמוק – עיצוב ===== */
:root {
  --surface: #6fd0e8;
  --shallow: #1b8fb5;
  --mid: #0b5579;
  --deep: #062a47;
  --abyss: #020d1c;

  --text: #f2f8fb;
  --text-dim: rgba(242, 248, 251, 0.72);
  --text-faint: rgba(242, 248, 251, 0.5);
  --accent: #ffcf5c;
  --accent-2: #5fe0c9;
  --warn: #ff8a6b;

  --card: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.14);
  --radius: 14px;

  --font: "Assistant", "Heebo", "Rubik", "Arial Hebrew", "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--abyss);
  /* the gradient spans the full page, so it darkens as you scroll down */
  background-image: linear-gradient(to bottom,
    var(--surface) 0%,
    var(--shallow) 9%,
    var(--mid) 24%,
    var(--deep) 48%,
    var(--abyss) 78%);
  overflow-x: hidden;
}

a { color: var(--accent-2); }
a:hover { color: var(--accent); }
strong { color: #fff; }

/* ===== hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  overflow: hidden;
}
.hero-kicker {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: rgba(2, 30, 50, 0.7);
  font-weight: 700;
}
.hero-title {
  margin: 0.1em 0 0.15em;
  font-size: clamp(5rem, 22vw, 11rem);
  line-height: 1;
  font-weight: 800;
  color: #03263f;
  letter-spacing: -0.02em;
}
.hero-sub {
  max-width: 34ch;
  margin: 0 auto 2rem;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: #052f4c;
  font-weight: 600;
}
.hero-cta {
  display: inline-block;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  background: #03263f;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.hero-cta:hover { color: var(--accent); }

.bubbles span {
  position: absolute;
  bottom: -40px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  animation: rise 11s linear infinite;
  opacity: 0;
}
.bubbles span:nth-child(1) { left: 8%;  animation-delay: 0s; }
.bubbles span:nth-child(2) { left: 22%; animation-delay: 3s; width: 9px; height: 9px; }
.bubbles span:nth-child(3) { left: 37%; animation-delay: 6s; }
.bubbles span:nth-child(4) { left: 52%; animation-delay: 1.5s; width: 20px; height: 20px; }
.bubbles span:nth-child(5) { left: 66%; animation-delay: 4.5s; width: 8px; height: 8px; }
.bubbles span:nth-child(6) { left: 78%; animation-delay: 7.5s; }
.bubbles span:nth-child(7) { left: 90%; animation-delay: 2.5s; width: 11px; height: 11px; }
.bubbles span:nth-child(8) { left: 45%; animation-delay: 9s; width: 6px; height: 6px; }
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .bubbles { display: none; } }

/* ===== depth gauge ===== */
.depth-gauge {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.depth-track {
  width: 4px;
  height: 38vh;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.depth-fill {
  width: 100%;
  height: 0%;
  background: var(--accent);
  border-radius: 4px;
}
.depth-readout {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  direction: ltr;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.depth-unit { font-size: 0.75em; margin-inline-start: 2px; opacity: 0.8; }

/* ===== chapter nav ===== */
.chapters-nav {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chapters-nav a {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-decoration: none;
  padding: 2px 10px;
  border-right: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.chapters-nav a:hover,
.chapters-nav a.active { color: var(--text); border-right-color: var(--accent); }
@media (max-width: 1100px) { .chapters-nav { display: none; } }
@media (max-width: 640px) {
  .depth-gauge { left: 6px; }
  .depth-track { height: 26vh; }
  .depth-readout { font-size: 0.75rem; }
}

/* ===== chapters ===== */
.chapter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18vh 16px 10vh;
  padding-inline-start: 16px;
}
@media (max-width: 640px) { .chapter { padding-left: 34px; } }

.chapter-head { margin-bottom: 2.2rem; }
.chapter-depth {
  display: inline-block;
  font-weight: 800;
  color: var(--accent);
  direction: ltr;
  font-size: 0.9rem;
  margin-inline-end: 12px;
}
.chapter-num { font-size: 0.9rem; color: var(--text-faint); }
.chapter-head h2 {
  margin: 0.2em 0 0;
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
}
.sub { font-size: 1.4rem; margin: 2.5rem 0 1rem; }
.prose p { margin: 0 0 1.1em; color: var(--text-dim); }
.prose p strong { color: var(--text); }

/* ===== timeline ===== */
.timeline {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
}
.timeline li {
  position: relative;
  padding: 0 28px 2rem 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 0.55em;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 207, 92, 0.2);
}
.t-year {
  display: block;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1.3;
}
.t-body h3 { margin: 0.2em 0 0.3em; font-size: 1.2rem; }
.t-body p { margin: 0 0 0.6em; color: var(--text-dim); }

/* ===== quotes ===== */
.law-quote {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  border-right: 3px solid var(--accent-2);
  background: rgba(95, 224, 201, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
}
.law-quote cite, .pull-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.pull-quote {
  margin: 3rem 0;
  padding: 0;
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  line-height: 1.5;
  font-weight: 700;
}
.pull-quote::before {
  content: "״";
  display: block;
  font-size: 4rem;
  line-height: 0.6;
  color: var(--accent);
}

/* ===== roof diagram ===== */
.split-diagram { margin: 2.5rem 0; }
.roof {
  position: relative;
  padding: 3.2rem 1.2rem 1.2rem;
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
}
.roof::before {
  content: "";
  position: absolute;
  top: -26px; left: 50%;
  transform: translateX(-50%);
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-bottom: 26px solid rgba(255, 255, 255, 0.14);
}
.roof-label {
  position: absolute;
  top: 0.8rem; left: 0; right: 0;
  text-align: center;
  font-weight: 800;
}
.roof-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role {
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  line-height: 1.4;
}
.role small { font-weight: 400; color: var(--text-dim); }
.role-reg { background: rgba(95, 224, 201, 0.16); border: 1px solid rgba(95, 224, 201, 0.4); }
.role-biz { background: rgba(255, 138, 107, 0.16); border: 1px solid rgba(255, 138, 107, 0.4); }
.split-diagram figcaption { margin-top: 0.8rem; font-size: 0.9rem; color: var(--text-faint); }

/* ===== cards ===== */
.cards { display: grid; gap: 12px; margin: 1.5rem 0 2rem; }
.members { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.recs { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.card-role { display: block; font-size: 0.8rem; color: var(--text-faint); }
.card-name { font-weight: 700; }
.rec h4 { margin: 0.3rem 0 0.4rem; font-size: 1.1rem; }
.rec p { margin: 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }
.rec-n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #1a1300; font-weight: 800;
}

.doc-callout {
  display: flex; gap: 16px; align-items: center;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
}
.doc-callout h4 { margin: 0; }
.doc-callout p { margin: 0; color: var(--text-faint); font-size: 0.9rem; }
.doc-icon {
  flex: none;
  width: 48px; height: 58px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem; font-weight: 800;
}

/* ===== stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 2rem 0;
}
.stat {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.stat-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-suffix { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat p { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }

/* ===== compare ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 1rem 0 2rem;
}
.compare-col {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.compare-col h3 { font-size: 1.05rem; margin: 0.4rem 0 0.6rem; line-height: 1.4; }
.compare-col p { color: var(--text-dim); margin: 0.5rem 0 0; font-size: 0.95rem; }
.compare-tag { font-weight: 800; color: var(--accent); font-size: 1.4rem; }
.compare-vs { align-self: center; font-size: 2rem; color: var(--text-faint); }
@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; }
  .compare-vs { transform: rotate(-90deg); justify-self: center; }
}

.position {
  margin: 2rem 0;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  background: rgba(255, 207, 92, 0.09);
  border: 1px solid rgba(255, 207, 92, 0.4);
}
.position-tag {
  display: inline-block;
  font-size: 0.8rem; font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent); color: #1a1300;
  margin-bottom: 0.6rem;
}
.position p { margin: 0 0 0.7em; }

/* ===== chart ===== */
.chart-card {
  margin: 2rem 0;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.chart-card h3 { margin: 0; font-size: 1.15rem; }
.chart-note { margin: 0.2rem 0 1rem; font-size: 0.85rem; color: var(--text-faint); }
.chart { width: 100%; min-height: 260px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { fill: var(--text-faint); font-size: 12px; font-family: var(--font); }
.chart .grid line { stroke: rgba(255, 255, 255, 0.1); }
.chart-empty {
  display: grid; place-items: center;
  min-height: 260px;
  border: 1px dashed var(--card-border);
  border-radius: 10px;
  color: var(--text-faint);
  text-align: center;
  padding: 1rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 1rem; font-size: 0.9rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-tip {
  position: fixed; z-index: 50; pointer-events: none;
  background: #021526; border: 1px solid var(--card-border);
  border-radius: 8px; padding: 6px 10px; font-size: 0.85rem;
  opacity: 0; transition: opacity .12s;
}
.source-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; color: var(--text-faint); }

/* ===== documents ===== */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--card-border);
}
.doc-list h4 { margin: 0 0 0.2rem; font-size: 1.05rem; line-height: 1.4; }
.doc-list p { margin: 0 0 0.3rem; color: var(--text-dim); font-size: 0.92rem; }
.doc-date { font-weight: 800; color: var(--accent); }
.doc-list li.pending { opacity: 0.55; }
@media (max-width: 640px) { .doc-list li { grid-template-columns: 1fr; gap: 4px; } }

/* ===== footer ===== */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 16px 5rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.footer-note { max-width: 52ch; margin: 0.5rem auto 0; }

/* ===== reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ===== fee table (ch3) ===== */
.fee-table {
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.fee-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.6fr;
  gap: 12px;
  padding: 0.7rem 1.1rem;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
}
.fee-row:last-child { border-bottom: 0; }
.fee-row span:last-child { color: var(--text-dim); font-size: 0.92rem; }
.fee-row strong { color: var(--accent); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .fee-row { grid-template-columns: 1fr auto; } .fee-row span:last-child { grid-column: 1 / -1; } }

.callout-insurance {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  background: rgba(255, 138, 107, 0.1);
  border: 1px solid rgba(255, 138, 107, 0.45);
}
.callout-insurance .position-tag { background: var(--warn); }
.callout-insurance p { margin: 0 0 0.6em; }

a.doc-callout { color: inherit; text-decoration: none; margin-top: 2rem; transition: border-color .2s, background .2s; }
a.doc-callout:hover { border-color: var(--accent); background: var(--card); }
a.doc-callout p { color: var(--text-dim); }

/* ===== comptroller box ===== */
.audit {
  margin: 2.5rem 0;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--accent-2);
}
.audit-tag { display: block; font-size: 0.8rem; font-weight: 800; color: var(--accent-2); margin-bottom: 0.4rem; }
.audit h3 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.audit p { margin: 0 0 0.8em; color: var(--text-dim); }
.audit ul { margin: 0 0 0.8em; padding-inline-start: 1.2rem; color: var(--text-dim); }
.audit li { margin-bottom: 0.4em; }
.audit .big { font-size: 2rem; font-weight: 800; color: var(--accent); display: block; line-height: 1.2; }

/* ===== salaries (ch6) ===== */
.salaries { margin: 1rem 0 2rem; }
.sal-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.95rem;
}
.sal-role small { color: var(--text-faint); }
.sal-bar { height: 10px; background: rgba(255, 255, 255, 0.08); border-radius: 5px; overflow: hidden; }
.sal-bar i { display: block; height: 100%; background: var(--warn); border-radius: 5px; }
.sal-amt { font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 480px) { .sal-row { grid-template-columns: 1fr auto; } .sal-bar { grid-column: 1 / -1; grid-row: 2; } }
.chart-card + .chart-card { margin-top: 1.2rem; }
.caveats { font-size: 0.88rem; color: var(--text-faint); }
.caveats li { margin-bottom: 0.4em; }

.stat .stat-suffix { font-size: 1.1rem; }
.chart:has(svg) { min-height: 0; }
.position ul { margin: 0 0 0.8em; padding-inline-start: 1.2rem; }
.position li { margin-bottom: 0.4em; }

/* ===== rights section ===== */
.rights-lead { font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; }
.rec small { display: block; margin-top: 0.4rem; color: var(--text-faint); font-size: 0.8rem; }

.letter-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.field-wide, .letter-form .btn-primary, .form-error { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.9rem; color: var(--text-dim); }
.field b { color: var(--accent); }
.field input, .field select {
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.field select option { color: #111; }
.radio { display: flex; gap: 8px; align-items: center; color: var(--text) !important; font-size: 0.95rem !important; }
.field-amount { margin-top: 6px; max-width: 220px; }
.form-error { color: var(--warn); margin: 0; }
@media (max-width: 640px) { .letter-form { grid-template-columns: 1fr; } }

.btn-primary, .btn-ghost {
  font: inherit; font-weight: 700;
  padding: 0.65em 1.4em;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #1a1300; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--card-border); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost:hover { border-color: var(--accent); }

.letter-out { margin-top: 2rem; }
.letter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 1rem; }
.copy-ok { color: var(--accent-2); font-weight: 700; }
.letter-paper {
  background: #fdfdfb;
  color: #1b1b1b;
  padding: 2rem 2.2rem;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.75;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.letter-paper strong { color: #000; }
.letter-paper ol { padding-inline-start: 1.4rem; }
.letter-paper li { margin-bottom: 0.5em; }
.lp-date { text-align: left; }
.lp-sign { margin-top: 1.5rem; }
@media (max-width: 640px) { .letter-paper { padding: 1.3rem 1.1rem; } }

@media print {
  body.printing-letter * { visibility: hidden !important; }
  body.printing-letter .letter-paper, body.printing-letter .letter-paper * { visibility: visible !important; }
  body.printing-letter .letter-paper { position: absolute; inset: 0; box-shadow: none; padding: 0; }
  body.printing-letter { background: #fff !important; }
}


/* ===== per-member comparison (ch6) ===== */
.per-member {
  margin: 2rem 0;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--accent);
}
.pm-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 0.6rem 0 1.2rem; }
.pm-col p { margin: 0.3rem 0 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }
.pm-col small { color: var(--text-faint); }
.pm-num { display: block; font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.pm-num.pm-ins { color: #8fa8bf; }
.pm-vs { font-size: 1.8rem; color: var(--text-faint); }
.pm-bar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 700; }
.pm-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; padding: 0 8px; text-align: center; line-height: 1.2; }
.pm-bar-ins { background: #8fa8bf; color: #0b1a26; }
.pm-bar-kept { background: var(--accent); color: #1a1300; }
.per-member > p { margin: 0 0 0.8rem; color: var(--text-dim); }
.pm-calc summary { cursor: pointer; color: var(--accent-2); font-weight: 700; }
.pm-calc ul { margin: 0.6rem 0 0; padding-inline-start: 1.2rem; color: var(--text-faint); font-size: 0.88rem; }
.pm-calc li { margin-bottom: 0.4em; }
@media (max-width: 560px) {
  .pm-compare { grid-template-columns: 1fr; }
  .pm-vs { transform: rotate(-90deg); justify-self: center; }
  .pm-bar { height: auto; flex-direction: column; }
  .pm-bar i { width: 100% !important; padding: 8px; }
}
