@font-face {
  font-family: Assistant;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/assistant-300.woff2") format("woff2");
}
@font-face {
  font-family: Assistant;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/assistant-400.woff2") format("woff2");
}
@font-face {
  font-family: Assistant;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/assistant-500.woff2") format("woff2");
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/rubik-hebrew-400.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/rubik-hebrew-600.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/rubik-hebrew-700.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/rubik-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/rubik-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: Rubik;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/rubik-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --bg: #F7F2EB;
  --mist: #EEF3EF;
  --paper: #FFFCFA;
  --ink: #3D3A36;
  --muted: #7E7972;
  --line: #E8E0D6;
  --teal: #5F7D6B;
  --teal-dark: #4A6356;
  --primary-soft: #E7EEE9;
  --primary-mid: #C5D4CB;
  --coral: #C48976;
  --peach: #E8B7A6;
  --peach-soft: #F8E9E3;
  --sand: #A6845A;
  --sand-soft: #F4EDE3;
  --ok: #5A7A64;
  --ok-bg: #E9F1EC;
  --amber: #A6845A;
  --amber-bg: #F4EDE3;
  --danger: #9b2330;
  --danger-bg: #fde8e6;
  --focus: #6A8494;
  --class-dalet: #7A9A86;
  --class-heh: #D4A494;
  color-scheme: light;
  font-family: Assistant, "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  font-weight: 400;
}
.skip {
  position: absolute; right: 12px; top: -48px; background: white; padding: 8px 12px; border-radius: 12px;
}
.skip:focus { top: 10px; z-index: 5; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--primary-soft);
  color: var(--ink);
  padding: 12px 18px 10px;
}
.top-side { display: flex; align-items: center; gap: 14px; }
#top-actions { display: inline-flex; align-items: center; gap: 12px; }
#top-actions > * + * {
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--primary-mid);
}
.brand {
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}
.brand img {
  display: block;
  height: 84px;
  width: auto;
  max-width: min(58vw, 150px);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.admin-link, a.text-btn, button.text-btn {
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  width: auto;
  min-height: 40px;
  padding: 6px 0;
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 4px; }
.stat strong { font-size: 1.4rem; }
.admin-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th, .admin-table td {
  text-align: right;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th { font-size: .95rem; }
main { max-width: 960px; margin: 0 auto; padding: 18px 16px 64px; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
h3 { margin: 0; }
p { margin: 0 0 10px; }
a { color: #0f5f8a; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; }
.stack[hidden], .new-child[hidden] { display: none; }
.card {
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 28px;
  padding: 22px 20px;
  box-shadow: 0 8px 28px rgba(61, 58, 54, .06);
}
.card.compact { padding: 16px 18px; }
.card.compact h2 { font-size: 1.15rem; }
.hero { background: linear-gradient(180deg, #fff, #fffaf0); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: grid; gap: 6px; font-weight: 650; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: var(--paper);
  min-height: 52px;
}
textarea { min-height: 96px; resize: vertical; }
button, .btn {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--teal);
  color: white;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
button.secondary, a.btn.secondary {
  background: var(--paper);
  color: var(--teal-dark);
  border: 1.5px solid var(--primary-mid);
  box-shadow: none;
}
button.coral { background: var(--teal); }
a.quiet {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  box-shadow: none;
}
button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.alert { background: var(--danger-bg); color: var(--danger); border-radius: 16px; padding: 12px 14px; font-weight: 650; }
.ok { color: var(--ok); font-weight: 700; }
.math, .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.math {
  display: inline-block;
  background: #fff7df;
  border-radius: 10px;
  padding: 0 6px;
  font-weight: 700;
}
.diagram {
  width: 100%;
  height: auto;
  background: white;
  border-radius: 18px;
  border: 2px solid #f3e4cc;
  padding: 8px;
}
.q-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.points {
  color: var(--teal-dark);
  font-weight: 700;
  background: #e5f7f4;
  border-radius: 999px;
  padding: 2px 10px;
}
.photo-preview { max-width: 100%; border-radius: 16px; }
.grade-grid { display: grid; gap: 10px; }
.side { background: #fff8ee; border-radius: 18px; padding: 12px; }
.side h3 { margin: 0 0 6px; font-size: 1rem; }
.grade-grid .side:first-child { background: #eef8ff; }
fieldset.choices {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
legend { font-weight: 700; padding: 0; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 16px;
  padding: 10px 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 700;
}
.choice input { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: currentColor; }
.choice-full { background: var(--ok-bg); color: var(--ok); }
.choice-half { background: var(--amber-bg); color: var(--amber); }
.choice-zero { background: var(--danger-bg); color: var(--danger); }
.choice-option { background: #fff; border-color: var(--line); font-weight: 500; justify-content: flex-start; }
.choice:has(input:checked) { border-color: currentColor; box-shadow: 0 6px 0 rgba(27, 36, 48, .08); }
.invite { direction: ltr; text-align: left; }
.level, .diff {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .9rem;
  font-weight: 700;
}
.level, .diff-medium { background: #fff1c9; color: #7a4b00; }
.diff-easy { background: #e5f7ee; color: #0b6b3a; }
.diff-hard { background: #fde8e6; color: #9b2330; }
.diff-mixed { background: #ffe4d4; color: #8a3410; }
.exam-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.exam-title-row h1, .exam-title-row h2, .exam-title-row h3, .exam-title-row p, .exam-title-row strong { margin: 0; }
.new-child { display: grid; gap: 12px; }
.new-child[hidden] { display: none; }
.banner {
  border-radius: 18px;
  padding: 12px 14px;
  font-weight: 700;
}
.banner-draft { background: #eef6ff; color: #164e78; }
.banner-submitted { background: #fff4d8; color: #7a4b00; }
.banner-finalized { background: var(--ok-bg); color: var(--ok); }
.score-banner {
  background: linear-gradient(120deg, #fff6cc, #d9fbe8);
  border-radius: 22px;
  padding: 16px;
  font-size: 1.35rem;
  text-align: center;
}
.correct-chip {
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: 14px;
  padding: 8px 12px;
}
.solution-panel {
  background: #fff7df;
  border: 2px dashed #e6c56a;
  border-radius: 16px;
  padding: 12px 14px;
}
.solution-panel[hidden] { display: none; }
.howto summary {
  cursor: pointer;
  font-size: 1.15rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.howto-steps { margin: 12px 0; padding-inline-start: 1.4rem; }
.howto-steps li { margin: 0 0 10px; }
.howto-tip {
  background: #fff7df;
  border-radius: 16px;
  padding: 10px 12px;
  margin: 0;
}
.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  background: #eef6ff;
  color: #164e78;
}
.subnav { display: flex; gap: 8px; flex-wrap: wrap; }
.subnav a { text-decoration: none; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.subnav .on { background: var(--teal); color: white; }
.class-grid { display: grid; gap: 12px; }
.class-card {
  display: grid;
  gap: 4px;
  text-align: center;
  color: white;
  min-height: 112px;
  border-radius: 32px;
  background: var(--class-dalet);
  box-shadow: none;
  width: 100%;
}
.class-card.class-heh { background: var(--class-heh); }
.class-card.class-other { background: var(--teal); }
.class-card span { font-weight: 300; }
.chip { background: white; color: var(--ink); border: 1px solid var(--line); }
.chip.on { background: var(--teal); color: white; }
.child-row { width: 100%; text-align: right; }
.passage { white-space: pre-line; overflow-wrap: anywhere; }
@media (min-width: 800px) {
  .grade-grid { grid-template-columns: 1fr 1fr; }
  .split-2, .new-child { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .new-child[hidden] { display: none; }
  main { padding-top: 28px; }
  .brand img { height: 104px; max-width: 180px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .35s ease both; }
  button, .btn { transition: transform .15s ease; }
  button:hover, .btn:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .card, button, .btn { animation: none; transition: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
h1, h2, h3, strong, button, .btn { font-weight: 500; }
.greeting { color: var(--muted); font-weight: 300; margin: 0; }
.tabs {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  background: var(--primary-soft);
  padding: 0 12px 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tabs[hidden] { display: none; }
.tabs a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 400;
  padding: 12px 4px 10px;
  border-bottom: 2px solid transparent;
  min-height: 44px;
}
.tabs a.on { color: var(--teal-dark); border-bottom-color: var(--teal); font-weight: 500; }
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-size: .8rem;
}
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: center; }
.step-no {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex: none;
}
.eyebrow { color: var(--sand); font-weight: 400; margin: 0; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--peach-soft);
  color: var(--coral);
  font-size: .95rem;
}
.pill.sage { background: var(--ok-bg); color: var(--ok); }
.center { text-align: center; }
.check { color: var(--ok); }
.note {
  background: var(--sand-soft);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--ink);
}
.person {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: right;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  border-radius: 28px;
  box-shadow: 0 8px 28px rgba(61, 58, 54, .06);
}
.person strong,
.card h1,
.card h2,
.card h3,
.card strong {
  color: var(--ink);
  font-weight: 500;
}
.person .muted,
.card .muted {
  color: var(--muted);
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex: none;
}
.person-main { flex: 1; display: grid; gap: 2px; }
button.admin-card, button.grade-stat {
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  display: grid;
  justify-items: stretch;
  text-align: right;
  font-weight: 400;
  gap: 8px;
}
button.grade-stat.peach { box-shadow: inset 0 0 0 2px var(--peach); }
button.grade-stat:not(.peach) { box-shadow: inset 0 0 0 2px var(--class-dalet); }
.stat-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-pill, .stat-pill.peach {
  background: var(--primary-soft);
  color: var(--ink);
  border-radius: 16px;
  padding: 8px 4px;
  text-align: center;
}
.stat-pill.peach { background: var(--peach-soft); }
.stat-pill span, .stat-pill strong { display: block; }
.stat-pill strong { font-size: 1.25rem; }
.big-score { font-size: 3rem; font-weight: 500; margin: 0; color: var(--teal-dark); }
.score-bar { height: 8px; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--teal); }
.score-bar.low span { background: var(--coral); }
.who-name { font-size: 1.25rem; }
.who-email { display: block; text-align: left; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check-row input { width: 1.35rem; height: 1.35rem; min-height: 0; margin-top: 3px; flex: none; accent-color: var(--teal); }
.admin-tabs { position: static; background: transparent; margin-bottom: 4px; }
.chip-peach, .chip-sage, .chip-sand {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
  background: var(--peach-soft);
  color: var(--coral);
}
.chip-sage { background: var(--ok-bg); color: var(--ok); }
.chip-sand { background: var(--sand-soft); color: var(--sand); }
.file-field { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 400; }
.file-btn {
  border: 1.5px solid var(--primary-mid);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--teal-dark);
  background: var(--paper);
}
.file-field input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.file-name { color: var(--muted); font-weight: 300; }
details.more { color: var(--muted); }
details.more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.back { color: var(--teal-dark); text-decoration: none; font-weight: 400; }
@media (min-width: 800px) {
  .class-grid { grid-template-columns: 1fr 1fr; }
  main { max-width: 720px; }
}
