/* AbraCodeAbra — Liquid Glass (ה-skill liquid-glass-ui), מונוכרום מלא.
   טוקנים בלבד: כל צבע/רדיוס/צל/תזמון מגיע ממשתנה. צבע רק לפונקציה (--sel לפוקוס).
   זכוכית רק על "כרום" צף (סרגל עליון, תוכן עניינים, כרטיס ההירו). תוכן = משטחים אטומים.
   רשימות = רצועות נפרדות עם אוויר ביניהן, לא קווים. תנועה אחת: 300ms cubic-bezier(.2,.8,.2,1).
   אפס JS באתר (CSP), לכן מצב בהיר/כהה = "auto" דרך prefers-color-scheme — אותה החלפת טוקנים. */

:root {
  color-scheme: light dark;
  --bg: #ececed; --bg-2: #e2e2e6;
  --surface: rgba(255, 255, 255, .62); --surface-solid: #ffffff;
  --text: #1c1c1e; --text-2: #63636b; /* ה-skill: #6b6b73 — הוכהה מעט כדי לעמוד ב-4.5:1 על --bg (תקן 5568) */
  --line: rgba(0, 0, 0, .10); --line-2: rgba(0, 0, 0, .05);
  --accent: #1c1c1e; --accent-contrast: #ffffff;
  --danger: #c43c3c; --sel: #0a84ff;
  --radius: 22px; --radius-sm: 14px; --radius-xs: 10px;
  --blur: 20px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .10);
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: .3s; --space: 16px;

  --img-dim: none;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "SF Hebrew", "Helvetica Neue", system-ui, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --topbar-h: 56px;
  --wrap: 72rem;
  --wrap-narrow: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c; --bg-2: #161618;
    --surface: rgba(44, 44, 48, .60); --surface-solid: #1e1e20;
    --text: #f5f5f7; --text-2: #9a9aa2;
    --line: rgba(255, 255, 255, .12); --line-2: rgba(255, 255, 255, .06);
    --accent: #f5f5f7; --accent-contrast: #1c1c1e;
    --danger: #ff6b6b; --sel: #409cff;
    --shadow: 0 12px 44px rgba(0, 0, 0, .55), 0 2px 10px rgba(0, 0, 0, .4);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .5);
    --img-dim: brightness(.78);
  }
}

/* ---------- בסיס ---------- */

*, *::before, *::after { box-sizing: border-box; }

@supports (font: -apple-system-body) {
  html { font: -apple-system-body; } /* מכבד את גודל הטקסט שהמשתמש בחר ב-iOS */
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: calc(var(--topbar-h) + 40px);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: text-decoration-color var(--dur) var(--ease); }
a:hover { text-decoration-color: currentColor; }
a[href^="mailto:"], bdi { unicode-bidi: isolate; }

:focus-visible { outline: 2px solid var(--sel); outline-offset: 3px; border-radius: var(--radius-xs); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(var(--wrap-narrow), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; inset-inline-start: var(--gutter); top: -100px; z-index: 50;
  padding: 10px 14px; border-radius: var(--radius-xs);
  background: var(--accent); color: var(--accent-contrast); font-weight: 600; text-decoration: none;
}
.skip:focus { top: max(12px, env(safe-area-inset-top)); }

.ico {
  width: 21px; height: 21px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.ico-fill { fill: currentColor; stroke: none; width: 18px; height: 18px; }
[dir="rtl"] .chev { transform: scaleX(-1); }

.glass {
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card {
  background: var(--surface-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-h {
  margin: 0 0 10px; padding-inline: 4px;
  font-size: .8125rem; font-weight: 600; color: var(--text-2);
}
.section-h:lang(en) { text-transform: uppercase; letter-spacing: .06em; }

.pill {
  display: inline-flex; align-items: center; justify-self: start; width: fit-content;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: var(--text-2);
  background: var(--line-2); border: 1px solid var(--line);
}

/* ---------- הסמל: קווי הלוגו, בצבע הטקסט (mask) ---------- */

.mark, .wordmark {
  display: inline-block; flex: none;
  background: currentColor;
  -webkit-mask: url("/assets/brand/mark.png?v=914b962a") center / contain no-repeat;
  mask: url("/assets/brand/mark.png?v=914b962a") center / contain no-repeat;
  aspect-ratio: var(--mark-ratio, 2.2);
  height: 24px;
}
.wordmark {
  -webkit-mask-image: url("/assets/brand/wordmark.png?v=178ee71f");
  mask-image: url("/assets/brand/wordmark.png?v=178ee71f");
  aspect-ratio: var(--wordmark-ratio, 8.6);
  height: 15px;
}

/* ---------- סרגל עליון: זכוכית צפה ---------- */

.topbar {
  position: sticky; top: max(12px, env(safe-area-inset-top)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  min-height: var(--topbar-h);
  margin: max(12px, env(safe-area-inset-top)) auto 0;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius);
}
[dir="rtl"] .topbar { padding: 8px 14px 8px 8px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0;
  color: var(--text); text-decoration: none; font-weight: 600;
  transition: transform var(--dur) var(--ease);
}
.brand:active { transform: scale(.97); }
.brand-icon { width: 30px; height: 30px; border-radius: 22.5%; flex: none; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.top-actions { display: flex; gap: 6px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border-radius: 13px; color: var(--text); text-decoration: none;
  font-size: .875rem; font-weight: 600;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.chip:hover { background: var(--line-2); }
.chip:active { transform: scale(.92); }
.chip .ico { width: 19px; height: 19px; }

/* ---------- כפתורים ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--radius-xs);
  background: var(--surface-solid); border: 1px solid var(--line);
  color: var(--text); font-weight: 600; font-size: .9375rem; text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { background: var(--bg); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.btn.primary:hover { opacity: .88; }
.btn .ico { width: 19px; height: 19px; }

/* ---------- דף הנחיתה ---------- */

.hero { position: relative; margin-top: 18px; }
.hero-img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover; object-position: 49% 64%;
  border-radius: var(--radius); background: var(--bg-2);
  filter: var(--img-dim);
}
.hero-empty { aspect-ratio: 16 / 9; }
@media (min-width: 48rem) { .hero-img { aspect-ratio: 16 / 8; object-position: 50% 66%; } }

.hero-card {
  position: absolute; top: 14px; inset-inline: 14px;
  margin-inline: auto; width: fit-content; max-width: calc(100% - 28px);
  display: grid; justify-items: center; gap: 8px;
  padding: 16px 22px 14px; border-radius: var(--radius);
  text-align: center;
}
@media (min-width: 48rem) { .hero-card { top: 22px; padding: 20px 30px 18px; } }
.lockup { margin: 0; display: grid; justify-items: center; gap: 8px; color: var(--text); }
.lockup .mark { height: clamp(46px, 11vw, 70px); }
.lockup .wordmark { height: clamp(15px, 3.4vw, 21px); }
.hero-tagline { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--text-2); text-wrap: balance; }

.group { margin-top: 36px; }
.group:first-child { margin-top: 28px; }

.app-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.app-card {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 14px 14px 14px 16px; border-radius: var(--radius);
  background: var(--surface-solid); box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
[dir="rtl"] .app-card { padding: 14px 16px 14px 14px; }
.app-card:hover { box-shadow: var(--shadow); }
.app-card:active { transform: scale(.97); }
.app-card-icon { width: 64px; height: 64px; border-radius: 22.5%; flex: none; }
.app-card-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.app-card-name { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.app-card-tag { font-size: .875rem; line-height: 1.4; color: var(--text-2); }
.app-card .pill { margin-top: 4px; }
.app-card > .chev, .strip > .chev { color: var(--text-2); width: 18px; height: 18px; }

.about { padding: 20px 22px; display: grid; gap: 16px; justify-items: start; }
.about p { margin: 0; line-height: 1.65; }

/* ---------- דף אפליקציה ---------- */

.app-head {
  margin-top: 18px; padding: 32px 24px 28px;
  display: grid; justify-items: center; text-align: center;
}
.app-icon { width: 104px; height: 104px; border-radius: 22.5%; box-shadow: var(--shadow); }
.app-head h1 { margin: 18px 0 2px; font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.app-tagline { margin: 0; font-size: 1rem; color: var(--text-2); }
.app-desc { margin: 14px 0 0; max-width: 34rem; line-height: 1.6; }
.app-cta { margin: 22px 0 0; }

/* ---------- רצועות: שורות נפרדות, הרווח הוא המפריד ---------- */

.strips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.strip {
  display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 12px 12px 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-solid); box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
[dir="rtl"] .strip { padding: 12px 14px 12px 12px; }
.strip:hover { box-shadow: var(--shadow); }
.strip:active { transform: scale(.97); }
.strip-ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--line-2); color: var(--text);
}
.strip-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.strip-title { font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.strip-sub { font-size: .8125rem; line-height: 1.45; color: var(--text-2); }
.strip-meta { flex: none; font-size: .75rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) { .strip-meta time { display: none; } }

/* ---------- מסמך ---------- */

.doc-layout { margin-top: 28px; }
.doc { max-width: var(--wrap-narrow); margin-inline: auto; }
.toc-side { display: none; }
@media (min-width: 72rem) {
  .doc-layout.has-side { display: grid; grid-template-columns: 17rem minmax(0, var(--wrap-narrow)); gap: 32px; justify-content: center; }
  .doc-layout.has-side .doc { margin: 0; }
  .toc-side {
    display: block; position: sticky; top: calc(var(--topbar-h) + 36px); align-self: start;
    max-height: calc(100dvh - var(--topbar-h) - 60px); overflow: auto;
    padding: 16px 10px; border-radius: var(--radius);
  }
  .toc-inline { display: none; }
}
.toc-side .section-h { padding-inline: 10px; }
.toc-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc-side a {
  display: block; padding: 7px 10px; border-radius: var(--radius-xs);
  color: var(--text-2); text-decoration: none; font-size: .8125rem; line-height: 1.4;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.toc-side a:hover { background: var(--line-2); color: var(--text); }

.doc-head { padding: 8px 4px 20px; }
.eyebrow { margin: 0 0 6px; font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.doc-head h1 { margin: 0; font-size: clamp(1.75rem, 1.3rem + 2vw, 2.375rem); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.doc-dates { margin: 10px 0 0; font-size: .875rem; color: var(--text-2); }
.doc-dates time { color: var(--text); font-weight: 600; }

.doc > .card, .doc > .group { margin-bottom: 14px; }

.notice { padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.notice p { margin: 0; font-weight: 600; }

.glance { padding: 18px 20px 16px; }
.glance .section-h { padding-inline: 0; }
.glance ul { margin: 0; padding-inline-start: 1.15em; display: grid; gap: 8px; font-size: .9375rem; line-height: 1.55; }

.toc-inline { border-radius: var(--radius-sm); }
.toc-inline summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px;
  cursor: pointer; list-style: none; font-weight: 600; font-size: .9375rem;
}
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--text-2); transition: transform var(--dur) var(--ease); }
.toc-inline[open] summary::after { transform: rotate(45deg); }
.toc-inline ol { margin: 0; padding: 0 18px 16px; padding-inline-start: 2.4em; display: grid; gap: 8px; font-size: .875rem; }
.toc-inline a { color: var(--text-2); text-decoration: none; }
.toc-inline a:hover { color: var(--text); }

/* גוף המסמך: גיליון אטום, קריאות קודם — 17px, שורה עד ~68ch, רווח שורות נדיב */
.sheet { padding: clamp(22px, 4vw, 40px) clamp(20px, 4vw, 44px); }
.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 2.1em 0 .55em; font-size: 1.1875rem; font-weight: 700; line-height: 1.35; scroll-margin-top: calc(var(--topbar-h) + 40px); }
.prose h3 { margin: 1.5em 0 .35em; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--text-2); }
.prose strong { font-weight: 650; }
.prose h2:target { background: var(--line-2); border-radius: var(--radius-xs); box-shadow: 0 0 0 8px var(--line-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .9375rem; }
.prose th, .prose td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.doc-contact { padding: 20px 22px; display: grid; gap: 6px; justify-items: start; }
.doc-contact h2 { margin: 0; font-size: 1.1875rem; font-weight: 700; }
.doc-contact p { margin: 0 0 10px; color: var(--text-2); font-size: .9375rem; }
.doc .group { margin-top: 28px; }

.notfound { margin-top: 36px; padding: 32px 24px; text-align: center; }
.notfound-code { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.notfound h1 { margin: 4px 0 8px; font-size: 1.75rem; }
.notfound p { margin: 0 0 16px; color: var(--text-2); }
.notfound-alt { margin-top: 20px !important; padding-top: 18px; border-top: 1px solid var(--line); font-size: .875rem; }

/* ---------- תחתית ---------- */

.site-footer {
  margin-top: 56px; padding: 0 0 max(28px, env(safe-area-inset-bottom));
  text-align: center; font-size: .8125rem; color: var(--text-2);
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; margin-bottom: 8px; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: var(--radius-xs);
  color: var(--text-2); text-decoration: none; transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.footer-links a:hover { background: var(--line-2); color: var(--text); }
.footer-meta { margin: 0; }

/* ---------- נגישות ותנועה ---------- */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { :root { --text-2: var(--text); --line: currentColor; } .glass { background: var(--surface-solid); } }

/* ---------- הדפסה: שחור על לבן, בלי כרום ---------- */

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-solid: #fff; --text: #000; --text-2: #333; --line: #999; --shadow: none; --shadow-sm: none; --img-dim: none; }
  .topbar, .skip, .toc-inline, .toc-side, .footer-links, .hero, .doc-contact .btn { display: none !important; }
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { border: 1px solid #999; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
  .prose h2, .prose h3 { break-after: avoid; }
  .prose li, .glance { break-inside: avoid; }
}

/* נוצר בבנייה מקבצי המותג */
:root { --mark-ratio: 883 / 406; --wordmark-ratio: 810 / 94 }
