/* עלי זהב: העיצוב החדש (UI-4, docs/specs/ui-redesign.md). שתי ערכות; ברירת מחדל לכולם בהיר,
   גם כשהמכשיר במצב כהה (theme.js קובע data-theme). המשתנים הישנים (--paper, --card, --board...) הם
   כינויים לחדשים, כדי שכל המסכים יעברו לערכה בלי לגעת בכל תבנית. */
/* גופנים מקומיים (CSP 'self', בלי Google Fonts). קובץ משתנה אחד לכל גופן מכסה את כל המשקלים.
   מקור: github.com/google/fonts (ofl/heebo, ofl/frankruhllibre), הומרו ל-woff2 בלי שינוי. */
@font-face { font-family: Heebo; src: url("fonts/Heebo-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("fonts/FrankRuhlLibre-wght.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
:root {
  --bg:#F4F3EE; --surface:#FFFFFF; --raised:#FAF9F5; --line:#E4E1D8; --line2:#EEECE5;
  --ink:#14201B; --ink2:#46524C; --ink3:#66706A; --accent:#0D6A4D; --accentHi:#0A5A41; --onAccent:#FFFFFF;
  --accentSoft:#E2F0E9; --goldStrong:#946010; --goldSoft:#FAEFD8; --blue:#1E5C9F; --blueSoft:#E5EDF7;
  --amber:#9C5807; --amberSoft:#FBEDD6; --grey:#66706A; --greySoft:#EDEDE8; --green:#0B7148; --greenSoft:#DFF1E7;
  --rose:#A8213A; --roseSoft:#FAE6E9; --hover:#F6F5F0;
  --shadow: 0 1px 2px rgba(20,32,27,.05), 0 8px 24px -12px rgba(20,32,27,.10);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg:#0E1412; --surface:#151D1A; --raised:#1A2420; --line:#27332E; --line2:#1F2A25;
  --ink:#ECF1EE; --ink2:#B6C1BB; --ink3:#8F9B95; --accent:#4FC79D; --accentHi:#6AD5AF; --onAccent:#05241A;
  --accentSoft:#163A2D; --goldStrong:#E7BB62; --goldSoft:#362C16; --blue:#83B6F1; --blueSoft:#17283B;
  --amber:#F1B460; --amberSoft:#382912; --grey:#9AA6A0; --greySoft:#222C28; --green:#62D4A4; --greenSoft:#153426;
  --rose:#F2909F; --roseSoft:#381C22; --hover:#1C2622;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.5);
  color-scheme: dark;
}
/* כינויים לשמות הישנים, וסולם השלבים: טרם נלמדה אפור, בתחילת תהליך ענבר, בתהליך כחול, שולט ירוק.
   מוגדרים על אותו :root, ולכן מתעדכנים יחד עם data-theme. */
:root {
  --paper: var(--bg); --card: var(--surface); --muted: var(--ink3);
  --board: var(--accent); --board-ink: var(--onAccent);
  --gold: var(--goldStrong); --gold-soft: var(--goldSoft); --warn: var(--rose);
  --st0: var(--grey); --st0-bg: var(--greySoft); --st1: var(--amber); --st1-bg: var(--amberSoft);
  --st2: var(--blue); --st2-bg: var(--blueSoft); --st3: var(--green); --st3-bg: var(--greenSoft);
  /* Heebo לגוף, Frank Ruhl Libre לכותרות בלבד. קבצים מקומיים ב-static/fonts (רישיון OFL לצידם) */
  --body: Heebo, system-ui, "Segoe UI", Arial, sans-serif;
  --display: "Frank Ruhl Libre", Heebo, system-ui, "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; caret-color: var(--accent); accent-color: var(--accent); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accentSoft); color: var(--ink); }
.app { max-width: 720px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
a { color: inherit; }

/* כותרת הדף: משטח בהיר עם קו תחתון (במקום הלוח הירוק הכהה) */
.board { background: var(--surface); color: var(--ink); padding-block: 12px 22px; border-bottom: 1px solid var(--line); }
.board .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.board h1 { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.2; margin: 6px 0 0; text-wrap: balance; }
.board .sub { color: var(--ink2); font-size: 16px; margin-top: 4px; }
.board a { color: var(--accent); }
.back { font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.board .who { font-size: 14px; color: var(--ink2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chalk-stats { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.chalk-stats div { font-size: 14px; color: var(--ink2); }
.chalk-stats b { font-weight: 700; font-size: 22px; display: block; color: var(--gold); font-variant-numeric: tabular-nums; }

main { display: grid; gap: 22px; padding-block: 18px; }
section > h2 { font-weight: 700; font-size: 19px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; }
section > h2 .count { font-size: 14px; color: var(--muted); font-weight: 600; }
h3.group { font-size: 16px; margin: 14px 0 8px; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.list { display: grid; gap: 10px; }
.empty { color: var(--muted); padding: 14px; font-size: 15px; }
.error { background: var(--st1-bg); color: var(--st1); border: 1px solid var(--st1); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.notice { background: var(--gold-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.notice.alert { background: var(--st1-bg); color: var(--ink); border-inline-start: 4px solid var(--warn); margin-bottom: 8px; }

.names { display: flex; flex-wrap: wrap; gap: 8px; }
.name-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 15px; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.row-item { padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; text-decoration: none; }
.row-item + .row-item { border-top: 1px solid var(--line); }
.chev { color: var(--muted); flex: none; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }
/* כפתורים: מלא (ראשי) וגבול דק (משני). לחיצה מכווצת מעט; ריחוף רק בעכבר */
.btn { border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font-weight: 600; background: var(--accent); color: var(--onAccent); min-height: 44px;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn:disabled:active { transform: none; }
.btn.ghost { background: var(--surface); color: var(--ink2); border: 1px solid var(--line); font-weight: 600; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.row-item, .name-chip { transition: background-color 150ms ease, color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(.ghost):not(:disabled):hover { background: var(--accentHi); }
  .btn.ghost:not(:disabled):hover { border-color: var(--ink3); color: var(--ink); }
  a.row-item:hover, .name-chip:hover { background: var(--hover); }
}
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
/* שם תלמיד ברשימות ובטבלאות: מתכווץ לפי האורך עד 14px ויורד שורה, לא נחתך (_macros.sname) */
.sname { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.sname.nm-m { font-size: 15px; }
.sname.nm-l { font-size: 14px; }

.stage { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px 2px 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.stage .pie { width: 14px; height: 14px; }
.pick-sym { display: inline-flex; }
.s0 { color: var(--st0); background: var(--st0-bg); }
.s1 { color: var(--st1); background: var(--st1-bg); }
.s2 { color: var(--st2); background: var(--st2-bg); }
.s3 { color: var(--st3); background: var(--st3-bg); }
.support { font-size: 13px; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.bars { display: inline-flex; gap: 2px; direction: ltr; }
.bars i { width: 4px; height: 11px; border-radius: 1px; background: var(--line); display: block; }
.bars i.on { background: var(--muted); }
.noev { font-size: 13px; color: var(--muted); }

.approve { padding: 12px 14px; display: grid; gap: 8px; }
.approve + .approve { border-top: 1px solid var(--line); }
.approve .title { font-weight: 700; }
.approve .meta { font-size: 13px; color: var(--muted); }
.approve .change { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.arrow { color: var(--muted); }
.drop { color: var(--warn); font-weight: 700; font-size: 13px; }
/* IMPORT-FLAG-CARD: תווית שקטה, לא אזהרה */
.flag-note { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-inline-end: 6px; }
.bulk { padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bulk form { margin: 0; }

.skill { padding: 12px 14px; }
.skill + .skill { border-top: 1px solid var(--line); }
.skill summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; list-style: none; }
.skill summary::-webkit-details-marker { display: none; }
.skill .nm { font-weight: 700; min-width: 0; }
.skill .off { font-size: 12px; color: var(--muted); font-weight: 600; }
.skill .chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline { list-style: none; margin: 10px 0 0; padding: 0 12px 0 0; border-right: 2px solid var(--line); display: grid; gap: 10px; }
.timeline li { font-size: 14px; }
.timeline .when { color: var(--muted); font-size: 13px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); }
.tag.proposed { background: var(--gold-soft); }
.tag.approved { color: var(--st3); border-color: var(--st3); }
.tag.rejected { color: var(--muted); text-decoration: line-through; }
.chapter { font-size: 15px; font-weight: 700; margin: 12px 0 6px; color: var(--muted); }
/* לשוניות תחום בכרטיס התלמיד */
.domain-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.domain-tabs a { color: var(--ink); text-decoration: none; padding: 7px 14px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; }
.domain-tabs a[aria-current="page"] { background: var(--accentSoft); border-color: var(--accent); color: var(--accent); }
.domain-tabs .n { font-size: 13px; font-weight: 500; opacity: .8; }
.tabs-key { font-size: 13px; margin-top: 0; }

.goal, .strength { padding: 12px 14px; }
.goal + .goal, .strength + .strength { border-top: 1px solid var(--line); }
.why { font-size: 14px; color: var(--muted); }

form.obs { padding: 14px; display: grid; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend, .label-sm { font-size: 13px; color: var(--muted); font-weight: 600; padding: 0; margin-bottom: 4px; }
.picks { display: flex; gap: 6px; flex-wrap: wrap; }
.pick { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; min-height: 36px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pick input { accent-color: var(--board); }
select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; background: var(--paper); color: var(--ink); }
textarea { min-height: 64px; resize: vertical; }

/* כניסה ויציאה */
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.logout { display: inline; margin-inline-start: 12px; }
.btn-link { background: none; border: 0; padding: 4px 6px; text-decoration: underline; font-size: 14px; }

.ext { padding: 10px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ext + .ext { border-top: 1px solid var(--line); }
.ext form, .ext-add { margin: 0; }
.ext-add { padding: 10px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); }
.reject-why summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.reject-why form { display: grid; gap: 8px; margin-top: 8px; }

/* התאמה לגודל מסך (UI-3). טלפון: עמודה אחת, בסדר של ה-HTML. מחשב: רחב יותר, ובדפים מפוצלים
   שתי עמודות: התוכן העיקרי מימין, הפעולות והרשימות הקצרות משמאל. */
.col-main, .col-side { display: contents; }
@media (min-width: 700px) {
  .roster { background: none; border: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .roster .row-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
  .roster .row-item + .row-item { border-top: 1px solid var(--line); }
}
@media (min-width: 1000px) {
  .app { max-width: 1240px; }
  .wrap { padding-left: 28px; padding-right: 28px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "main side"; align-items: start; column-gap: 28px; }
  .split .col-main, .split .col-side { display: grid; gap: 22px; align-content: start; min-width: 0; }
  .split .col-main { grid-area: main; }
  .split .col-side { grid-area: side; }
}

/* מפת המיומנויות וכרטיס המיומנות (SKILLS-1b) */
@media (min-width: 1000px) { .wide { max-width: none; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tabs a { color: var(--ink2); text-decoration: none; padding: 6px 14px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; }
.tabs a[aria-current="page"] { background: var(--accentSoft); border-color: var(--accent); color: var(--accent); }
.top-links { margin-top: 10px; font-size: 15px; }
.framework { color: var(--muted); margin: 0; font-size: 15px; }
.pie { width: 15px; height: 15px; flex: none; vertical-align: -2px; }
.navp { padding: 12px 14px; display: grid; gap: 8px; }
.nav-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.nav-lbl { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 110px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg a, .seg .off { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; text-decoration: none; min-height: 34px; }
.seg a[aria-current="true"] { background: var(--accentSoft); border-color: var(--accent); color: var(--accent); }
.seg .off { opacity: .5; }
.nav-note { margin: 0; font-size: 13px; color: var(--muted); }
.scroller { overflow-x: auto; }
table.map { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 820px; font-size: 14px; }
table.map th, table.map td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 10px 12px; vertical-align: top; text-align: right; }
table.map thead th { background: var(--paper); position: sticky; top: 0; z-index: 1; }
table.map th.g { text-align: center; font-size: 17px; }
table.map th.strand { position: sticky; right: 0; background: var(--card); z-index: 2; min-width: 160px; width: 180px; }
table.map thead th.strand { z-index: 3; background: var(--paper); }
.strand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
td.cell.empty { color: var(--muted); text-align: center; }
.cell-skills { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.skill-chip { display: flex; flex-direction: column; gap: 3px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--gold); background: var(--gold-soft); text-decoration: none; font-size: 13px; }
.skill-chip.cont { border-style: dashed; background: transparent; }
.skill-chip .bn { font-weight: 600; }
.skill-chip .bsub { font-size: 12px; color: var(--muted); }
.note-row td { font-size: 13px; color: var(--muted); background: var(--paper); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.code { font-size: 13px; background: var(--paper); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; direction: ltr; unicode-bidi: isolate; }
.pad { padding: 12px 14px; }
.pad p { margin: 0; }
.pad p + p { margin-top: 6px; }
.pad h2 { margin: 0 0 6px; font-size: 17px; }
ol.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stage-row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.stage-row .sym { color: var(--ink); }
.stage-row .pie { width: 20px; height: 20px; }
.stage-row b { display: block; font-size: 14px; }
.stage-row.here { border-color: var(--board); box-shadow: inset -4px 0 0 var(--board); }
.flag { display: inline-block; margin-inline-start: 8px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); border: 1px solid var(--gold); }
.ctx-note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.check { border-color: var(--gold); background: var(--gold-soft); }
.check .read { font-size: 14px; }
.sup { border-color: var(--board); }
.tasks { display: grid; gap: 6px; }
details.task { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
details.task[open] { border-color: var(--gold); }
details.task summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 600; font-size: 15px; }
details.task p { padding: 0 12px 12px; margin: 0; }
.folds { display: grid; border-top: 1px solid var(--line); }
details.fold { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.fold summary { cursor: pointer; padding: 8px 2px; font-weight: 700; color: var(--muted); font-size: 15px; }
details.fold h3 { font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.cnt { font-size: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
ul.res { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
ul.res li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
ul.res li.start { border-color: var(--board); box-shadow: inset -3px 0 0 var(--board); }
.start-tag { font-size: 12px; font-weight: 700; color: var(--board); }
.rmeta, .rwhere { font-size: 13px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a { font-size: 14px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-decoration: none; }
ul.plain { margin: 0 0 8px; padding-inline-start: 18px; }
.muted { color: var(--muted); font-size: 14px; }
.skill-link { font-size: 14px; margin: 8px 0 0; }
@media print { .navp, .board .row, .tabs { display: none; } details.task, details.fold { display: block; } }
/* רשת main: בלי min-width:0 הטבלה הרחבה מותחת את כל הדף במקום לגלול בתוך .scroller */
main.wide { grid-template-columns: minmax(0, 1fr); }

/* IMPORT-2b: מסכי הקליטה */
.name-chip.on { background: var(--gold-soft); font-weight: 700; }
.class-pick { margin-bottom: 12px; }
.run-row.cancelled .title a { color: var(--muted); }
.identity select { min-height: 36px; font: inherit; max-width: 100%; }
/* LIB-1: חומרים תואמים וספרייה */
.mats { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.mats li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; justify-items: start; }
.mat-body { white-space: pre-wrap; font-size: 15px; }
/* GROUPS-1a: מטריצת כיתה (צוות בלבד) */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.matrix { border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; }
.matrix thead th { vertical-align: bottom; padding: 6px 4px; max-width: 110px; min-width: 64px; font-weight: 600; font-size: 12px; line-height: 1.3; }
.matrix thead th a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.matrix .who { text-align: start; padding: 6px 10px; min-width: 10em; max-width: 14em; position: sticky; inset-inline-start: 0; background: var(--card); }
.matrix .who a { color: var(--ink); text-decoration: none; }
.matrix .cell { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 36px; padding: 4px; color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .matrix .cell:hover { background: var(--hover); } }
.legend { font-size: 13px; margin-top: 8px; }
.matrix .stage { padding: 2px 4px; }
/* GROUPS-1b: בחירה במטריצה, טופס ודף קבוצה */
.matrix .pick-skill { display: block; margin-top: 4px; }
.matrix .pick-student input, .matrix .pick-skill input { width: 18px; height: 18px; vertical-align: middle; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; margin: 6px 0 12px; }
.pick-list label { display: flex; gap: 6px; align-items: center; }
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 4px; font-weight: 600; }
.form-grid input[type=text], .form-grid input[type=date], .form-grid input[type=number], .form-grid select, .form-grid textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.inline { display: inline; }
.warn-note { color: var(--warn); font-weight: 600; }
.pre { white-space: pre-wrap; }
.form-grid .pick-list label { display: flex; font-weight: 400; }

/* PARENT-1: דף ההורים. טלפון קודם: עמודה אחת צרה, טקסט 17px, כפתור "איך לעזור" גדול ללחיצה.
   חם ופשוט: בלי שלבים, צבעי שלב או מספרים. אותה ערכה (משתנים) כמו מסכי הצוות. */
body.pv { background: var(--bg); }
.pv-preview { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.4; padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pv-preview a { color: inherit; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.pv-app { max-width: 560px; margin: 0 auto; padding-block: 0 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pv-top { padding: 18px 0 4px; }
.pv-school { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.pv-leaf { width: 22px; height: 22px; }
.pv-main { display: grid; gap: 18px; }
.pv-hero { padding: 6px 0 2px; }
.pv-hero h1 { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.15; margin: 0; text-wrap: balance; }
.pv-meta { color: var(--ink2); font-size: 15px; margin: 6px 0 0; }
.pv-lead { font-size: 17px; line-height: 1.65; margin: 12px 0 0; color: var(--ink); text-wrap: pretty; }
.pv-jump { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; margin-block: -8px; }
.pv-jump a { text-decoration: none; padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; }
.pv-domain { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 16px 16px; scroll-margin-top: 64px; }
.pv-domain h2 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.pv-sub { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--accent); margin: 14px 0 8px; }
.pv-sub-win { color: var(--goldStrong); }
.pv-ic { width: 20px; height: 20px; flex: none; }
.pv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pv-item { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); padding: 14px; }
.pv-goal { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.55; text-wrap: pretty; }
.pv-orig { margin: 4px 0 0; font-size: 15px; color: var(--ink2); text-align: end; }
.pv-orig-inline { color: var(--ink2); font-size: 15px; unicode-bidi: isolate; }
.pv-help { margin-top: 12px; }
.pv-help summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px;
  padding: 10px 16px; border-radius: 12px; background: var(--accentSoft); color: var(--accent); font-weight: 700; font-size: 16px;
  transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.pv-help summary::-webkit-details-marker { display: none; }
.pv-help summary:active { transform: scale(.98); }
.pv-chev { width: 20px; height: 20px; transition: transform 200ms var(--ease-out); }
.pv-help[open] summary { border-end-start-radius: 0; border-end-end-radius: 0; }
.pv-help[open] .pv-chev { transform: rotate(180deg); }
.pv-help-body { border: 1px solid var(--accentSoft); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface); padding: 14px 14px 16px; display: grid; gap: 14px; }
.pv-acts { list-style: none; counter-reset: act; margin: 0; padding: 0; display: grid; gap: 14px; }
.pv-acts li { counter-increment: act; display: grid; gap: 4px; padding-inline-start: 40px; position: relative; font-size: 16px; line-height: 1.6; }
.pv-acts li::before { content: counter(act); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent); color: var(--onAccent); font-weight: 700; font-size: 15px; display: grid; place-items: center; }
.pv-act-t { font-size: 16px; }
.pv-ex { display: block; background: var(--raised); border-inline-start: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; color: var(--ink2); font-size: 15px; }
.pv-tip { margin: 0; display: flex; gap: 10px; align-items: flex-start; background: var(--goldSoft); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.6; }
.pv-tip .pv-ic { color: var(--goldStrong); margin-top: 2px; }
.pv-wins { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pv-wins li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.55; padding: 10px 12px; border-radius: 12px; background: var(--goldSoft); }
.pv-check { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 1px; }
.pv-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; padding: 20px 18px; font-size: 16px; }
.pv-empty p { margin: 0; }
.pv-empty p + p { margin-top: 6px; color: var(--ink2); }
.pv-foot { margin-top: 28px; color: var(--ink3); font-size: 14px; text-align: center; }
.pv-foot p { margin: 2px 0; }
@media (hover: hover) and (pointer: fine) {
  .pv-help summary:hover { background: color-mix(in srgb, var(--accentSoft) 70%, var(--accent) 12%); }
  .pv-jump a:hover { border-color: var(--ink3); }
}
@media (prefers-reduced-motion: reduce) { .pv-help summary:active { transform: none; } .pv-chev { transition: none; } }
@media print { .pv-preview, .pv-jump { display: none; } .pv-domain { box-shadow: none; break-inside: avoid; } }
/* PARENT-1b: הורים וקודי כניסה (מסך צוות) */
.parent-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.parent-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.parent-row.blocked { opacity: .75; }
.parent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.parent-actions form { margin: 0; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.row-form input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.link-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.small { font-size: 14px; }
/* PARENT-1b שלב 2ב: כניסת הורים, מסך משפחה, יציאה */
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pv-out button { font: inherit; font-size: 15px; color: var(--ink2); background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; min-height: 44px; cursor: pointer; }
.pv-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent); font-weight: 700; text-decoration: none; justify-self: start; }
.pv-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 16px; display: grid; gap: 12px; }
.pv-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; border: 0; background: var(--accent); color: var(--onAccent);
  font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; padding: 0 18px; }
.pv-btn:active { transform: scale(.98); }
.pv-note { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.55; }
.pv-label { font-weight: 700; font-size: 16px; }
.pv-code { font: inherit; font-size: 22px; letter-spacing: .08em; text-align: center; font-variant-numeric: tabular-nums; min-height: 56px; width: 100%;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--ink); padding: 0 12px; box-sizing: border-box; }
.pv-code:focus { outline: 3px solid var(--accentSoft); border-color: var(--accent); }
.pv-code[aria-invalid="true"] { border-color: var(--warn); }
.pv-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: var(--ink); font-size: 16px; line-height: 1.5; }
.pv-kids { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pv-kids a { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; min-height: 64px; }
.pv-kid-name { font-family: var(--display); font-size: 24px; font-weight: 700; }
.pv-kid-class { color: var(--ink2); font-size: 15px; grid-row: 2; }
.pv-kid-go { grid-row: 1 / span 2; grid-column: 2; color: var(--accent); width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .pv-btn:active { transform: none; } }
@media print { .pv-out, .pv-back { display: none; } }
/* PARENT-1b שלב 2ג: הורים באתר (סיכום לרכזת) */
table.summary-table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
table.summary-table th, table.summary-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
table.summary-table thead th { font-size: 13px; color: var(--ink2); font-weight: 600; }
table.summary-table tbody tr:last-child th, table.summary-table tbody tr:last-child td { border-bottom: 0; }
