/* The site's one stylesheet. Colours from the app's icon (app/scripts/make-icon.swift): night blue and spotlight gold. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #14202a;
  --muted: #4d5b66;
  --line: #e3e0d8;
  --accent: #0f4c66;
  --accent-text: #ffffff;
  --gold: #ffd678;
  --gold-ink: #6b4a00;
  --note-bg: #fff6dc;
  --note-line: #f0d48a;
  --hero-from: #0a2230;
  --hero-to: #123e52;
  --hero-text: #ffffff;
  --hero-muted: #c7d6de;
  --radius: 12px;
  --max: 46rem;
  --wide: 68rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans Hebrew", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c171e;
    --surface: #112230;
    --text: #e8eef2;
    --muted: #a6b5bf;
    --line: #22394a;
    --accent: #ffd678;
    --accent-text: #0a2230;
    --gold-ink: #ffd678;
    --note-bg: #1d2a22;
    --note-line: #5c4d22;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.35em; overflow-wrap: break-word; }
bdi { unicode-bidi: isolate; }
/* a Hebrew button label inside an English sentence: one box, so its words keep their order and never wrap apart */
.ui-he { display: inline-block; padding: 0 0.35em; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); line-height: 1.45; white-space: nowrap; }

.skip { position: absolute; inset-inline-start: -999px; top: 0; padding: 0.5rem 1rem; background: var(--surface); }
.skip:focus { inset-inline-start: 1rem; z-index: 2; }

.bar { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; min-height: 64px; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { border-radius: 8px; }
.site-header nav { flex: 1 1 auto; }
.site-header ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 0.25rem 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
.lang { font-size: 0.9rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.8rem; }
.lang:hover { color: var(--text); border-color: var(--muted); }

main { display: block; }
.doc { max-width: var(--max); margin: 0 auto; padding: 2.5rem 16px 4rem; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.doc h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.4rem 0 0.6rem; padding-top: 0.4rem; }
.doc h3 { font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc ul, .doc ol { padding-inline-start: 1.4rem; }
.doc li { margin: 0.3rem 0; }
.doc li > ul { margin-top: 0.3rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.5rem; }
.lede { font-size: 1.12rem; color: var(--muted); }

.note, .draft {
  border: 1px solid var(--note-line);
  background: var(--note-bg);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}
.note > :first-child, .draft > :first-child { margin-top: 0; }
.note > :last-child, .draft > :last-child { margin-bottom: 0; }
.draft { border-width: 2px; font-weight: 500; }

.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.8rem 1.1rem; margin: 1.5rem 0 2rem; }
.toc p { margin: 0 0 0.3rem; font-weight: 600; }
.toc ol { margin: 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: start; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; background: color-mix(in srgb, var(--surface) 80%, var(--line)); }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-inline-start: 2.6rem; margin: 1rem 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: 0.05rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #0a2230; font-weight: 700; font-size: 0.95rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  background: var(--gold);
  color: #0a2230;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { filter: brightness(1.05); }
.button.secondary { background: transparent; color: var(--hero-text); box-shadow: inset 0 0 0 1.5px var(--hero-muted); }

/* the landing page */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hero-to), var(--hero-from));
  color: var(--hero-text);
}
.hero::before {
  /* the spotlight's beam, as in the icon */
  content: "";
  position: absolute;
  inset-block: -10% 0;
  inset-inline-start: 50%;
  width: min(70rem, 160%);
  translate: -50% 0;
  background: linear-gradient(180deg, rgba(255, 214, 120, 0.26), rgba(255, 214, 120, 0.02));
  clip-path: polygon(44% 0, 56% 0, 88% 100%, 12% 100%);
  pointer-events: none;
}
.hero .inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 4.5rem 16px 4rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -0.02em; }
.hero .lede { color: var(--hero-muted); font-size: 1.15rem; margin: 0 auto 1.8rem; max-width: 38rem; }
.hero .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 0 0 1.4rem; }
.hero .small { color: var(--hero-muted); font-size: 0.92rem; margin: 0; }
.hero a:not(.button) { color: var(--gold); }

.features { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.features li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.features strong { display: block; margin-bottom: 0.25rem; }
.doc.wide { max-width: var(--wide); }
.doc.wide > section { max-width: var(--max); margin-inline: auto; }
.doc.wide > section.full { max-width: none; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.92rem; }
.site-footer .bar { padding-block: 1.5rem 2rem; }
.site-footer p { margin: 0.3rem 0; }
.site-footer .links a { color: var(--muted); margin-inline-end: 1rem; }
.site-footer .fine { font-size: 0.85rem; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .hero .inner { padding-top: 3rem; }
}
@media print {
  .site-header nav, .lang, .skip, .hero::before { display: none; }
  .hero { background: none; color: inherit; }
}
