/*
 * Shared stylesheet for the three /mersham/ content pages (guide, faq, about).
 *
 * One file rather than the inline <style> the three legal pages each carry:
 * those predate this and duplicate ~90 lines of identical CSS between them,
 * which is the hand-kept-mirror problem this repo warns about everywhere else.
 * One small render-blocking request, cached across all three pages.
 *
 * Palette and shapes deliberately match mersham/public/{terms,privacy,
 * accessibility}.html so the content pages read as part of the same app.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: #f0fdf4;
  color: #1a2e1a;
  line-height: 1.7;
  padding: 20px 16px 64px;
  -webkit-text-size-adjust: 100%;
}

.container { max-width: 720px; margin: 0 auto; }

/* ── Back link + breadcrumb ────────────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #059669; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; margin-bottom: 18px;
}
.back-link:hover { text-decoration: underline; }

nav.crumbs { font-size: 0.78rem; color: #6b7280; margin-bottom: 14px; }
nav.crumbs a { color: #059669; font-weight: 600; text-decoration: none; }
nav.crumbs a:hover { text-decoration: underline; }

/* ── Page header ───────────────────────────────────────────────────────── */
header.page {
  background: linear-gradient(to left, #059669, #10b981);
  color: white; border-radius: 18px;
  padding: 28px 22px; margin-bottom: 26px; text-align: center;
}
header.page img.logo { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 12px; display: block; }
header.page h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: 8px; line-height: 1.35; }
header.page p { font-size: 0.92rem; opacity: 0.92; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: white; border-radius: 16px;
  padding: 22px 20px; margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
h2 {
  font-size: 1.12rem; font-weight: 700; color: #065f46;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid #d1fae5;
}
h3 { font-size: 1rem; font-weight: 700; color: #047857; margin: 16px 0 8px; }
p { font-size: 0.94rem; color: #374151; margin-bottom: 10px; }
ul, ol { padding-right: 22px; margin-bottom: 10px; }
li { font-size: 0.94rem; color: #374151; margin-bottom: 7px; }
a { color: #059669; font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #065f46; }

/* ── Numbered steps with a screenshot ──────────────────────────────────── */
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: #059669; color: white; font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1 1 auto; min-width: 0; }
.step-body h2 { margin-top: 2px; }

/* The phone shot. Width is capped so a 390px-wide capture is never upscaled. */
figure.shot { margin: 14px 0 4px; text-align: center; }
figure.shot img {
  width: 100%; max-width: 300px; height: auto;
  border-radius: 14px; border: 1px solid #d1fae5;
  box-shadow: 0 4px 14px rgba(5,150,105,0.14);
}
figure.shot figcaption { font-size: 0.8rem; color: #6b7280; margin-top: 8px; }

/* ── Video ─────────────────────────────────────────────────────────────── */
figure.demo { margin: 4px 0 0; text-align: center; }
figure.demo video {
  width: 100%; max-width: 300px; height: auto;
  border-radius: 16px; box-shadow: 0 6px 20px rgba(5,150,105,0.2);
  background: #065f46;
}
figure.demo figcaption { font-size: 0.82rem; color: #6b7280; margin-top: 10px; }

/* ── Callouts ──────────────────────────────────────────────────────────── */
.note {
  background: #ecfdf5; border-right: 4px solid #10b981;
  border-radius: 10px; padding: 14px 16px; margin: 14px 0;
}
.note p:last-child { margin-bottom: 0; }
.warn { background: #fffbeb; border-right-color: #f59e0b; }

/* ── Definition list (the glossary on about.html) ──────────────────────── */
dl.glossary { margin-top: 8px; }
dl.glossary dt {
  font-weight: 700; color: #065f46; font-size: 0.96rem;
  margin-top: 14px; padding-bottom: 2px;
}
dl.glossary dt:first-child { margin-top: 0; }
dl.glossary dd { font-size: 0.92rem; color: #374151; margin: 0 0 4px; padding-right: 2px; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
details.qa {
  border: 1px solid #d1fae5; border-radius: 12px;
  padding: 0; margin-bottom: 10px; background: #fff;
  overflow: hidden;
}
details.qa > summary {
  cursor: pointer; list-style: none;
  font-weight: 700; color: #065f46; font-size: 0.97rem;
  padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after { content: '+'; color: #10b981; font-size: 1.2rem; line-height: 1; flex: 0 0 auto; }
details.qa[open] > summary::after { content: '\2212'; }
details.qa > summary:hover { background: #f0fdf4; }
details.qa .answer { padding: 0 16px 14px; }
details.qa .answer p:last-child, details.qa .answer ul:last-child { margin-bottom: 0; }

/* ── CTA ───────────────────────────────────────────────────────────────── */
.cta {
  display: block; text-align: center;
  background: linear-gradient(to left, #059669, #10b981);
  color: white; font-weight: 800; font-size: 1rem;
  padding: 15px 20px; border-radius: 14px;
  margin: 22px 0 8px; text-decoration: none;
}
.cta:hover { text-decoration: none; opacity: 0.94; }

/* ── Related pages + footer ────────────────────────────────────────────── */
/* ── "במדריך הזה" jump list ──────────────────────────────────────────── */
ol.toc { columns: 2; column-gap: 24px; padding-right: 20px; margin-bottom: 0; }
ol.toc li { font-size: 0.9rem; margin-bottom: 4px; break-inside: avoid; }
ol.toc li a { color: #047857; font-weight: 600; text-decoration: none; }
ol.toc li a:hover { text-decoration: underline; }
@media (max-width: 420px) { ol.toc { columns: 1; } }

.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.related a {
  flex: 1 1 200px; background: #ecfdf5; border: 1px solid #d1fae5;
  border-radius: 12px; padding: 12px 14px; font-size: 0.9rem;
}
.related a:hover { background: #d1fae5; text-decoration: none; }
.related a span { display: block; font-weight: 400; color: #6b7280; font-size: 0.8rem; margin-top: 2px; }

footer.site {
  text-align: center; font-size: 0.8rem; color: #6b7280; margin-top: 26px;
}
footer.site nav { margin-bottom: 8px; }
footer.site a { font-weight: 600; }
footer.site .sep { color: #d1d5db; margin: 0 6px; }
.disclaimer { font-size: 0.82rem; color: #6b7280; margin-top: 16px; text-align: center; }

@media (min-width: 640px) {
  body { padding: 28px 20px 72px; }
  header.page h1 { font-size: 1.7rem; }
  figure.shot img, figure.demo video { max-width: 320px; }
}
