/* design/site.css - שאר האתר בשפת העיצוב v1 (חדר בקרה 136, 24.10 בלילה).

   עמוד הקורס ועמוד הכיתה מצוירים בחבילת המעצבת (practice-page.css,
   class-page.css, בתוך .pm-page). כאן הרכיבים המשותפים של כל שאר העמודים
   מקבלים את אותה שפה: טוקנים, כותרת העמוד, פירורי הלחם, הכפתורים, השורות
   והסרגל העליון. הערכים נלקחו מקובצי החבילה, וכל ערך כתוב ליד השם שלו שם.
   הקובץ נטען אחרון בכל עמוד (build_nav.py, ‏build_seo_pages.py), ולכן גובר
   על style.css בלי !important. רק טוקנים, בלי צבע קבוע: מצב הלילה (ink)
   והטקסט הגדול (rem) עובדים מעצמם. הבודק: verify_design_sitewide.py.
   דוח: docs/qa/design-sitewide-136.md. */

/* 1. טוקנים. החבילה שטוחה: קו שיער וצל כמעט שקוף (--pm-shadow), כרטיס
   ברדיוס 10 (.pm-topic) וכפתור ברדיוס 7 (.pm-button). רק ביום; בלילה
   style.css קובע את הצל. */
:root:not([data-theme="ink"]) {
  --shadow: 0 2px 6px rgba(53, 45, 36, .02), 0 12px 32px rgba(53, 45, 36, .02);
}
:root {
  --radius-lg: 10px;
  --radius-btn: 7px;
}

/* 2. המעטפת v3 (הבעלים 25.10; designer-final-v3, החלטות 1, 2 ו-6 ו"נגישות").
   הכותרת: לוגו, שני יעדים, "לרכישה" משני ושקט, כפתור נגישות ותפריט
   (build_nav.header_html). שני היעדים בסרגל התחתון עד 599 ובשורת הכותרת
   מעליו; סרגל הצד ירד. הטוקנים, הניגודיות וה-!important של הנגישות ב-style.css.
   הבודקים: verify_nav_reach, ‏verify_header_fit, ‏verify_big (הנגישות). */
/* מצב עבודה: <body data-shell="work"> (build_nav.with_shell, או JS בזמן ריצה)
   מסתיר את הניווט הראשי בכל רוחב; "מעלה" נשאר הדרך חזרה */
body[data-shell="work"] .dest-nav { display: none; }

/* היעדים בשורת הכותרת: גלולה רכה ליעד הנוכחי, כמו בדגם (#navigation) */
@media (min-width: 600px) {
  .dest-nav { gap: 8px; }
  .dest { border-radius: 10px; color: var(--text-muted); }
  .dest[aria-current="page"] { background: var(--iris-soft); color: var(--iris); font-weight: 650; }
  .dest[aria-current="page"]::after { content: none; }
}
@media (min-width: 900px) {
  .site-header .wrap { gap: 24px; }
  .dest { padding: 0 20px; }
}
/* הסרגל התחתון: שני יעדים במרכז, לא שני חצאי מסך */
@media (max-width: 599px) {
  .dest-nav { grid-auto-columns: minmax(0, 200px); justify-content: center; gap: 8px; }
  :root:has(body[data-shell="work"]) { --tabbar-h: 0px; }
  body[data-shell="work"] { padding-bottom: 0; }
}

/* "לרכישה": משני ושקט (v3) - מסגרת דקה וטקסט הפעולה, בלי צל ובלי מילוי */
.buy-cta, .buy-cta:hover, .buy-cta:active {
  background: var(--surface);
  color: var(--iris);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  transform: none;
  font-weight: 500;
}
.buy-cta:hover { background: var(--iris-soft); }

/* התפריט: בכל רוחב, נפתח מהקצה השמאלי של הכותרת אל תוך המסך. כשהוא פתוח
   הכותרת עולה מעל שורת הפעולה של התרגיל (practice.css: .ex-actbar, 41) */
.more { display: block; }
.site-header:has(.more-menu:not([hidden])) { z-index: 50; }
.more-menu, .more-menu[class] {
  inset-inline-start: auto;
  inset-inline-end: 0;
  width: min(290px, calc(100vw - 24px));
  min-width: 0;
  padding: 8px;
  /* טלפון לרוחב (360 בגובה): התפריט נגלל בתוכו ולא יוצא מהמסך */
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.more-menu ul { list-style: none; margin: 0; padding: 0; }
.more-menu li > a, .more-menu li > button:not(.theme-toggle) { gap: 10px; min-height: 48px; }
.more-menu .hdr-ico { color: var(--text-muted); }
.more-menu .login-btn {
  /* display: grid ב-style.css, כי הכפתור מוסתר שם עד שהוא מצויר */
  justify-items: start;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: .9375rem;
  font-weight: 400;
}
.more-menu .login-btn ~ .buy-cta { margin: 0; }
.more-theme { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px 0 16px; }
.more-legal { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 6px 0 0; padding: 6px 12px 0; border-top: 1px solid var(--border); }
.more-legal a, .more-legal a[href] {
  display: inline-flex;
  width: auto;
  min-height: 44px;
  padding: 0;
  font-size: .8125rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 3. פירורי הלחם (.pm-breadcrumbs): 13, קו נטוי בגוון הקו החזק, והעמוד
   הנוכחי בצבע הטקסט. המפריד נשאר בעמוד (‏aria-hidden), רק הסימן מתחלף. */
.crumbs { gap: 10px; font-size: .8125rem; padding-top: 25px; }
.crumbs .sep { font-size: 0; opacity: 1; }
.crumbs .sep::before { content: "/"; font-size: .8125rem; color: var(--border-strong); }
.crumbs > span:last-child:not(.sep) { color: var(--text); }
.crumbs + .page-title, .crumbs + h1 { margin-top: 18px; }
@media (max-width: 599px) {
  .crumbs { gap: 7px; font-size: .75rem; padding-top: 19px; }
  .crumbs .sep::before { font-size: .75rem; }
}

/* 4. כותרת העמוד (.pm-hero h1): 44 במחשב ו-30 בטלפון, משקל 750 וריווח
   צפוף. בעמודי העבודה (תרגיל, שאלה, פתרון, הוכחה, הסבר, מבחן) הגודל
   נשאר, כי השאלה צריכה להיראות בלי גלילה; רק המשקל והריווח. */
/* עמוד הבית שקט בכוונה (verify_home_doors: בלי 750 מתחת לנוף), ולכן לא כאן */
#site-main h1:not(.pm-page h1, .hs-copy h1) { color: var(--pm-heading); font-weight: 750; letter-spacing: -.03em; line-height: 1.3; }
body:not(:has(.site-header.is-work)) #site-main :is(.page-title, .wrap, .seo-main) > h1:not(.pm-page h1),
body:not(:has(.site-header.is-work)) #site-main > h1,
body:not(:has(.site-header.is-work)) #site-main.wrap > h1 {
  font-size: clamp(2rem, 1.1rem + 2.4vw, 2.75rem);
}
/* הפתיח (.pm-hero-description): שקט ומרווח */
body:not(:has(.site-header.is-work)) .page-title p { font-size: 1.0625rem; line-height: 1.8; }

/* 5. כפתורים (.pm-button): 44 לפחות, 600, רדיוס 7. המשני על המשטח עם קו
   חזק וטקסט בצבע הפעולה (.pm-button-secondary); הראשי בלי שינוי צבע. */
.btn {
  min-height: 44px;
  padding: 10px 17px;
  font-weight: 600;
  justify-content: center;
}
.btn:not(.primary) {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--iris);
}
.btn:not(.primary):hover { background: var(--iris-soft); border-color: var(--ctl-border); color: var(--iris-deep); }

/* 6. שורות (.pm-subtopic-link, ‏.pm-topic): משטח, קו שיער, רדיוס 10, ובמעבר
   רקע רך במקום תזוזה. */
.trow, .link-row, .th-row, .drillrow, .srch-row { border-radius: var(--radius-lg); }
.trow:hover { transform: none; background: var(--iris-soft); border-color: var(--border-strong); }
.trow:hover .trow-name { color: var(--iris); text-decoration: underline; text-underline-offset: 4px; }
.trow-num { border-radius: 8px; background: var(--iris-soft); color: var(--iris); }

/* 7. כותרת מדור (.pm-chapter-title h2): 22, משקל 700, וקו שיער עד סוף
   השורה. ‏.group-title של האתר כבר בנוי כך; כאן שאר כותרות המדור מצטרפות. */
.group-title,
:is(.th-group, .seo-section, .pr-section, .voices-section, .lg-block, .cr-block) > h2 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  font-size: 1.375rem;
  font-weight: 700;
}
:is(.th-group, .seo-section, .pr-section, .voices-section, .lg-block, .cr-block) > h2::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: var(--border);
}

/* 9. עמודי העבודה: התוכן עצמו במסך הראשון (הבעלים על v542: "תמונות פתיחה
   ופסי ניווט דוחקים את התוכן אל מתחת למסך הראשון"). רצועת הספרייה יורדת
   בעמוד הנושא, בשיעור ובבניית המבחן, ונמוכה בשאלוני הבגרות (בטלפון יורדת);
   פירורי הלחם ופס "מעלה" צפופים; ובעמוד הקורס המרווחים של החבילה קטנים.
   המדידה: docs/qa/design-sitewide-136.md. */
:is(html.is-topic, body[data-page="lesson"], body[data-page="exam"]) .wing { display: none; }
body[data-page="papers"] .wing { height: 96px; margin: 12px 0 14px; }
:is(body[data-page="practice"], body[data-page="exercise"], body[data-page="lesson"], body[data-page="exam"],
  body[data-page="papers"], body[data-page="worksheet"]) :is(.upbar) { margin-bottom: .35rem; }
:is(body[data-page="practice"], body[data-page="exercise"], body[data-page="lesson"], body[data-page="exam"]) .crumbs { padding-top: 8px; }
:is(body[data-page="practice"], body[data-page="lesson"], body[data-page="exam"]) .page-title { padding: 8px 0 14px; }
/* "תרגול" בלי פרמטרים: בורר הכיתות הישן יורד כשהעיצוב צויר (הכיתה נבחרת בכפתור שבפתיח) */
#site-main:has(> #practice-host > .pm-page) > .grade-bar { display: none; }
/* עמוד הנושא: הפתיח הכהה כבר אומר את המשפט של הנושא, ולכן המשפט שמתחת
   לכותרת יורד (verify_referral_return קורא אותו גם מוסתר); בטלפון גם
   התצוגה המונפשת (.hero-stage) יורדת, כי שם היא נערמת מעל התוכן */
html.is-topic #hub-blurb { display: none; }
.pm-page .pm-breadcrumbs { margin-block: 10px 16px; }
.pm-page .pm-hero { padding-bottom: 22px; }
.pm-page .pm-workspace { margin-top: 20px; }
.pm-page .pm-search-toolbar { margin-bottom: 16px; }
@media (max-width: 599px) {
  body[data-page="papers"] .wing { display: none; }
  html.is-topic .track-hero .hero-stage { display: none; }
  /* בניית מבחן: "טקסט גדול" בשורת הכותרת והפתיח צפוף מתחתיה, כדי שסוג
     המבחן והמקצוע ייראו במסך הראשון (החדר על v543). המילים לא השתנו */
  #exam-title-box { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding-bottom: 10px; }
  #exam-title-box > div:first-child { display: contents; }
  #exam-title-box h1 { grid-row: 1; grid-column: 1; }
  #exam-title-box > :not(div:first-child) { grid-row: 1; grid-column: 2; }
  #exam-title-box #exam-lead { grid-column: 1 / -1; margin-top: 4px; font-size: .9375rem; line-height: 1.55; }
  .pm-page .pm-breadcrumbs { margin-block: 8px 12px; }
  .pm-page .pm-hero { padding-bottom: 16px; }
  .pm-page .pm-workspace { margin-top: 14px; }
}

/* 8. שדות חיפוש וטקסט (.pm-search): 48, רדיוס 9, מסגרת בצבע הפעולה במיקוד */
#site-main input[type="search"]:not(.pm-page input),
#site-main input[type="text"]:not(.pm-page input) { border-radius: 9px; }

/* 10. ביקורת העיצוב 25.10 (C:izmath-qa\design-audit-136\status.md).
   הבעלים: "הרבה אפשרויות פתוחות יחד, במיוחד בנייד ... לצמצם את המלל
   והקישורים". */
/* בונה המבחן: מקצוע ונושאים כבחירה מוכנה עם "שינוי" (exam.js) */
.ex-fold > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; min-height: 44px; padding: 8px 0; cursor: pointer; list-style: none; }
.ex-fold > summary::-webkit-details-marker { display: none; }
.ex-fold > summary b { color: var(--text-heading); }
.ex-fold > summary span { color: var(--text); }
.ex-fold > summary i { font-style: normal; font-size: .875rem; font-weight: 600; color: var(--iris); text-decoration: underline; text-underline-offset: 3px; }
.ex-fold[open] > summary i { display: none; }
/* עמוד הנושא: כותרת אחת (הכותרת בפתיח הכהה חוזרת על הכותרת של העמוד),
   דרך חזרה אחת (פס "מעלה" ופירורי הלחם; הקישור בתוך הפתיח יורד), וביום
   הפתיח בחום רך ולא כמעט שחור */
html.is-topic .track-hero-text > h2, html.is-topic .track-hero .hero-back { display: none; }
html.is-topic:not([data-theme="ink"]) .track-hero { background: var(--iris-deep); box-shadow: none; }
@media (max-width: 599px) {
  /* בונה המבחן: ההסברים הקבועים מתחת לכל קבוצה יורדים; ההודעה החיה נשארת */
  .ex-field-note:not(.ex-count-note) { display: none; }
  /* תרגיל: בלי המסגרת החיצונית של הגיליון, כמו בעמוד הפתירה, כדי שהשאלה
     והשרטוט יקבלו את הרוחב; "עזרו לנו" רק התפוח (השם נשאר לקורא מסך) */
  body[data-page="exercise"] .ex-sheet { padding: 4px 0 0; border: 0; background: none; box-shadow: none; }
  body[data-page="exercise"] #ex-main > .rp-fab.is-top :is(.rp-fab-long, .rp-fab-short) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
/* שאלוני הבגרות: השנים הקודמות מקופלות (papers.js); "פתרון עם ניוטי" היא
   הפעולה, והטופס והפתרון הרשמי נלווים */
.paper-form-link { font-size: .8125rem; font-weight: 500; color: var(--text-muted); }
/* חיפוש: שורת סינון לפי מקצוע וסוג (search.js) */
.srch-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.srch-chip { min-height: 44px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .875rem; cursor: pointer; }
.srch-chip.is-on { background: var(--iris); border-color: var(--iris); color: var(--on-accent); font-weight: 600; }

/* ── v3: כיתה ותרגול (חבילת המעצבת 25.10, החלטה 2) ──
   כפתור ההקשר וחלונית "המסלול שלי" (design/context-picker.js). כאן ולא ב-practice-page.css,
   כי הרכיב משמש כל עמוד שיבחר בו (הבית אחר כך). רק טוקנים, כמו בשאר הקובץ (S2). */
.pm-ctx-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-heading); font: inherit; font-size: .95rem; text-align: start; cursor: pointer; }
.pm-ctx-button:hover { border-color: var(--border-strong); }
.pm-ctx-button:focus-visible, .pm-ctx-dialog :is(button, select):focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; }
.pm-ctx-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pm-ctx-dialog { box-sizing: border-box; margin: 0 auto 0 0; width: min(370px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 24px; border: 0; border-inline-end: 1px solid var(--border); background: var(--surface); color: var(--text); overscroll-behavior: contain; }
.pm-ctx-dialog::backdrop { background: color-mix(in srgb, var(--text) 32%, transparent); }
.pm-ctx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pm-ctx-head h2 { margin: 0; font-size: 1.35rem; color: var(--text-heading); }
.pm-ctx-close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; }
.pm-ctx-close:hover { background: var(--iris-soft); }
.pm-ctx-close .pm-ctx-icon { width: 22px; height: 22px; }
.pm-ctx-field { display: block; margin: 20px 0 8px; font-weight: 600; }
.pm-ctx-dialog select { width: 100%; min-height: 50px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.pm-ctx-save { width: 100%; min-height: 48px; margin-top: 28px; border: 0; border-radius: 11px; background: var(--iris); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; }
.pm-ctx-save:hover { background: var(--iris-deep); }
/* ── v3: שאלונים וחיפוש (papers.js, search.js; REPLY-TO-CLAUDE-137 סעיפים 5 ו-6) ── */
.ptabs { display: flex; margin: 4px 0 16px; border-bottom: 1px solid var(--border); }
.ptabs [role="tab"] { flex: 1 1 0; min-height: 48px; margin-bottom: -1px; padding: 0 6px; border: 0; white-space: nowrap; border-bottom: 3px solid transparent; background: none; color: var(--text-muted); font: inherit; font-weight: 600; cursor: pointer; }
.ptabs [role="tab"]:hover { color: var(--iris); }
.ptabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--iris); color: var(--iris); }
.pselects { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.psel { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 44px; padding-inline-start: 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.psel:focus-within { border-color: var(--iris); }
.psel > span { flex: none; font-size: .8125rem; color: var(--text-muted); }
.psel select { min-width: 0; min-height: 42px; padding: 0 8px; border: 0; background: transparent; color: var(--text-heading); font: inherit; font-weight: 600; text-overflow: ellipsis; cursor: pointer; }
.psel:has(select[data-pf="qt"]) { flex: 1 1 100%; }
.psel:has(select[data-pf="qt"]) select { flex: 1; }
@media (min-width: 600px) { .psel:has(select[data-pf="qt"]) { flex: 0 1 auto; } }
.paper-forms-note, .paper-empty { margin: 0 0 12px; font-size: .875rem; color: var(--text-muted); }
.paper-form-link.is-solve { color: var(--iris); font-weight: 650; }
.srch-row { min-height: 56px; padding: 8px 10px; }
.srch-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 8px; }
.srch-meta { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.srch-kind { min-width: 0; padding: 1px 8px; }
.srch-row mark { padding: 0 2px; border-radius: 3px; background: var(--iris-soft); color: var(--text); }
.srch-row:is(:hover, :focus-visible) mark { background: var(--surface); }
.srch-more { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 8px 0 4px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--iris); font: inherit; font-weight: 600; cursor: pointer; }
.srch-more:hover { background: var(--iris-soft); }
.ppanel > .paper-solve { margin-top: 0; padding-top: 0; border-top: 0; }
