:root {
  --bg: #1b2230;
  --bg-2: #20283a;
  --card: #242d3e;
  --line: #33405a;
  --text: #eef1f6;
  --muted: #a7b1c4;
  --on-accent: #04121c;
  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --warm: #fb923c;
  --warm-strong: #fdba74;
  --accent-soft: #1e3550;
  --accent-2-soft: #2d2a4c;
  --warm-soft: #3a2d2a;
  --wa: #25d366;
  --wa-ink: #06261a;
  --radius: 20px;
  --max: 1280px;
  --font: "Rubik", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* language switching: elements carry lang="en" / lang="he" */
html[lang="en"] body [lang="he"], html[lang="he"] body [lang="en"] { display: none !important; }
html[dir="rtl"] .flip { display: inline-block; transform: scaleX(-1); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(27, 34, 48, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; direction: ltr; }
.logo svg { width: 54px; height: 36px; }
.logo b { color: var(--accent); font-weight: 700; }
.tabs { display: flex; gap: 4px; }
.tab { position: relative; }
.tab-link { display: block; padding: 9px 16px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; }
.tab-link:hover, .tab:hover .tab-link { color: var(--text); }
.tab-link.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* dropdown (mega) menu: tab → categories → items */
.mega { display: none; position: absolute; top: 100%; inset-inline-start: 50%; transform: translateX(-50%); padding-top: 12px; z-index: 30; }
html[dir="rtl"] .mega { transform: translateX(50%); }
.mega > .cats, .mega > .panes { background: var(--card); border: 1px solid var(--line); }
.mega { width: 620px; }
.mega::before { content: ""; position: absolute; inset: 0; top: 12px; border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); pointer-events: none; }
.mega .cats { position: absolute; top: 12px; bottom: 0; inset-inline-start: 0; width: 250px; list-style: none; padding: 10px; border-start-start-radius: 18px; border-end-start-radius: 18px; background: var(--bg-2); }
.mega .panes { margin-inline-start: 250px; min-height: 260px; padding: 18px 20px; border-start-end-radius: 18px; border-end-end-radius: 18px; border-inline-start: 0; }
.mega .cat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.mega .cat.on { background: var(--accent-soft); color: var(--accent); }
.mega .chev { opacity: .7; }
.mega .pane { display: none; }
.mega .pane.on { display: block; }
.mega .pane-title { display: block; font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: 10px; }
.mega .pane ul { list-style: none; display: grid; gap: 2px; }
.mega .pane li a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14.5px; }
.mega .pane li a:hover, .mega .pane-go:hover { background: var(--bg-2); color: var(--text); }
.mega .pane-go { display: inline-block; padding: 8px 10px; border-radius: 10px; color: var(--accent); font-size: 14.5px; }
.tab:first-child .mega { inset-inline-start: 0; transform: none; }
/* invisible bridge so the pointer can travel from the tab down into the menu */
.tab::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; }
@media (hover: hover) {
  .tab:hover .mega, .tab:focus-within .mega { display: block; }
}
.tab.open .mega { display: block; }
/* narrow windows & phones: the menu becomes a panel right under the header
   (the header's backdrop-filter makes it the containing block for position:fixed) */
@media (max-width: 900px) {
  .tab .mega, .tab:first-child .mega, html[dir="rtl"] .tab .mega { position: fixed; top: 100%; left: 12px; right: 12px; width: auto; transform: none; padding-top: 6px; }
  .mega::before { top: 6px; }
  .mega .cats { top: 6px; width: 42%; }
  .mega .panes { margin-inline-start: 42%; min-height: 250px; }
  .tab::after { display: none; }
}
.actions { display: flex; align-items: center; gap: 10px; }
.lang { font: 500 14px var(--font); border: 1px solid var(--line); background: transparent; color: var(--text); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.lang:hover { border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 600 15px var(--font); border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { box-shadow: 0 8px 26px rgba(56, 189, 248, .28); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.wa { background: var(--wa); color: var(--wa-ink); }
.btn.wa:hover { box-shadow: 0 8px 26px rgba(37, 211, 102, .28); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- page ---------- */
main { padding: 56px 0 96px; }
.page-title { margin-bottom: 48px; max-width: 780px; }
.kicker { font: 500 13px var(--mono); color: var(--accent); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
html[dir="rtl"] .kicker { font-family: var(--font); letter-spacing: 0; }
h1 { font-size: clamp(32px, 4.6vw, 46px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
.lead { color: var(--muted); font-size: 18px; margin-top: 14px; }
h2 { font-size: 26px; letter-spacing: -.015em; font-weight: 700; }
.sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
section.group { margin-bottom: 52px; }
section.group > header { margin-bottom: 18px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; margin-top: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.tint-blue { background: var(--accent-soft); border-color: transparent; }
.tint-purple { background: var(--accent-2-soft); border-color: transparent; }
.tint-warm { background: var(--warm-soft); border-color: transparent; }
.dashed { background: transparent; border: 1px dashed var(--line); }

.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.purple { background: var(--accent-2-soft); color: var(--accent-2); }
.badge.orange { background: var(--warm-soft); color: var(--warm-strong); }

.icon-box { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon-box svg, .ico { width: 22px; height: 22px; }
.title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* resource card */
.res { display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s; }
.res:hover { border-color: rgba(56, 189, 248, .5); transform: translateY(-2px); }
.res .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.res h3 { margin: 0; font-size: 18px; }
.res .url { font: 500 13px var(--mono); color: var(--accent); margin-top: auto; direction: ltr; text-align: start; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 14px var(--font); cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hidden { display: none !important; }

/* learn */
.layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.level { margin-bottom: 44px; }
.level-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.level-head h2 { font-size: 28px; }
.level > p { color: var(--muted); margin-bottom: 16px; }
.modules { display: grid; gap: 10px; }
.module { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; }
.module .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 500 14px var(--mono); }
.module .t { flex: 1; font-weight: 500; font-size: 17px; }
.module .f { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; }
html[dir="rtl"] .module .f { font-family: var(--font); }
.soon { font-size: 12px; color: var(--warm-strong); background: var(--warm-soft); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.coming { border: 1px dashed var(--line); border-radius: 16px; padding: 18px 22px; color: var(--muted); }
aside .card { margin-bottom: 20px; }
aside h3 { display: flex; align-items: center; gap: 10px; }
.points { list-style: none; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.points li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 10px; vertical-align: middle; }
.book { margin-top: 12px; }
.book b { display: block; font-weight: 500; font-size: 15px; }
.book span { color: var(--muted); font-size: 13px; }

/* misc blocks */
.tips li { list-style: none; display: flex; gap: 10px; margin-top: 10px; }
.tips li::before { content: "→"; color: var(--warm-strong); font-weight: 600; }
html[dir="rtl"] .tips li::before { content: "←"; }
pre.code { background: var(--bg); border-radius: 14px; padding: 18px 20px; font: 500 14px/1.8 var(--mono); color: var(--muted); overflow-x: auto; direction: ltr; text-align: left; margin: 14px 0; }
pre.code i { font-style: normal; color: var(--accent-2); }
.steps .num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-2-soft); color: var(--accent-2); display: grid; place-items: center; font: 500 15px var(--mono); flex: none; }
.checks { list-style: none; display: grid; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 15px; }
.checks li::before { content: "✓"; color: var(--accent-2); font-weight: 600; margin-inline-end: 10px; }
.empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.event .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.event .when { font: 500 12px var(--mono); color: var(--muted); }
html[dir="rtl"] .event .when { font-family: var(--font); }
.wa-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; background: #19342c; border: 1px solid rgba(37, 211, 102, .35); border-radius: 28px; padding: 44px; margin-bottom: 52px; }
.wa-card .kicker { color: #34d399; }
.wa-card h2 { font-size: 34px; margin-bottom: 16px; }
.wa-card ul { list-style: none; display: grid; gap: 8px; margin-bottom: 24px; font-size: 17px; }
.wa-card li::before { content: "✓"; color: #34d399; font-weight: 600; margin-inline-end: 10px; }
.qr { flex: none; background: #fff; border-radius: 20px; padding: 16px; width: 212px; height: 212px; display: grid; place-items: center; }
.rule .num { font: 500 24px var(--mono); color: var(--accent); margin-bottom: 8px; }

/* home */
.home-intro { padding: 40px 0 56px; max-width: 820px; }
.home-intro h1 { font-size: clamp(36px, 5.4vw, 58px); }
.home-intro h1 b { color: var(--accent); font-weight: 700; }
.home-intro .lead { font-size: 19px; max-width: 680px; }
.home-intro .btn-row { margin-top: 28px; }
.explore { display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s; }
.explore:hover { border-color: rgba(56, 189, 248, .5); transform: translateY(-2px); }
.explore .icon-box { margin-bottom: 6px; }
.explore .go { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; font-size: 15px; }
.paths .card h2 { margin-bottom: 8px; }
.paths .card p { margin-bottom: 18px; }
.wa-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: #19342c; border: 1px solid rgba(37, 211, 102, .35); border-radius: 24px; padding: 32px 36px; }
.wa-band h2 { margin-bottom: 6px; }

/* article pages (guides, privacy) */
.article { max-width: 860px; }
.article section { margin-bottom: 36px; }
.article h2 { margin-bottom: 12px; }
.article p { color: var(--muted); font-size: 16.5px; margin-bottom: 12px; }
.article p b, .article li b { color: var(--text); }
.article a:not(.btn) { color: var(--accent); }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--text); }
.callout { margin-bottom: 40px; font-size: 16.5px; color: var(--text); }
.steps-list { color: var(--muted); padding-inline-start: 22px; display: grid; gap: 8px; font-size: 16px; }
.levels-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl th, .tbl td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 500; background: var(--bg-2); }
.tbl tr:last-child td { border-bottom: 0; }
.sources ul { list-style: none; display: grid; gap: 6px; margin: 10px 0; font-size: 15px; }
.res .guide { color: var(--accent); font-weight: 600; font-size: 14.5px; }
footer.site a { color: var(--text); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge.plain { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.resource .page-title .btn-row { margin-top: 22px; }
.resource .checks li, .resource .steps-list li, .resource .tips li { font-size: 16px; line-height: 1.6; }
.resource .tips li { color: var(--text); }
.res.related h3 { font-size: 17px; }

/* footer */
footer.site { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0 22px; color: var(--muted); font-size: 14px; }
footer.site .foot-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
footer.site .logo { font-size: 16px; }
footer.site .logo svg { width: 42px; height: 28px; }
footer.site .foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site .foot-links a { color: var(--text); font-weight: 500; font-size: 15px; }
footer.site .foot-links a:hover { color: var(--accent); }
footer.site .foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .wa-card { flex-direction: column; align-items: flex-start; padding: 28px; }
}
@media (max-width: 620px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  main { padding: 36px 0 64px; }
  .actions .btn.wa span { display: none; }
  .actions .btn.wa { padding: 10px 12px; }
  .module { padding: 12px 14px; gap: 12px; }
  .module .f { display: none; }
  .wa-card h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .res { transition: none; } }
