/* RD&A Programming Questionnaire — Sohne + Assistant + chartreuse #cfff04 */
/* Design lineage: Vignelli grid · Crouwel typographic systems · Klim Type Foundry web · SO-IL studio */

@font-face {
  font-family: 'Sohne';
  src: url('fonts/Sohne-Leicht.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sohne';
  src: url('fonts/Sohne-Buch.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sohne';
  src: url('fonts/Sohne-Halbfett.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ─── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --ground:        #ffffff;
  --ink:           #121212;
  --ink-soft:      #6b6b6b;
  --ink-faint:     #a4a4a4;
  --rule:          #e6e6e6;
  --rule-strong:   #121212;
  --accent:        #cfff04;
  --accent-tint:   #f7ffce;
  --accent-tint-strong: #ecffae;
  --field-focus-bg: #f7ffce;

  --font-sans-en: 'Sohne', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-sans-he: 'Assistant', 'Sohne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --baseline: 8px;
  --rail-w:   240px;
  --content-w: 720px;
  --pad-block: clamp(48px, 8vh, 96px);
  --pad-inline: clamp(20px, 4vw, 56px);

  --t-fast: 120ms;
  --t-med:  240ms;
  --ease:   cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans-en);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'ss01' 1;
  min-height: 100vh;
}
html[lang="he"] body { font-family: var(--font-sans-he); font-weight: 400; }

button { font: inherit; cursor: pointer; }
input, textarea, select, button {
  font-family: inherit;
  color: inherit;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 12px 18px;
  z-index: 1000;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.skip-link:focus { inset-inline-start: 0; }

/* ─── App shell: rail + content ──────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 960px) {
  .app {
    grid-template-columns: var(--rail-w) 1fr;
  }
  html[dir="rtl"] .app {
    grid-template-columns: 1fr var(--rail-w);
  }
}

/* ─── Chapter rail ──────────────────────────────────────────────────── */
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: var(--pad-block) 32px;
  border-inline-end: 1px solid var(--rule);
  display: none;
  flex-direction: column;
  gap: 32px;
  background: var(--ground);
  overflow-y: auto;
}
html[dir="rtl"] .rail {
  border-inline-end: 1px solid var(--rule);
}
@media (min-width: 960px) { .rail { display: flex; grid-row: 1; } }
html[dir="ltr"] .rail { grid-column: 1; }
html[dir="rtl"] .rail { grid-column: 2; }

.rail-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-mark {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--ink);
}
.rail-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.rail-item {
  display: grid;
  grid-template-columns: 32px 12px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  text-align: start;
  width: 100%;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--ease);
}
.rail-item:hover { color: var(--ink); }
.rail-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.rail-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: inherit;
  font-weight: 400;
}
.rail-mark-dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink-faint);
  background: transparent;
  display: inline-block;
}
.rail-item[data-state="partial"] .rail-mark-dot { background: linear-gradient(to top, var(--accent) 50%, transparent 50%); border-color: var(--ink); }
.rail-item[data-state="complete"] .rail-mark-dot { background: var(--accent); border-color: var(--ink); }
.rail-item.is-current {
  color: var(--ink);
}
.rail-item.is-current .rail-num {
  background: var(--accent);
  padding: 2px 6px;
  margin-inline-start: -6px;
  color: var(--ink);
}
.rail-name {
  font-family: var(--font-sans-en);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
}
html[lang="he"] .rail-name { font-family: var(--font-sans-he); font-weight: 400; }

.rail-foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.rail-foot strong { color: var(--ink-soft); font-weight: 400; }
.rail-foot .rail-link {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: start;
  font-family: var(--font-sans-en);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 8px;
}
html[lang="he"] .rail-foot .rail-link { font-family: var(--font-sans-he); }
.rail-foot .rail-link:hover { color: var(--ink); background: var(--accent); padding: 2px 4px; text-decoration: none; }

/* ─── Mobile chapter pill (bottom-fixed) ─────────────────────────────── */
.mobile-rail {
  position: fixed;
  bottom: 16px;
  inset-inline: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 0;
  cursor: pointer;
  text-align: start;
}
.mobile-rail .mr-num { color: var(--accent); }
.mobile-rail .mr-arrow { margin-inline-start: auto; }
@media (min-width: 960px) { .mobile-rail { display: none; } }

/* ─── Content area ──────────────────────────────────────────────────── */
.content {
  padding-block: var(--pad-block);
  padding-inline: var(--pad-inline);
  max-width: calc(var(--content-w) + var(--pad-inline) * 2);
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.chapter { display: none; max-width: var(--content-w); }
.chapter.is-active { display: block; }

/* ─── Cover (Chapter 00) ────────────────────────────────────────────── */
.cover .masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-strong);
}
.cover .mh-mark {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--ink);
}
.cover .mh-client {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cover .mh-client img {
  display: block;
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
  width: auto;
}
.cover .mh-uploader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px dashed var(--ink-faint);
  background: transparent;
  font-family: var(--font-sans-en);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
html[lang="he"] .mh-uploader { font-family: var(--font-sans-he); letter-spacing: 0.06em; }
.cover .mh-uploader:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--accent-tint);
}
.cover .mh-uploader::before {
  content: '+';
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.cover .meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 16px 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.cover .meta-strip > span > strong {
  color: var(--ink);
  font-weight: 400;
  margin-inline-start: 6px;
}

.cover .cover-title {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 24px 0 6px;
  color: var(--ink);
}
html[lang="he"] .cover-title { font-family: var(--font-sans-he); font-weight: 500; }
.cover .cover-kicker {
  font-family: var(--font-sans-en);
  font-weight: 300;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  margin: 0;
}
html[lang="he"] .cover-kicker { font-family: var(--font-sans-he); font-weight: 300; }

.cover .cover-for {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}
.cover .cover-for-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cover .cover-for-input {
  font-family: var(--font-sans-en);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.3;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 6px 0;
  width: 100%;
  outline: none;
  letter-spacing: -0.005em;
}
html[lang="he"] .cover-for-input { font-family: var(--font-sans-he); }
.cover .cover-for-input:focus {
  border-bottom-width: 2px;
  border-bottom-color: var(--accent);
  background: var(--field-focus-bg);
  padding-inline: 6px;
}

.cover .cover-lede {
  margin-top: 56px;
  font-family: var(--font-sans-en);
  font-weight: 300;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 28ch;
}
html[lang="he"] .cover-lede { font-family: var(--font-sans-he); font-weight: 300; }
.cover .cover-p {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}

.cover .cover-meta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cover .cover-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.cover .cover-meta > span::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
}

.cover .cover-next {
  margin-top: 56px;
}
.cover .cover-next-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.cover .cover-next-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.cover .cover-next-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 17px;
  color: var(--ink);
}
.cover .cover-next-list li:last-child { border-bottom: 1px solid var(--rule); }
.cover .cover-next-list li::before {
  content: attr(data-num);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.cover .cover-cta {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ─── Chapter common ────────────────────────────────────────────────── */
.chapter-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 64px;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.chapter-num .chapter-num-mark {
  display: inline-block;
  padding: 4px 8px;
  background: var(--accent);
  color: var(--ink);
  letter-spacing: 0.06em;
}
.chapter-title {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  margin: 8px 0 0;
  color: var(--ink);
}
html[lang="he"] .chapter-title { font-family: var(--font-sans-he); font-weight: 500; }
.chapter-intro {
  margin: 16px 0 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 56ch;
  letter-spacing: -0.005em;
}

/* ─── Blueprint inputs ──────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.field-hint {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-sans-en);
  font-weight: 400;
}
html[lang="he"] .field-hint { font-family: var(--font-sans-he); }

.input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 8px 0;
  width: 100%;
  outline: none;
  transition: border-bottom-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), padding var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}
input:not(:placeholder-shown):not([type="date"]),
textarea:not(:placeholder-shown) {
  border-bottom-color: var(--ink);
}
input:focus,
textarea:focus,
select:focus {
  border-bottom: 2px solid var(--accent);
  background: var(--field-focus-bg);
  padding: 8px 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
}

input::placeholder, textarea::placeholder { color: var(--ink-faint); font-weight: 300; }
input[readonly] { color: var(--ink-soft); cursor: default; }

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ─── Tables (spec sheet) ───────────────────────────────────────────── */
.table-section { margin-bottom: 48px; }
.table-section .field-label { margin-bottom: 16px; }

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 0;
  font-size: 14px;
}
.table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-soft);
  padding: 12px 8px 12px 0;
  text-align: start;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.table tbody td {
  padding: 4px 8px 4px 0;
  vertical-align: middle;
  border-bottom: 1px solid var(--rule);
}
.table tbody tr:hover td { background: var(--accent-tint); }
.table tbody tr:hover .remove-btn { opacity: 1; }

.table td input,
.table td textarea,
.table td select {
  font-size: 14px;
  border-bottom: 0;
  padding: 8px 0;
  background: transparent;
}
.table td input:focus,
.table td textarea:focus,
.table td select:focus {
  background: var(--field-focus-bg);
  margin: 0;
  width: 100%;
  padding: 8px;
  border-bottom: 2px solid var(--accent);
}
.table .row-actions { width: 32px; text-align: center; padding: 0; }

.remove-btn {
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.remove-btn:hover, .remove-btn:focus-visible {
  color: var(--ink);
  background: var(--accent);
  outline: none;
  opacity: 1;
}

.add-row {
  display: block;
  width: 100%;
  padding: 14px 0;
  margin-top: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.add-row::before { content: '+ '; }
.add-row:hover { background: var(--accent-tint); color: var(--ink); }

/* ─── Adjacency segmented control ───────────────────────────────────── */
.adjacency-segments {
  display: inline-flex;
  border: 1px solid var(--rule);
  background: transparent;
}
.adjacency-segments label {
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  border-inline-end: 1px solid var(--rule);
  transition: background var(--t-fast), color var(--t-fast);
}
.adjacency-segments label:last-child { border-inline-end: 0; }
.adjacency-segments input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.adjacency-segments label:hover { background: var(--accent-tint); color: var(--ink); }
.adjacency-segments label:has(input:checked) { background: var(--accent); color: var(--ink); }
.adjacency-segments label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.adjacency-table .adj-dept-cell { min-width: 200px; }

/* ─── Weekly grid ───────────────────────────────────────────────────── */
.weekly-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 24px; }
.weekly {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.weekly th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
  text-align: center;
  width: 14%;
}
.weekly th.hour-col {
  width: auto;
  min-width: 64px;
  text-align: start;
  padding-inline-end: 16px;
}
.weekly td {
  padding: 0;
  border: 1px solid var(--rule);
  border-collapse: collapse;
  vertical-align: middle;
  height: 40px;
}
.weekly td.hour-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding-inline-end: 16px;
  text-align: end;
  height: 40px;
  width: 64px;
}
.weekly td input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 13px;
  padding: 4px 6px;
  font-weight: 400;
}
.weekly td.has-value { background: var(--accent-tint); }
.weekly td.has-value input { font-weight: 400; color: var(--ink); }
.weekly td input:focus {
  background: var(--accent);
  margin: 0;
  width: 100%;
  padding: 4px 6px;
  border-bottom: 0;
}

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  background: var(--ink);
  color: var(--ground);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  white-space: nowrap;
}
html[lang="he"] .btn { font-family: var(--font-sans-he); font-weight: 500; letter-spacing: 0.04em; }
.btn:hover, .btn:focus-visible {
  background: var(--accent);
  color: var(--ink);
  outline: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 0 transparent;
}
.btn-ghost:hover { color: var(--ink); background: var(--accent); padding: 4px 8px; margin: -4px -8px; }
.btn-arrow::after { content: ' →'; font-family: var(--font-mono); }
html[dir="rtl"] .btn-arrow::after { content: ' ←'; }

/* ─── Lang toggle (top-right) ───────────────────────────────────────── */
.lang-toggle {
  position: fixed;
  top: 24px;
  inset-inline-end: 24px;
  z-index: 60;
  background: transparent;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.lang-toggle:hover, .lang-toggle:focus-visible {
  background: var(--accent);
  outline: none;
}

/* ─── Save status footer (in-content) ───────────────────────────────── */
.chapter-foot {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.chapter-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.chapter-nav .btn-ghost { font-family: var(--font-mono); font-size: 11px; }
.save-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.save-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  display: inline-block;
}
.save-indicator.is-saving::before { background: var(--ink-faint); animation: pulse 1s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ─── Send chapter (review + submit) ────────────────────────────────── */
.send-summary {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--ink);
  display: grid;
  gap: 16px;
}
.send-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.send-summary-row:last-child { border-bottom: 0; padding-bottom: 0; }
.send-summary-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.send-summary-val {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
}
.send-summary-val.is-good { color: var(--ink); }
.send-summary-val.is-good::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px; background: var(--accent); margin-inline-start: 8px;
  vertical-align: middle;
}

.send-actions {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.send-thanks {
  margin-top: 64px;
  padding: 48px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.send-thanks-title {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 24px;
}
html[lang="he"] .send-thanks-title { font-family: var(--font-sans-he); font-weight: 500; }
.send-thanks-body {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  font-weight: 300;
}

/* ─── Report (review on Send chapter) ───────────────────────────────── */
.report { margin-top: 56px; }
.report-title {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--ink);
}
html[lang="he"] .report-title { font-family: var(--font-sans-he); font-weight: 500; }
.report-intro {
  margin: 0 0 32px;
  font-size: 16px;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 60ch;
}
.report-body { display: flex; flex-direction: column; gap: 8px; }

.report-block {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.report-block:first-child { border-top: 1px solid var(--ink); }
.report-block-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.report-empty {
  font-size: 14px;
  color: var(--ink-faint);
  font-style: italic;
  margin: 0;
}
.report-dl {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 8px 24px;
  margin: 0;
}
@media (max-width: 640px) { .report-dl { grid-template-columns: 1fr; gap: 2px 0; } }
.report-dl dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 2px;
}
.report-dl dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 640px) { .report-dl dd { margin-bottom: 12px; } }

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  text-align: start;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.report-table td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: top;
}
.report-table .report-hour {
  font-family: var(--font-mono);
  color: var(--ink-soft);
  white-space: nowrap;
}

.send-thanks-actions { margin-top: 24px; }

/* ─── Hidden utility ────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.is-hidden { display: none !important; }

/* ─── Print ─────────────────────────────────────────────────────────── */
@media print {
  html, body { background: white; color: black; }
  .rail, .mobile-rail, .lang-toggle, .chapter-nav, .add-row, .remove-btn, .btn, .send-actions { display: none !important; }
  .chapter { display: block !important; page-break-after: always; }
  .content { max-width: 100%; padding: 0; }
  .table th, .table td { border-color: #999; }
}

/* ─── Small mobile tweaks ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .content { padding-block: 32px; }
  .cover .masthead { grid-template-columns: 1fr; gap: 16px; }
  .cover .mh-client { justify-self: start; }
  .cover .cover-cta { flex-direction: column; align-items: stretch; }
  .cover .cover-cta .btn { width: 100%; }
  .table-section { overflow-x: auto; }
  .table { min-width: 540px; }
}
