/* Shared styling for the two legal documents (terms.html, privacy.html).
   Deliberately a separate file rather than a copy in each page: these two
   are edited together far more often than either is edited alone, and a
   drift between them looks careless on exactly the pages where it costs
   the most. Token names mirror index.html so the pages read as the same
   product, but the set is trimmed to what a text document actually uses. */
:root, [data-theme="dark"]{
  --bg:#0b0e14; --panel:#1a2030; --surface:#1c2230;
  --ink:#f4f6fa; --ink-soft:#9aa3b5; --muted:#8b93a7;
  --gold:#b59a5e; --gold-soft:#cbb892;
  --line:rgba(255,255,255,.08);
}
[data-theme="light"]{
  --bg:#ecedf1; --panel:#ffffff; --surface:#ffffff;
  --ink:#12161f; --ink-soft:#4a5261; --muted:#5d6577;
  --gold:#8a7333; --gold-soft:#6f5c29;
  --line:rgba(18,22,31,.10);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Noto Sans Hebrew",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.75;
}

.doc{max-width:680px;margin:0 auto;padding:28px 20px 72px}

.doc-nav{margin:0 0 26px}
.doc-nav a{
  display:inline-flex;align-items:center;gap:7px;
  color:var(--muted);text-decoration:none;font-size:14px;font-weight:600;
}
.doc-nav a:hover{color:var(--ink)}
/* The chevron points at the page edge the reader came from, so it has to
   follow the RTL flow rather than sit at a fixed rotation. */
.doc-nav svg{width:16px;height:16px;flex:none}

h1{
  font-family:"Noto Serif Hebrew","Noto Sans Hebrew",serif;
  font-size:30px;line-height:1.3;font-weight:900;
  margin:0 0 6px;color:var(--ink);
}
.doc-updated{margin:0 0 30px;color:var(--muted);font-size:13.5px}

h2{
  font-size:18px;font-weight:700;line-height:1.45;
  margin:34px 0 10px;color:var(--ink);
}
h2:first-of-type{margin-top:0}

p{margin:0 0 14px;color:var(--ink-soft)}
ul{margin:0 0 14px;padding-inline-start:22px;color:var(--ink-soft)}
li{margin:0 0 7px}
strong{color:var(--ink);font-weight:700}

a{color:var(--gold-soft);text-decoration:underline;text-underline-offset:2px}
a:hover{color:var(--gold)}

.doc-note{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px 18px;
  margin:0 0 26px;
}
.doc-note p{margin:0;font-size:14.5px}

/* Third-party licence notices: the MIT text has to be reproducible
   verbatim, so it gets its own quieter block rather than body styling. */
.licences{margin-top:38px;padding-top:22px;border-top:1px solid var(--line)}
.licences h2{margin-top:0}
.licences p{font-size:14px;color:var(--muted)}
/* Verbatim English licence text: laid out LTR and left-aligned, because
   inside the page's RTL flow the sentence-final periods land at the wrong
   edge and each line reads as a fragment. */
.licences .mit{direction:ltr;text-align:left;font-size:12.5px;line-height:1.65}

.doc-foot{
  margin-top:40px;padding-top:20px;border-top:1px solid var(--line);
  color:var(--muted);font-size:13.5px;
}
.doc-foot a{color:var(--muted)}

@media (max-width:420px){
  .doc{padding:22px 16px 60px}
  h1{font-size:26px}
}
