:root {
  --bg: #fafaf7;
  --ink: #1d2230;
  --muted: #5c6475;
  --line: #dcdfe6;
  --accent: #1f5eff;
  --accent-ink: #fff;
  --card: #fff;
  --code-bg: #10131c;
  --code-ink: #e8ecf7;
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
  line-height: 1.65;
}
/* language: Hebrew is the default and the no-JS state; the toggle sets html[data-lang] */
html:not([data-lang="en"]) [lang="en"] { display: none; }
html[data-lang="en"] [lang="he"] { display: none; }

.wrap { max-width: 52rem; margin-inline: auto; padding-inline: 1.25rem; }
header.top { border-bottom: 1px solid var(--line); background: var(--card); }
header.top .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; margin-inline-end: auto; }
nav.links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav.links a { color: var(--ink); text-decoration: none; }
nav.links a:hover, nav.links a[aria-current] { color: var(--accent); }
button.lang {
  font: inherit; font-size: .9rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: .4rem; padding: .2rem .7rem;
}
main { padding-block: 2.5rem 3rem; }
h1 { font-size: 2.1rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .3rem; }
p, li { margin: .4rem 0; }
.lead { font-size: 1.15rem; color: var(--muted); }
a { color: var(--accent); }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.btn {
  display: inline-block; padding: .6rem 1.1rem; border-radius: .5rem;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
  border: 1px solid var(--accent);
}
.btn.alt { background: transparent; color: var(--accent); }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: .9rem 1.1rem; }
.card h3 { margin-top: .2rem; }
.note { background: #fff8e1; border: 1px solid #f0dc9a; border-radius: .5rem; padding: .6rem .9rem; }
.status { border-radius: .5rem; padding: .6rem .9rem; border: 1px solid var(--line); background: var(--card); }
.status[data-state="open"] { border-color: #8fd19e; background: #eefaf0; }
.status[data-state="closed"] { border-color: #f0dc9a; background: #fff8e1; }
ol.steps { padding-inline-start: 1.4rem; }
ol.steps li { margin: .7rem 0; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .88em; background: #eceef4; padding: .05rem .3rem; border-radius: .25rem; direction: ltr; unicode-bidi: isolate; }
table { border-collapse: collapse; width: 100%; margin: .5rem 0; }
th, td { text-align: start; border-bottom: 1px solid var(--line); padding: .45rem .5rem; vertical-align: top; }
td code { white-space: nowrap; }

.copy { margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: var(--card); }
.copy header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .9rem; border-bottom: 1px solid var(--line); }
.copy header strong { font-size: .95rem; }
.copy button { font: inherit; font-size: .9rem; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: .4rem; padding: .25rem .9rem; }
.copy pre { margin: 0; padding: .9rem; background: var(--code-bg); color: var(--code-ink); overflow-x: auto; font-size: .85rem; line-height: 1.55; unicode-bidi: plaintext; text-align: start; white-space: pre-wrap; word-break: break-word; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-block: 1.5rem; }
@media (max-width: 30rem) { h1 { font-size: 1.7rem; } }
.status p { display: none; margin: 0; }
.status:not([data-state="open"]):not([data-state="closed"]) p[data-for="unknown"],
.status[data-state="open"] p[data-for="open"],
.status[data-state="closed"] p[data-for="closed"] { display: block; }

/* copy buttons: the feedback is a state, the he/en spans stay in the DOM */
button.done > span { display: none !important; }
button.done::after { content: "הועתק ✓"; }
html[data-lang="en"] button.done::after { content: "Copied ✓"; }
.copy button.done, .tile button.done { background: #1d8a3c; border-color: #1d8a3c; color: #fff; }

/* «התחבר מהכלי שלך» */
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); margin: 1rem 0 .5rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: .7rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.thead { display: flex; align-items: center; gap: .75rem; }
.thead h3 { margin: 0; font-size: 1.1rem; }
.tsub { color: var(--muted); font-size: .85rem; }
.logo { width: 36px; height: 36px; flex: none; }
.logo.mono { display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; background: var(--code-bg); color: var(--code-ink); font: 700 .8rem ui-monospace, Consolas, monospace; }
.how { margin: 0; font-size: .88rem; color: var(--muted); flex: 1; }
.tactions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tile .btn { padding: .4rem .8rem; font-size: .92rem; }
.tile button.cp { font: inherit; font-size: .92rem; cursor: pointer; border-radius: .5rem; padding: .4rem .8rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tile button.cp.alt { background: transparent; color: var(--accent); }
.tile details { font-size: .85rem; }
.tile summary { cursor: pointer; color: var(--muted); }
.tile pre { margin: .4rem 0 0; padding: .6rem; background: var(--code-bg); color: var(--code-ink); border-radius: .4rem; overflow-x: auto; font-size: .78rem; unicode-bidi: plaintext; text-align: start; white-space: pre-wrap; word-break: break-all; }
.how code { font-size: .8em; }

/* Human-first home page; technical detail stays behind a native, keyboard-accessible fold. */
.eyebrow { color: var(--muted); font-size: .95rem; margin: 0 0 .6rem; }
.how-fold { margin: 2rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--card); scroll-margin-top: 1rem; }
.how-fold summary { cursor: pointer; font-weight: 700; }
.how-fold[open] summary { margin-bottom: .75rem; }
