/* דפי התוכן של המשבצת (pages/build.ts): חוברת מודפסת של התוכנית. נייר שמנת, דיו כהה, פס כחול-לילה עם זהב
   כמו במשחק, קווי הפרדה של דפוס, ומספרים גדולים כמו בשעון. בלי סגול, בלי ניאון, בלי אימוג׳י. */

@font-face { font-family: 'Karantina'; font-weight: 700; font-display: swap; src: url(/pages-fonts/karantina-hebrew-700.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Karantina'; font-weight: 700; font-display: swap; src: url(/pages-fonts/karantina-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2122; }
@font-face { font-family: 'Frank Ruhl'; font-weight: 300 900; font-display: swap; src: url(/pages-fonts/frank-ruhl-libre-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank Ruhl'; font-weight: 300 900; font-display: swap; src: url(/pages-fonts/frank-ruhl-libre-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2122; }
@font-face { font-family: 'Noto Sans Hebrew'; font-weight: 100 900; font-display: swap; src: url(/pages-fonts/noto-sans-hebrew-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Noto Sans Hebrew'; font-weight: 100 900; font-display: swap; src: url(/pages-fonts/noto-sans-hebrew-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2122; }
@font-face { font-family: 'Big Shoulders'; font-weight: 100 900; font-display: swap; src: url(/pages-fonts/big-shoulders-latin.woff2) format('woff2'); }

:root {
  --paper: #f3efe4;
  --paper-2: #e9e2d0;
  --paper-3: #ddd3bb;
  --ink: #15171e;
  --ink-2: #3d3f47;
  --ink-3: #6b6a66;
  --rule: #c9bea3;
  --navy: #0a1636;
  --navy-2: #102457;
  --led: #2f6bff;
  --gold: #e8b54a;
  --gold-hi: #ffe3a1;
  --gold-lo: #9c6c1e;
  --orange: #d9560f;
  --f-display: 'Karantina', 'Noto Sans Hebrew', sans-serif;
  --f-body: 'Frank Ruhl', 'David', 'Times New Roman', serif;
  --f-ui: 'Noto Sans Hebrew', system-ui, sans-serif;
  --f-num: 'Big Shoulders', 'Noto Sans Hebrew', sans-serif;
  --col: 46rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.1875rem;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--led); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 14px; font-family: var(--f-ui); z-index: 9; }
.skip:focus { inset-inline-start: 8px; }

/* ---- הפס העליון: כחול-לילה וזהב, כמו המסך הגדול באולפן ---- */
.mast { background: var(--navy); border-bottom: 4px solid var(--gold); box-shadow: 0 3px 0 var(--navy); }
.mast-in { max-width: 72rem; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; }
.brand .mark { grid-row: 1 / 3; width: 44px; height: 44px; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: 0.9; color: var(--gold); letter-spacing: 0.01em; }
.brand-tag { font-family: var(--f-ui); font-size: 0.78rem; font-weight: 600; color: #bcd3ff; letter-spacing: 0.02em; }
.brand:hover .brand-name { color: var(--gold-hi); }

/* כפתור "לשחק עכשיו": לוחית זהב עם קצה משופע ותווית מחיר, כמו בערוץ קניות */
.play {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px;
  background: var(--gold); color: var(--navy);
  font-family: var(--f-ui); font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  box-shadow: inset 0 3px 0 var(--gold-hi), inset 0 -3px 0 var(--gold-lo);
}
.play span { font-size: 0.72rem; font-weight: 800; background: var(--navy); color: var(--gold); padding: 2px 7px; letter-spacing: 0.04em; }
.play:hover { background: var(--gold-hi); color: var(--navy); }
.play.big { font-size: 1.2rem; padding: 14px 24px 14px 18px; }

/* ---- תפריט הדפים ---- */
.nav { background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.nav-in { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 2px 22px; }
.nav a { font-family: var(--f-ui); font-size: 0.95rem; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 10px 0 8px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--navy); border-bottom-color: var(--rule); }
.nav a[aria-current='page'] { color: var(--navy); border-bottom-color: var(--orange); }

/* ---- כותרת הדף ---- */
main { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.page-head { max-width: var(--col); margin: 0 auto; padding: 44px 0 26px; border-bottom: 3px double var(--ink); }
.kicker { font-family: var(--f-ui); font-size: 0.85rem; font-weight: 800; color: var(--orange); letter-spacing: 0.06em; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(3.4rem, 9vw, 5.4rem); line-height: 0.95; margin: 6px 0 14px; color: var(--navy); }
.lead { font-size: 1.4rem; line-height: 1.6; margin: 0; color: var(--ink-2); }

/* ---- גוף הטקסט ---- */
.prose { max-width: var(--col); margin: 0 auto; padding: 8px 0 24px; }
.prose h2 { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--navy); margin: 46px 0 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.prose > h2:first-child { border-top: 0; padding-top: 0; margin-top: 30px; }
.prose h3 { font-family: var(--f-ui); font-weight: 800; font-size: 1.15rem; line-height: 1.4; margin: 28px 0 6px; color: var(--ink); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--orange); }
.prose strong { font-weight: 700; }
.prose .note { font-family: var(--f-ui); font-size: 0.95rem; line-height: 1.65; color: var(--ink-2); background: var(--paper-2); border-inline-start: 4px solid var(--gold); padding: 12px 16px; margin: 0 0 18px; }
.prose .updated { font-family: var(--f-ui); font-size: 0.85rem; color: var(--ink-3); margin-top: 32px; }
.prose code, .prose kbd { font-family: var(--f-ui); font-size: 0.92em; background: var(--paper-2); border: 1px solid var(--rule); padding: 0 5px; }

/* צעדים ממוספרים: ספרות גדולות כמו בשעון של הקרב */
.steps { list-style: none; padding: 0; margin: 10px 0 24px; counter-reset: step; }
.steps > li { position: relative; padding: 0 64px 0 0; margin: 0 0 22px; min-height: 52px; counter-increment: step; }
.steps > li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: -2px;
  width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold);
  font-family: var(--f-num); font-weight: 800; font-size: 1.9rem; line-height: 1;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.steps > li h3 { margin: 0 0 4px; }
.steps > li p { margin: 0; }

/* עובדות בקצרה: שורת נתונים כמו בכרטיס מוצר */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 26px 0 30px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.facts div { padding: 14px 14px 12px; border-inline-start: 1px solid var(--rule); }
.facts div:first-child { border-inline-start: 0; }
.facts b { display: block; font-family: var(--f-num); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--navy); }
.facts b.he { font-family: var(--f-display); font-size: 2.3rem; }
.facts span { display: block; font-family: var(--f-ui); font-size: 0.85rem; line-height: 1.4; color: var(--ink-2); margin-top: 4px; }

/* חותמת דיו (אחת לדף, לכל היותר) */
.stamp {
  display: inline-block; transform: rotate(-4deg);
  font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; line-height: 1;
  color: var(--orange); border: 3px solid var(--orange); padding: 6px 14px 4px; margin: 4px 0 18px;
  opacity: 0.9;
}

/* טבלה */
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { width: 100%; border-collapse: collapse; font-family: var(--f-ui); font-size: 0.95rem; line-height: 1.5; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--ink); white-space: nowrap; }

/* שאלות נפוצות: נפתח בלחיצה, בלי קוד */
details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 2px solid var(--ink); }
summary { cursor: pointer; list-style: none; font-family: var(--f-ui); font-weight: 700; font-size: 1.08rem; line-height: 1.45; padding: 16px 0 16px 34px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; inset-inline-end: 4px; top: 10px; font-family: var(--f-num); font-weight: 700; font-size: 1.8rem; color: var(--orange); }
details[open] summary::after { content: '–'; }
details > div { padding: 0 0 14px; }

/* ---- הקטגוריות ---- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.toc a { font-family: var(--f-ui); font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--navy); background: var(--paper-2); border: 1px solid var(--rule); padding: 6px 12px; display: inline-flex; gap: 8px; align-items: baseline; }
.toc a span { font-family: var(--f-num); font-weight: 800; color: var(--orange); }
.toc a:hover { border-color: var(--navy); color: var(--navy); }
.topic h2 { margin-top: 40px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 14px; }
.cat { background: #faf7ef; border: 1px solid var(--rule); border-top: 4px solid var(--navy); padding: 14px 16px 12px; display: flex; flex-direction: column; }
.cat h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1; margin: 0 0 2px; color: var(--navy); }
.cat-hint { font-family: var(--f-ui); font-size: 0.85rem; font-weight: 700; color: var(--orange); margin-bottom: 6px; }
.cat p { font-size: 1.02rem; line-height: 1.6; margin: 0 0 8px; }
.cat-ex { font-family: var(--f-ui); font-size: 0.9rem; line-height: 1.5; background: var(--paper-2); padding: 6px 10px; margin-bottom: 8px; }
.cat-ex span { color: var(--ink-3); }
.cat-meta { margin-top: auto; font-family: var(--f-ui); font-size: 0.8rem; font-weight: 600; color: var(--ink-3); padding-top: 6px; border-top: 1px dashed var(--rule); }

/* ---- סוף הדף: הזמנה לשחק ---- */
.cta { max-width: var(--col); margin: 24px auto 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; background: var(--navy); color: #fff; padding: 22px 24px; border-top: 4px solid var(--gold); }
.cta-text strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--gold); margin-bottom: 6px; }
.cta-text span { font-family: var(--f-ui); font-size: 0.95rem; color: #bcd3ff; }

/* ---- התחתית ---- */
.foot { background: var(--navy); color: #bcd3ff; border-top: 4px solid var(--gold); }
.foot-in { max-width: 72rem; margin: 0 auto; padding: 28px var(--gutter) 30px; font-family: var(--f-ui); font-size: 0.9rem; line-height: 1.6; display: grid; gap: 18px; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand .mark { width: 36px; height: 36px; flex: none; }
.foot-brand strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--gold); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: var(--gold); text-decoration: underline; }
.foot-small { color: #8ea6d9; font-size: 0.82rem; }

@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .brand-tag { display: none; }
  .brand-name { font-size: 2.2rem; }
  .brand .mark { width: 36px; height: 36px; }
  .mast .play span { display: none; }
  /* בטלפון התפריט בשורה אחת שגוללים לצדדים, במקום שלוש שורות */
  .nav-in { flex-wrap: nowrap; overflow-x: auto; gap: 0 18px; scrollbar-width: none; }
  .nav-in::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .nav a { font-size: 0.9rem; }
  .page-head { padding-top: 30px; }
  .lead { font-size: 1.25rem; }
  .prose h2 { font-size: 2.2rem; }
  .steps > li { padding-inline-start: 58px; }
  .cta { padding: 18px; }
}

@media print {
  .mast, .nav, .cta, .foot { display: none; }
  body { background: #fff; }
}
