/* Calm, readable, app-like. One accent colour for things you can press,
   a warm amber only for progress. Large text and touch targets. */

:root {
  --paper: #F3F6F4;
  --surface: #FFFFFF;
  --ink: #1E2A2B;
  --muted: #566768;
  --line: #D6E0DE;
  --primary: #2E6E7E;
  --primary-ink: #FFFFFF;
  --soft: #E1EEF0;
  --amber: #E8B04B;
  --amber-soft: #FBF1DC;
  --amber-line: #E3C58A;
  --radius-lg: 18px;
  --radius: 12px;
  --tap: 48px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151C1E;
    --surface: #1D2729;
    --ink: #E7EEEE;
    --muted: #9DB0B1;
    --line: #2E3C3F;
    --primary: #7CC3D1;
    --primary-ink: #10282D;
    --soft: #213538;
    --amber: #E8B04B;
    --amber-soft: #33290F;
    --amber-line: #6E5A1F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--primary); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; top: -60px; right: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }

main, .site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- top bar ---------- */

.app-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.app-bar-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 10px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bar-back, .bar-mark {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
}

.bar-back:hover { background: var(--soft); }

.bar-mark {
  width: 36px;
  height: 36px;
  margin: 0 6px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 20px;
  font-weight: 700;
}

.bar-title {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- type ---------- */

h1 { font-size: 28px; line-height: 1.25; margin: 6px 0 6px; font-weight: 750; }
h2 { font-size: 19px; line-height: 1.35; margin: 30px 0 10px; font-weight: 700; }

.home-title { font-size: 32px; margin-top: 26px; }

.lead { color: var(--muted); margin: 0 0 4px; }
.meta, .status { color: var(--muted); font-size: 15px; margin: 4px 0; }
.status { padding: 40px 0; text-align: center; }

/* ---------- search ---------- */

.search {
  display: flex;
  gap: 8px;
  margin: 18px 0 6px;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
}

.search input:focus { border-color: var(--primary); outline: none; }

.search-go, .button {
  flex: none;
  min-height: 54px;
  padding: 0 20px;
  font: inherit;
  font-weight: 650;
  color: var(--primary-ink);
  background: var(--primary);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.button-quiet {
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--line);
  min-height: var(--tap);
  margin-top: 8px;
}

/* ---------- what might I be entitled to? ---------- */

.rights-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
}
.rights-card .chev { color: inherit; opacity: 0.85; }
.rights-card-text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.rights-card-title { font-size: 20px; font-weight: 750; }
.rights-card-sub { font-size: 15px; line-height: 1.45; opacity: 0.92; }

.quiz-step { margin: 18px 0 6px; color: var(--muted); font-size: 15px; font-weight: 650; }
.quiz-meter { margin: 0 0 14px; }
.quiz-title { margin-top: 0; }
.quiz-hint { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.quiz-privacy { margin: 22px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: start;
  cursor: pointer;
}
.choice:hover { border-color: var(--primary); }
.choice-mark {
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--muted);
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.choices[role="radiogroup"] .choice-mark { border-radius: 50%; }
.choice.on { border-color: var(--primary); background: var(--soft); }
.choice.on .choice-mark { border-color: var(--primary); background: var(--primary); }
.choice.on .choice-mark::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--primary-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.choices[role="radiogroup"] .choice.on .choice-mark::after {
  width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--primary-ink); transform: none;
}
.choice-text { flex: 1; line-height: 1.4; }

.quiz-actions { margin-top: 18px; }
.quiz-actions .button { width: 100%; min-height: 52px; margin-top: 0; }
.quiz-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quiz-tools .button { min-height: var(--tap); margin-top: 0; padding: 0 16px; }

.rights-group { margin: 22px 0 8px; font-size: 16px; color: var(--muted); font-weight: 700; }
.rights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.right-link {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.right-link:hover { border-color: var(--primary); }
.right-head { display: flex; align-items: center; gap: 10px; }
.right-title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.right-text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.right-go { color: var(--primary); font-weight: 650; font-size: 15px; }
.badge-sm { width: 28px; height: 28px; font-size: 12px; }

.rights-more { margin-top: 26px; }
.rights-more > summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  color: var(--primary);
}

/* ---------- install on the phone ---------- */

.install {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 16px;
  background: var(--soft);
  border-radius: var(--radius-lg);
}
.install[hidden] { display: none; }
.install-icon { flex: none; border-radius: 10px; }
.install-text { flex: 1; min-width: 0; }
.install-title { margin: 0; font-weight: 700; }
.install-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.install-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.install-actions .button { min-height: var(--tap); margin-top: 0; padding: 0 18px; }

.boot-detail { margin-top: 16px; color: var(--muted); font-size: 13px; direction: ltr; text-align: left; overflow-wrap: anywhere; }

/* ---------- share ---------- */

.share { margin: 14px 0 4px; }
.share-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 0; padding: 0 16px; }
.share-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-panel { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-panel[hidden] { display: none; }
.share-panel .button { min-height: var(--tap); margin-top: 0; padding: 0 16px; }
.copy-area { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }

/* ---------- bodies on the home screen ---------- */

.orgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.org {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  min-height: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
}

a.org:hover { border-color: var(--org); }

.org-soon {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

.org-soon .badge { filter: saturate(0.4); opacity: 0.7; }

.org-text { display: grid; gap: 2px; min-width: 0; }
.org-name { font-size: 20px; font-weight: 700; color: inherit; }
.org-about { font-size: 15px; color: var(--muted); }
.org-count { font-size: 14px; font-weight: 650; color: var(--org); }
.org-soon .org-count { color: var(--muted); }

/* the body's own badge: initials, never a copy of a real logo */
.badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--org);
  color: #FFFFFF;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: 0;
}

.badge-lg { width: 60px; height: 60px; font-size: 22px; border-radius: 18px; }
.badge-xl { width: 72px; height: 72px; font-size: 26px; border-radius: 22px; }

.org-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--org) 12%, var(--surface));
}

.org-head h1 { margin: 0; }

/* ---------- topics ---------- */

.topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.topic {
  display: grid;
  align-content: start;
  gap: 4px;
  height: 100%;
  min-height: 128px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
}

.topic:hover { border-color: var(--org); }

.topic-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 24px;
  line-height: 1;
}

.topic-title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.topic-count { font-size: 14px; color: var(--muted); }

.topic-head { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.topic-head h1 { margin: 0; }

/* ---------- lists of processes ---------- */

.rows {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rows > li + li { border-top: 1px solid var(--line); }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
}

a.row:hover { background: var(--soft); }

.row-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.row-title { font-weight: 650; font-size: 18px; line-height: 1.35; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-off { color: var(--muted); display: grid; }

.chev { flex: none; color: var(--muted); font-size: 26px; line-height: 1; }

.meter {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(to left, var(--amber) var(--p), var(--line) var(--p));
}

/* ---------- one checklist ---------- */

.check-head { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.check-org { color: var(--muted); font-size: 15px; font-weight: 600; }

.stamp {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.facts {
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.fact dt { color: var(--muted); font-size: 14px; }
.fact dd { margin: 0; font-weight: 600; }

.progress {
  position: sticky;
  top: calc(57px + env(safe-area-inset-top));
  z-index: 4;
  display: grid;
  gap: 6px;
  margin: 18px -18px 0;
  padding: 10px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.progress-text { font-weight: 700; font-size: 16px; }

.progress-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to left, var(--amber) var(--p), var(--line) var(--p));
}

.section-title { margin-top: 30px; }

.steps { list-style: none; margin: 0; padding: 0; }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.step label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: var(--tap);
  cursor: pointer;
}

.step input[type="checkbox"] {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.step-num {
  flex: none;
  min-width: 26px;
  height: 26px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 750;
}

.step-text { font-weight: 700; font-size: 18px; line-height: 1.4; padding-top: 1px; }

.step.done { background: transparent; }
.step.done .step-text { color: var(--muted); text-decoration: line-through; }
.step.done .step-body { display: none; }

.step-body { margin: 10px 0 0; padding-inline-start: 38px; font-size: 16px; }

.detail { margin-top: 12px; }
.detail p { margin: 0; }

.detail-label { color: var(--primary); font-size: 14px; font-weight: 700; margin-bottom: 2px !important; }

.detail-list { margin: 2px 0 0; padding: 0 20px 0 0; }
.detail-list li { margin-bottom: 4px; }
ul.detail-list { list-style: disc; }

.cases { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.cases li { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; }
.case-if { display: block; font-weight: 650; }
.case-then { display: block; }

.detail-missing {
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.detail-missing .detail-label { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 4px 0 6px; }

.table-wrap table { border-collapse: collapse; width: 100%; font-size: 15px; }

.table-wrap th, .table-wrap td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  text-align: right;
  vertical-align: top;
}

.table-wrap th { background: var(--soft); font-size: 14px; }

.step-links { margin: 2px 0 0; padding: 0; list-style: none; }
.step-links li { margin-bottom: 6px; }

.contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.contact li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: grid;
  gap: 2px;
}

.contact-label { color: var(--muted); font-size: 14px; }
.contact-value { font-weight: 650; font-size: 18px; }
a.contact-value { text-decoration: none; }

.ltr { unicode-bidi: isolate; }

.glossary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 10px 0 0;
  padding: 12px 16px;
}

.glossary dt { font-weight: 700; }
.glossary dd { margin: 0 0 12px; }
.glossary dd:last-child { margin-bottom: 0; }

.sources { margin: 0; padding: 0 20px 0 0; }
.sources li { margin-bottom: 6px; }

/* ---------- footer ---------- */

.site-footer { padding-top: 30px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
.site-footer p { color: var(--muted); font-size: 14px; margin: 0; border-top: 1px solid var(--line); padding-top: 14px; }

@media (min-width: 600px) {
  .orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
