/* Self-hosted Hebrew font: keeps the UI consistent on Windows, macOS, Linux, and mobile. */
@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/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-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #172033;
  --muted: #6f7a8f;
  --line: #e3e7ef;
  --paper: #f7f8fb;
  --surface: #ffffff;
  --navy: #101a2b;
  --blue: #315efb;
  --blue-soft: #edf1ff;
  --mint: #dff6eb;
  --mint-ink: #0e7550;
  --orange: #f5a33b;
  --shadow: 0 18px 55px rgba(31, 45, 74, .08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: "Noto Sans Hebrew", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; overflow-anchor: none; }
body { margin: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(49, 94, 251, .25); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; max-width: 1440px; padding: 0 44px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 12px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.topbar-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 99px; background: #45ba87; box-shadow: 0 0 0 4px #e4f6ee; }
.account-control { position: relative; display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-control [hidden] { display: none !important; }
.account-control [data-state="error"] { color: #a12331; }
.account-control [data-state="ok"] { color: var(--mint-ink); }
.account-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 86px; max-width: 210px; min-height: 44px; padding: 5px 12px; border: 1px solid #d8e0e9; border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; touch-action: manipulation; transition: border-color .16s, box-shadow .16s, background .16s; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { border-color: #a6c2dd; background: #f8fbff; box-shadow: 0 3px 12px #193b6312; }
.account-trigger:focus-visible, .account-popover button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.account-trigger-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-chevron { flex: 0 0 15px; width: 15px; height: 15px; color: var(--muted); transition: transform .16s; }
.account-trigger[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-trigger[data-signed-in="true"] { justify-content: flex-start; background: #f8fbff; }
.account-photo { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.account-avatar { flex: 0 0 28px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 750; line-height: 1; text-transform: uppercase; }
.account-popover { position: absolute; z-index: 90; inset-block-start: calc(100% + 9px); inset-inline-end: 0; width: min(324px, calc(100vw - 32px)); padding: 22px; display: flex; flex-direction: column; gap: 8px; border: 1px solid #dce5ee; border-radius: 16px; background: var(--surface); box-shadow: 0 18px 48px #132b4929, 0 2px 8px #132b490e; text-align: start; }
.account-popover-eyebrow { width: fit-content; padding: 4px 9px; border-radius: 99px; color: #22638a; background: #ebf5fa; font-size: 10px; font-weight: 800; }
.account-popover-title { margin-top: 4px; color: var(--ink); font-size: 18px; line-height: 1.35; letter-spacing: -.02em; }
.account-popover-description { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.account-popover[data-signed-in="true"] .account-popover-description { display: none; }
.account-name { margin-top: 6px; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.account-profile { display: block; direction: ltr; text-align: start; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.account-popover #account-status { display: block; margin: 3px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-popover #account-status[data-state="error"] { color: #a12331; }
.account-popover button { min-height: 46px; padding: 10px 13px; border: 1px solid #dce3ea; border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; touch-action: manipulation; text-align: center; }
.account-popover .account-google-button { display: flex; align-items: center; justify-content: center; gap: 12px; border-color: #d6dce3; background: #fff; box-shadow: 0 1px 2px #122c4510; }
.account-google-personalized { display: flex; justify-content: center; min-height: 44px; width: 100%; }
.account-google-button img { width: 19px; height: 19px; }
.account-popover .account-logout-button { min-height: 38px; border-color: transparent; color: var(--muted); font-weight: 600; }
.account-popover .account-google-button:hover { background: #f7faff; border-color: #aac5dd; }
.account-popover .account-logout-button:hover { background: #f3f6f9; }
.account-popover button:disabled { opacity: .55; cursor: wait; }

main { max-width: 1440px; padding: 0 44px 34px; margin: 0 auto; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 23px 0 20px; border-bottom: 1px solid var(--line); }
.page-intro-copy { min-width: 0; }
.page-intro h1 { margin: 0; color: var(--ink); font-size: clamp(27px, 3vw, 36px); line-height: 1.08; letter-spacing: -.055em; }
.page-intro-copy p:not(.eyebrow) { max-width: 700px; color: var(--muted); line-height: 1.65; font-size: 12px; margin: 9px 0 0; }
.page-intro-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.page-intro-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.page-intro .button-quiet { color: var(--ink); background: #f4f6f9; }
.page-intro .button-quiet:hover { background: #e9edf4; }
.resume-dock[hidden] { display: none; }
.resume-dock { display: flex; justify-content: flex-start; margin: 14px 0 -5px; }
.resume-question { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(100%, 330px); min-height: 68px; padding: 11px 14px; text-align: right; border: 1px solid #cbd7fa; border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 24px rgba(25, 47, 99, .11); }
.resume-question:hover { border-color: var(--blue); box-shadow: 0 13px 26px rgba(25, 47, 99, .16); }
.resume-question-copy { display: grid; gap: 5px; min-width: 0; }
.resume-question-copy small { color: var(--blue); font-size: 10px; font-weight: 800; }
.resume-question-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.resume-question-arrow { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 19px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 10px; margin: 0 0 12px; color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; min-height: 42px; padding: 0 16px; font-weight: 750; font-size: 12px; line-height: 1.2; text-align: center; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(49, 94, 251, .22); }
.button-primary:hover { background: #244fe8; }
.button-quiet { background: rgba(255,255,255,.10); color: #dae1ee; }
.button-quiet:hover { background: rgba(255,255,255,.16); }
.button-secondary { color: var(--blue); background: var(--blue-soft); }
.button-secondary:hover { background: #dfe6ff; }

.stats-strip { display: grid; grid-template-columns: 1fr 1fr 1fr 2.2fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 18px 0 28px; border-radius: 15px; overflow: hidden; }
.stat { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 20px; background: var(--surface); }
.stat strong { font-size: 24px; letter-spacing: -.05em; line-height: 1; }
.stat > span, .stat-progress-label span { font-size: 11px; color: var(--muted); }
.stat > small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.stat-progress { gap: 10px; }
.stat-progress-label { display: flex; align-items: baseline; justify-content: space-between; }
.stat-progress-label strong { color: var(--blue); }
.progress-track { height: 7px; width: 100%; border-radius: 99px; background: #e9edf4; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #6c8aff); border-radius: inherit; transition: width .3s ease; }

.official-exams { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: -8px 0 26px; padding: 18px 22px; border: 1px solid #cddcf5; border-radius: 16px; background: #f4f8ff; }
.official-exams .eyebrow { margin-bottom: 5px; }
.official-exams h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.official-exams p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.official-exams-list { display: grid; gap: 12px; flex: 0 0 auto; }
.official-exam-label { display: block; margin-bottom: 7px; font-size: 13px; }
.official-exam-links { display: flex; flex-wrap: wrap; gap: 8px; }
.official-exam-links a { min-height: 34px; padding: 0 12px; text-decoration: none; }

.workspace { display: grid; grid-template-columns: 305px minmax(0, 1fr); gap: 30px; align-items: start; }
.filters { min-height: 0; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 22px 6px 22px 0; position: sticky; top: 12px; }
.filters { -ms-overflow-style: none; scrollbar-width: none; }
.filters::-webkit-scrollbar { width: 0; height: 0; }
.filters-heading, .content-heading, .label-row, .solution-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.filters h2, .content-heading h2 { margin: 0; letter-spacing: -.045em; font-size: 25px; line-height: 1.05; }
.filters .eyebrow, .content-heading .eyebrow { margin-bottom: 9px; }
.filter-reset { border: 0; background: transparent; color: var(--blue); font-weight: 750; font-size: 11px; padding: 3px 0; }
.search-wrap { display: block; position: relative; margin: 24px 0 22px; }
.search-icon { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 22px; line-height: 1; }
.search-wrap input { width: 100%; height: 42px; padding: 0 37px 0 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; outline: 0; font-size: 12px; }
.search-wrap input::placeholder { color: #9aa4b4; }
.filter-group { margin: 17px 0; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.filter-row > div { min-width: 0; }
.filter-group > label, .filter-row label, .label-row label { display: block; color: var(--ink); font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.filter-group select, #exam-mode-select { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding-inline: 11px; color: var(--ink); background: var(--surface); font: inherit; font-size: 14px; font-weight: 500; }
.solution-visibility-toggle { display: inline-flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; margin: 8px 0 3px; padding: 5px 7px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.solution-visibility-toggle:hover { border-color: var(--line); background: var(--surface); }
.solution-visibility-toggle:focus-within { border-color: var(--blue); outline: 2px solid rgba(70, 100, 230, .14); outline-offset: 1px; }
.solution-visibility-toggle input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.solution-visibility-toggle strong { display: block; font-size: 10px; font-weight: 700; line-height: 1.35; }
.label-row { align-items: baseline; }
.label-row label { margin-bottom: 0; }
.label-row span { color: var(--muted); font-size: 10px; }
.unit-group { margin-top: 24px; }
.unit-filters { display: grid; gap: 6px; padding: 3px 0; margin-top: 10px; }
.unit-filter { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #617087; text-align: right; padding: 9px 9px 9px 7px; font-size: 11px; line-height: 1.25; transition: .18s ease; }
.unit-filter:hover { background: #f2f5fa; color: var(--ink); }
.unit-filter.is-active { background: var(--navy); color: #fff; box-shadow: 0 8px 18px rgba(16, 26, 43, .14); }
.unit-filter small { color: #97a2b3; font-size: 10px; font-weight: 800; }
.unit-filter.is-active small { color: #b9c7ff; }
.unit-number { direction: ltr; font-size: 10px; font-weight: 850; opacity: .72; }
.unit-name { min-width: 0; }
.topics-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.topics-details summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 800; list-style: none; }
.topics-details summary::-webkit-details-marker { display: none; }
.topics-details summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--blue); }
.topics-details[open] summary::before { content: '−'; }
.topics-details .topic-filters { margin-top: 13px; }
.topic-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.topic-filter { border: 1px solid var(--line); border-radius: 99px; background: var(--surface); padding: 7px 9px; color: #667286; font-size: 10px; line-height: 1; transition: .18s ease; }
.topic-filter:hover { border-color: #aebcff; color: var(--blue); }
.topic-filter.is-active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.filter-tip { display: flex; align-items: flex-start; gap: 9px; padding-top: 21px; margin-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.filter-tip span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; flex: 0 0 auto; font-size: 12px; }
.filter-tip p { font-size: 10px; line-height: 1.5; margin: 2px 0 0; }

.question-area { min-width: 0; }
.question-area .content-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 22px 0 17px; border-bottom: 1px solid var(--line); }
.result-summary { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.view-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding-top: 18px; }
.question-card { min-width: 0; display: flex; flex-direction: column; min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 19px; background: var(--surface); box-shadow: 0 3px 14px rgba(31,45,74, .025); transition: border .18s ease, box-shadow .18s ease, transform .18s ease; }
.question-card:hover { border-color: #bdcaff; box-shadow: var(--shadow); transform: translateY(-2px); }
.question-card.is-complete { border-color: #b7e9d2; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-badges { min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.card-difficulty-badge { display: inline-flex; align-items: center; min-height: 23px; border-radius: 99px; padding: 0 8px; color: #566276; background: #f1f3f7; font-size: 9px; font-weight: 850; white-space: nowrap; }
.card-difficulty-badge.is-loading { color: #8994a7; background: #f5f6f8; }
.card-difficulty-badge.is-unrated { color: #7d8798; background: #f1f3f7; }
.card-difficulty-badge.is-easy { color: var(--mint-ink); background: var(--mint); }
.card-difficulty-badge.is-light { color: #315eaa; background: #eaf1ff; }
.card-difficulty-badge.is-medium { color: #8a6419; background: #fff3d8; }
.card-difficulty-badge.is-challenging { color: #a85e12; background: #ffead0; }
.card-difficulty-badge.is-hard { color: #a13c4c; background: #ffe4e8; }
.exam-label { color: var(--muted); font-size: 10px; line-height: 1.4; }
.type-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 99px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.split-badge { color: #7a4b00; background: #fff0c7; }
.no-solution-badge { color: #a13c4c; background: #ffe4e8; border: 1px solid #f2c7cd; }
.question-card.is-complete .no-solution-badge { color: #a13c4c; background: #ffe4e8; }
.question-card.is-complete .type-badge { color: var(--mint-ink); background: var(--mint); }
.card-unit { color: var(--blue); font-size: 10px; font-weight: 800; margin-top: 16px; }
.question-card h3 { margin: 7px 0 11px; font-size: 20px; line-height: 1.05; letter-spacing: -.04em; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 21px; }
.card-tag { color: #758095; font-size: 10px; padding: 4px 7px; background: #f4f6f9; border-radius: 6px; }
.prompt-preview, .modal-prompt, .solution-content { direction: rtl; unicode-bidi: plaintext; white-space: pre-wrap; }
.prompt-preview { color: #4d596d; font-size: 12px; line-height: 1.65; margin: 14px 0 17px; display: block; overflow: hidden; }
.pdf-image-stack { display: grid; gap: 12px; }
.pdf-page-figure { margin: 0; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 9px; background: #fff; box-shadow: 0 3px 10px rgba(31,45,74,.06); }
.pdf-page-figure img { display: block; width: 100%; height: auto; background: #fff; }
.prompt-preview .pdf-image-stack { max-height: 165px; overflow: hidden; border-radius: 8px; }
.prompt-preview .pdf-page-figure { border-radius: 8px; box-shadow: none; }
.pdf-image-missing { padding: 30px 16px; color: var(--muted); background: #f7f8fb; text-align: center; font-size: 11px; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eef0f4; padding-top: 13px; margin-top: auto; }
.card-open { border: 0; background: transparent; padding: 5px 0; color: var(--blue); font-size: 11px; font-weight: 800; }
.card-complete { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; padding: 7px 9px; font-size: 10px; font-weight: 750; }
.card-complete:hover { border-color: #9ab0ff; color: var(--blue); }
.question-card.is-complete .card-complete { color: var(--mint-ink); border-color: #a7ddc5; background: #f4fcf8; }
.load-more { display: block; width: 100%; border: 1px solid var(--line); background: transparent; color: var(--blue); border-radius: 11px; padding: 13px; margin: 19px 0 0; font-size: 11px; font-weight: 800; }
.load-more:hover { background: var(--blue-soft); }
.load-more span { padding-right: 5px; }
.empty-state { text-align: center; border: 1px dashed #cfd6e3; border-radius: var(--radius-md); padding: 60px 20px; margin-top: 18px; background: rgba(255,255,255,.55); }
.empty-icon { color: var(--blue); font-size: 28px; }
.empty-state h3 { margin: 13px 0 5px; font-size: 18px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.footer { max-width: 1440px; margin: 0 auto; padding: 20px 44px 30px; color: #9aa4b4; font-size: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-feedback { min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; padding: 0 10px; border-radius: 8px; flex: 0 0 auto; }
.footer-feedback:hover { color: var(--blue); background: var(--blue-soft); }

.modal-backdrop[hidden] { display: none; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 22, 39, .55); backdrop-filter: blur(5px); }
.study-modal { width: min(920px, 100%); max-height: min(900px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: 0 28px 100px rgba(8, 18, 34, .25); overflow: hidden; }
.modal-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 27px 18px; border-bottom: 1px solid var(--line); }
.modal-topbar .eyebrow { margin-bottom: 8px; }
.modal-topbar h2 { font-size: 28px; letter-spacing: -.05em; margin: 0; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; color: var(--muted); font-size: 23px; line-height: 1; }
.icon-button:hover { color: var(--ink); background: #f4f6f9; }
.modal-scroll { overflow-y: auto; padding: 22px 27px 10px; }
.modal-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 11px; margin-bottom: 22px; }
.modal-units { color: var(--blue); font-size: 11px; font-weight: 750; }
.prompt-block { border-radius: 14px; background: #eef1f6; padding: 14px; }
.section-label { color: var(--ink); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 850; margin: 0 0 12px; }
.modal-prompt { color: #344055; font-size: 14px; line-height: 1.8; }
.text-fallback { margin-top: 12px; }
.text-fallback summary { cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 750; }
.fallback-text { direction: rtl; unicode-bidi: plaintext; white-space: pre-wrap; color: #667286; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-top: 8px; font-size: 12px; line-height: 1.7; }
.solution-block { margin-top: 25px; }
.solution-heading { align-items: center; }
.solution-heading .section-label { margin: 0; }
.solution-content { color: #344055; border: 1px solid #dae2ff; border-radius: 13px; background: #f8f9ff; padding: 16px; font-size: 13px; line-height: 1.8; margin-top: 12px; }
.source-line { display: grid; gap: 7px; border-top: 1px solid var(--line); color: #8994a7; font-size: 10px; line-height: 1.55; padding: 16px 0 7px; margin-top: 25px; }
.source-links { display: flex; flex-wrap: wrap; gap: 9px 14px; }
.source-links a { color: var(--blue); font-weight: 750; text-decoration: none; }
.source-links a:hover, .source-links a:focus-visible { text-decoration: underline; }
.source-review-note { color: #8c4f1a; background: #fff7e8; border: 1px solid #f1d29a; border-radius: 8px; padding: 7px 9px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 15px 27px; }
.modal-actions .button-quiet { background: #f4f6f9; color: var(--ink); }
.modal-actions .button-quiet:hover { background: #e9edf4; }

@media (max-width: 960px) {
  .topbar, main, .footer { padding-left: 24px; padding-right: 24px; }
  .workspace { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
  .question-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .topbar { height: 66px; }
  .topbar-note { display: none; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 16px; padding: 21px 0 18px; }
  .page-intro h1 { font-size: 30px; }
  .page-intro-copy p:not(.eyebrow) { font-size: 11px; }
  .page-intro-actions { width: 100%; }
  .page-intro-actions .button, .page-intro-action { flex: 1 1 auto; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-progress { grid-column: 1 / -1; }
  .official-exams { display: block; padding: 16px; }
  .official-exams-list { margin-top: 14px; }
  .official-exam-links a { flex: 1 1 auto; }
  .workspace { display: block; }
  .filters { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 10px; }
  .filters-heading { align-items: center; }
  .filters h2 { font-size: 21px; }
  .filter-group { margin: 17px 0; }
  .filter-row { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 5px; }
  .filter-row > div { width: auto; }
  .filter-group > label, .filter-row label { font-size: 10px; }
  .filter-group select { font-size: 11px; }
  .search-wrap { margin: 17px 0 15px; }
  .topics-group, .filter-tip { display: none; }
  .question-area .content-heading { padding-top: 26px; }
  .question-card { min-height: 245px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .study-modal { max-height: 94vh; border-radius: 22px 22px 0 0; }
  .modal-topbar { padding: 20px 20px 15px; }
  .modal-topbar h2 { font-size: 23px; }
  .modal-scroll { padding: 18px 20px 8px; }
  .modal-actions { padding: 12px 20px; }
  .modal-actions .button { padding: 0 11px; font-size: 11px; }
}
@media (max-width: 430px) {
  .topbar, main, .footer { padding-left: 16px; padding-right: 16px; }
  .page-intro-actions { align-items: stretch; flex-direction: column; }
  .filter-group { width: 100%; margin-right: 0; }
  .filter-group select { padding: 0 5px; }
  .modal-actions .button { min-height: 42px; min-width: 0; padding-inline: 9px; font-size: 10px; }
}

.topbar-nav { display: flex; align-items: center; gap: 5px; margin-inline-start: auto; margin-inline-end: 28px; }
.topbar-link { color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 800; padding: 9px 12px; border-radius: 9px; }
.topbar-link:hover, .topbar-link.is-active { color: var(--blue); background: var(--blue-soft); }
.card-reference-note { color: #8994a7; font-size: 10px; min-height: 16px; margin-top: 9px; }
.reference-block { margin: 0 0 24px; border: 1px solid #e4e8f0; border-radius: 14px; padding: 15px; background: #fbfcfe; }
.reference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.reference-heading .section-label { margin-bottom: 3px; }
.reference-subtitle { color: var(--muted); font-size: 10px; margin: 0; }
.reference-count { color: var(--blue); background: var(--blue-soft); border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.reference-groups { display: grid; gap: 14px; margin-top: 14px; }
.reference-group h3 { color: var(--ink); font-size: 11px; margin: 0 0 6px; }
.reference-list { display: grid; gap: 5px; }
.reference-item { display: flex; align-items: stretch; overflow: hidden; border: 1px solid #e5e9f1; border-radius: 9px; background: #fff; }
.reference-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; padding: 9px 11px; }
.reference-item summary::-webkit-details-marker { display: none; }
.reference-item summary::before { content: '+'; color: var(--blue); font-size: 14px; font-weight: 700; }
.reference-item[open] summary::before { content: '−'; }
.reference-item summary strong { color: var(--ink); font-size: 11px; margin-inline-end: auto; }
.reference-item summary span { color: var(--muted); font-size: 9px; text-align: left; }
.reference-evidence { color: #667286; border-top: 1px solid #eef0f4; padding: 9px 11px; margin: 0; font-size: 10px; line-height: 1.65; }
.reference-empty { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 9px 0 0; }
.reference-button { flex: 1 1 auto; min-width: 0; width: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; text-align: start; cursor: pointer; color: inherit; padding: 10px 11px; background: transparent; }
.reference-button:hover, .reference-button:focus-visible { background: #f7f9ff; outline: none; }
.related-question-link { text-decoration: none; }
.reference-button-main { min-width: 0; display: grid; gap: 4px; }
.reference-button-main strong { color: var(--ink); font-size: 11px; }
.reference-nickname { color: var(--blue); font-size: 10px; font-weight: 750; }
.reference-button-meta { flex: 0 0 auto; color: var(--muted); font-size: 9px; text-align: left; }
.reference-bookmark { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-width: 112px; min-height: 42px; padding: 0 12px; border-inline-start: 1px solid #eef0f4; color: var(--blue); background: #fbfcff; font-size: 10px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.reference-bookmark:hover, .reference-bookmark:focus-visible { color: #244fe8; background: var(--blue-soft); outline: none; }
.reference-bookmark > span:first-child, .bookmark-glyph { display: inline-block; width: 10px; height: 14px; border-radius: 2px 2px 1px 1px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }
.reader-bookmark-icon { display: block; width: 12px; height: 17px; border-radius: 2px 2px 1px 1px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }
.reference-detail-backdrop[hidden] { display: none; }
.reference-detail-backdrop { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 22, 39, .67); backdrop-filter: blur(6px); }
.reference-detail-modal { width: min(780px, 100%); max-height: min(760px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: 0 28px 100px rgba(8, 18, 34, .3); }
.reference-detail-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 25px 17px; border-bottom: 1px solid var(--line); }
.reference-detail-topbar .eyebrow { margin-bottom: 7px; }
.reference-detail-topbar h2 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.04em; }
.reference-detail-scroll { overflow-y: auto; padding: 21px 25px 8px; }
.reference-detail-nickname { display: inline-flex; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 850; }
.reference-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.reference-detail-meta span { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; font-size: 9px; }
.reference-detail-page { margin: 2px 0 18px; }
.reference-detail-questions { margin: 18px 0 8px; }
.reference-detail-question-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.reference-detail-question-link { color: var(--blue); border: 1px solid #d7e0ff; border-radius: 999px; background: #f7f9ff; padding: 7px 10px; font-size: 10px; font-weight: 750; text-decoration: none; }
.reference-detail-question-link:hover, .reference-detail-question-link:focus-visible { border-color: #9fb3ff; background: var(--blue-soft); outline: none; }
.reference-detail-page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.reference-detail-page-heading .section-label { margin: 0 0 9px; }
.reference-detail-page-heading span { color: var(--muted); font-size: 9px; }
.reference-detail-images { display: grid; gap: 12px; }
.reference-detail-page-figure { margin: 0; overflow: hidden; border: 1px solid #dfe5f0; border-radius: 13px; padding: 8px; background: #f5f7fb; box-shadow: 0 5px 18px rgba(31,45,74,.06); }
.reference-detail-page-figure a { display: block; cursor: zoom-in; }
.reference-detail-page-figure img { display: block; width: 100%; height: auto; border: 1px solid #e4e8ef; background: #fff; }
.reference-detail-content { border: 1px solid #dfe5f0; border-radius: 13px; background: #fbfcfe; padding: 16px; }
.reference-detail-content .section-label { margin-bottom: 10px; }
.reference-detail-text { direction: rtl; unicode-bidi: plaintext; white-space: pre-wrap; color: #344055; font-size: 14px; line-height: 1.9; }
.reference-formatted-line { min-height: 1.9em; direction: rtl; unicode-bidi: plaintext; text-align: right; }
.reference-formatted-line.is-math { direction: ltr; unicode-bidi: isolate; text-align: center; font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; letter-spacing: .01em; }
.reference-detail-text.is-unavailable { color: var(--muted); font-size: 12px; }
.reference-evidence-details { margin-top: 13px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.reference-evidence-details summary { cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 800; }
.reference-evidence-details #reference-detail-evidence { direction: rtl; unicode-bidi: plaintext; color: #667286; font-size: 10px; line-height: 1.7; margin: 10px 0 0; }

/* Readable text fallback for mixed Hebrew and mathematical notation. */
.study-text { direction: rtl; unicode-bidi: plaintext; color: inherit; }
.study-line { display: block; direction: rtl; unicode-bidi: plaintext; min-height: 1.75em; text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; }
.math-stack { display: grid; gap: 2px; direction: ltr; margin: 5px auto; }
.math-stack.matrix-stack { width: fit-content; max-width: 100%; padding: 6px 10px; border: 1px solid #dce3ef; border-radius: 10px; background: #f8faff; }
.math-stack.matrix-stack .math-line { margin: 0; padding: 1px 8px; border: 0; border-radius: 0; background: transparent; }
.study-line.math-line { direction: ltr; unicode-bidi: isolate; text-align: center; font-family: "Cambria Math", "STIX Two Math", "DejaVu Sans", "Times New Roman", serif; font-size: 1.04em; letter-spacing: .01em; line-height: 1.65; padding: 4px 10px; margin: 3px auto; border: 1px solid #e1e6f0; border-radius: 8px; background: #f7f9fd; }
.study-line.list-line { margin-top: 4px; }
.inline-math { display: inline-block; direction: ltr; unicode-bidi: isolate; font-family: "Cambria Math", "STIX Two Math", "DejaVu Sans", "Times New Roman", serif; font-variant-ligatures: none; letter-spacing: .01em; white-space: nowrap; margin-inline: .08em; }
.math-fraction { display: inline-flex; flex-direction: column; justify-content: center; min-width: 1.35em; vertical-align: middle; direction: ltr; unicode-bidi: isolate; margin: 0 .18em; font-family: "Cambria Math", "STIX Two Math", "DejaVu Sans", "Times New Roman", serif; font-size: .95em; line-height: 1.1; text-align: center; }
.math-fraction-top { display: block; padding: 0 .18em .08em; border-bottom: 1px solid currentColor; }
.math-fraction-bottom { display: block; padding: .08em .18em 0; }
.study-paragraph-break { height: .58rem; }
.study-empty-text { color: var(--muted); }
.fallback-text .study-line { min-height: 1.8em; }
.fallback-text .study-line.math-line { margin-block: 5px; }
.solution-content .study-line { min-height: 1.8em; }
.solution-content .study-line.math-line { margin-block: 6px; }
.reference-detail-text .study-line { min-height: 1.9em; }
.reference-detail-text .study-line.math-line { margin-block: 6px; }
.prompt-preview .study-line { min-height: 1.65em; }
.prompt-preview .study-line.math-line { font-size: .95em; padding: 2px 6px; margin: 2px 0; }

.reference-detail-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 9px; border-top: 1px solid var(--line); padding: 14px 25px; }
.reference-detail-actions .button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; white-space: nowrap; }
@media (max-width: 700px) {
  .reference-detail-backdrop { padding: 0; align-items: end; }
  .reference-detail-modal { max-height: 94vh; border-radius: 20px 20px 0 0; }
  .reference-detail-topbar, .reference-detail-scroll { padding-left: 20px; padding-right: 20px; }
  .reference-detail-topbar h2 { font-size: 22px; }
  .reference-button { align-items: flex-start; }
  .reference-button-meta { max-width: 42%; line-height: 1.5; }
  .reference-detail-actions { padding: 12px 20px; }
}

.button:disabled, .difficulty-option:disabled { cursor: wait; opacity: .65; transform: none; }
.community-block { margin-top: 18px; }
.difficulty-panel { padding: 12px; border-radius: 11px; background: #fff; border: 1px solid #e7ebf3; }
.difficulty-label-row, .comment-form-footer, .comment-item-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.difficulty-label-row .section-label { margin: 0; }
.difficulty-label-row > span:last-child { color: var(--muted); font-size: 10px; }
.difficulty-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 11px; }
.difficulty-option { display: grid; justify-items: center; gap: 4px; min-height: 54px; border: 1px solid #dfe5f0; border-radius: 9px; padding: 7px 4px; color: var(--muted); background: #fff; transition: border .18s ease, background .18s ease, color .18s ease; }
.difficulty-option:hover, .difficulty-option:focus-visible { border-color: #9eb0ff; color: var(--blue); background: var(--blue-soft); outline: none; }
.difficulty-option.is-selected { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.difficulty-option strong { font-size: 16px; line-height: 1; }
.difficulty-option span { font-size: 9px; white-space: nowrap; }
.community-status { min-height: 1.2em; color: var(--muted); font-size: 10px; line-height: 1.5; margin: 8px 0 0; }
.community-status:empty { display: none; }
.comments-panel { margin-top: 4px; border-top: 1px solid #e5eaf2; }
.comments-panel > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 4px 1px; cursor: pointer; list-style: none; color: var(--ink); font-size: 12px; font-weight: 800; }
.comments-panel > summary::-webkit-details-marker { display: none; }
.comments-panel > summary:hover { color: var(--blue); }
.comments-count { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.comments-toggle-hint { color: var(--blue); font-weight: 700; }
.comments-panel[open] .comments-toggle-hint { font-size: 0; }
.comments-panel[open] .comments-toggle-hint::after { content: 'סגירה'; font-size: 11px; }
.comments-content { padding: 3px 0 14px; }
.comment-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #edf0fb; color: #4a5b94; font-size: 14px; font-weight: 800; line-height: 1; }
.comments-list { display: grid; gap: 14px; padding-top: 15px; border-top: 1px solid #e8ecf3; }
.comments-empty { color: var(--muted); font-size: 12px; margin: 0; padding: 2px 0 4px; }
.comment-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; }
.comment-item:nth-child(3n + 2) .comment-avatar { background: #e8f4f0; color: #346e64; }
.comment-item:nth-child(3n) .comment-avatar { background: #f9eee8; color: #935f42; }
.comment-message { min-width: 0; padding: 10px 13px 11px; background: #f5f7fb; border-radius: 3px 13px 13px 13px; }
.comment-item-header strong { color: var(--ink); font-size: 12px; }
.comment-item-header time { color: #758196; font-size: 10px; white-space: nowrap; }
.comment-item p { color: #354259; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 0; }
.comment-form { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; margin: 5px 0 15px; }
.composer-avatar { background: var(--blue-soft); color: var(--blue); }
.comment-compose-fields { min-width: 0; display: grid; gap: 8px; }
.comment-form label, .feedback-form label { display: grid; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 800; }
.comment-form label > span, .feedback-form label > span { color: var(--muted); font-weight: 500; }
.comment-form input, .comment-form textarea, .feedback-form input, .feedback-form textarea, .feedback-form select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; color: var(--ink); background: #fff; outline: 0; font-size: 11px; }
.comment-form textarea, .comment-form input { font-size: 16px; }
.comment-form textarea:focus, .comment-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.comment-form input, .feedback-form input, .feedback-form select { height: 38px; }
.comment-form textarea { min-height: 58px; resize: vertical; line-height: 1.5; }
.comment-form input::placeholder, .comment-form textarea::placeholder, .feedback-form input::placeholder, .feedback-form textarea::placeholder { color: #a0a9b7; }
.comment-form-footer { align-items: center; }
.comment-form-footer small, .feedback-privacy { color: #758196; font-size: 10px; line-height: 1.5; }
.comment-form-footer .button { flex: 0 0 auto; min-height: 44px; }

.feedback-backdrop[hidden] { display: none; }
.feedback-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 22, 39, .62); backdrop-filter: blur(6px); }
.feedback-modal { width: min(520px, 100%); max-height: min(700px, calc(100vh - 40px)); overflow: auto; border-radius: 18px; background: var(--surface); box-shadow: 0 28px 100px rgba(8, 18, 34, .3); }
.feedback-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.feedback-topbar .eyebrow { margin-bottom: 7px; }
.feedback-topbar h2 { margin: 0; font-size: 25px; letter-spacing: -.045em; }
.feedback-form { display: grid; gap: 13px; padding: 18px 24px 23px; }
.feedback-intro { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 0 0 2px; }
.feedback-form textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.feedback-form .button { justify-self: start; }
.feedback-form .community-status { margin: -3px 0 0; }
@media (max-width: 700px) {
  .difficulty-buttons { gap: 4px; }
  .difficulty-option { min-height: 51px; }
  .difficulty-option span { font-size: 8px; }
  .feedback-backdrop { padding: 0; align-items: end; }
  .feedback-modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .feedback-topbar, .feedback-form { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 430px) {
  .difficulty-buttons { grid-template-columns: repeat(5, 1fr); }
  .difficulty-option strong { font-size: 14px; }
}

/* BEGIN shared responsive topbar: four-tab navigation, including 320px. */
@media (max-width: 960px) {
  .topbar-nav { margin-inline-start: auto; margin-inline-end: 0; }
  .topbar-note { display: none; }
  .account-control { max-width: 230px; }
}
@media (max-width: 700px) {
  .app-shell > .topbar { height: auto; min-height: 110px; flex-wrap: wrap; align-content: center; gap: 7px 0; padding-top: 10px; padding-bottom: 8px; }
  .topbar .brand { flex: 1 1 0; min-width: 0; }
  .topbar .brand > span:last-child { min-width: 0; overflow: hidden; }
  .topbar .brand strong, .topbar .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .account-control { order: 1; flex: 0 1 auto; max-width: 160px; justify-content: center; }
  .account-trigger { min-width: 86px; max-width: 150px; padding-inline: 9px; }
  .topbar-nav { order: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 2px; margin: 0; }
  .topbar-link { display: grid; place-items: center; min-width: 0; min-height: 44px; padding: 6px 3px; text-align: center; line-height: 1.25; font-size: 11px; white-space: normal; }
  .account-popover { inset-inline-start: auto; inset-inline-end: 0; }
}
@media (max-width: 360px) {
  .topbar-link { font-size: 10px; letter-spacing: -.025em; }
}
/* END shared responsive topbar. */

/* New Google sign-in announcement. It remains hidden until the shared notice script confirms a guest session. */
.feature-notice { max-width: 1440px; padding: 0 44px; margin: 0 auto; }
.feature-notice-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 17px 20px; border: 1px solid #c9d9f5; border-radius: 16px; background: linear-gradient(120deg, #f3f7ff, #fff 64%); box-shadow: 0 10px 28px rgba(40, 78, 142, .08); }
.feature-notice-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid #d7e1f5; border-radius: 13px; background: #fff; box-shadow: 0 2px 7px rgba(31, 68, 130, .08); }
.feature-notice-icon img { width: 22px; height: 22px; }
.feature-notice-copy { min-width: 0; }
.feature-notice-kicker { margin: 0 0 4px; color: #315efb; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.feature-notice-copy h2 { margin: 0 0 4px; color: var(--ink); font-size: 17px; line-height: 1.3; letter-spacing: -.03em; }
.feature-notice-copy > p:last-child { max-width: 780px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.feature-notice-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.feature-notice-primary { white-space: nowrap; color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(49, 94, 251, .18); text-decoration: none; }
.feature-notice-primary:hover { color: #fff; background: #244ee7; }
.feature-notice-dismiss { min-height: 42px; padding: 0 11px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; white-space: nowrap; }
.feature-notice-dismiss:hover { color: var(--ink); background: #e9effb; }

@media (max-width: 960px) {
  .feature-notice { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 700px) {
  .feature-notice-inner { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 15px; }
  .feature-notice-actions { grid-column: 2; justify-content: flex-start; }
  .feature-notice-copy h2 { font-size: 15px; }
  .feature-notice-copy > p:last-child { font-size: 10px; }
}
@media (max-width: 430px) {
  .feature-notice { padding-left: 16px; padding-right: 16px; }
  .feature-notice-inner { grid-template-columns: 1fr; gap: 10px; }
  .feature-notice-icon { width: 36px; height: 36px; }
  .feature-notice-actions { grid-column: 1; width: 100%; justify-content: space-between; }
  .feature-notice-primary { flex: 1 1 auto; }
}

.practice-settings { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.practice-settings summary { cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 800; list-style-position: outside; }
.practice-settings-content { display: grid; gap: 8px; margin-top: 12px; }
.practice-settings-content > label { color: var(--ink); font-size: 11px; font-weight: 800; }
.settings-help, .settings-status { color: var(--muted); font-size: 10px; line-height: 1.55; margin: 0; }
#blocked-exams { width: 100%; min-height: 142px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; color: var(--ink); background: var(--surface); font: inherit; font-size: 11px; }
#blocked-exams:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px var(--blue-soft); }
#blocked-exams option { padding: 6px 7px; border-radius: 5px; }
#blocked-exams option:checked { color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.preferences-reset { justify-self: start; margin-top: 3px; font-size: 11px; }

.exam-mode-panel { display: grid; gap: 22px; margin: 0 0 24px; padding: clamp(20px, 4vw, 34px); border: 1px solid #cfe2ee; border-radius: 18px; background: linear-gradient(135deg, #f6fbfd 0%, #f8f9ff 100%); box-shadow: 0 12px 40px rgba(35, 76, 111, .08); }
.exam-mode-panel[hidden], .workspace[hidden] { display: none; }
.exam-mode-header, .exam-session-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.exam-mode-header h2 { margin: 0 0 7px; color: var(--ink); font-size: clamp(25px, 4vw, 36px); letter-spacing: -.045em; }
.exam-mode-header p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.exam-mode-header .button-quiet { color: var(--blue); background: var(--blue-soft); }
.exam-mode-header .button-quiet:hover { background: #dfe6ff; }
.exam-whole-status { max-width: 520px; margin: 5px 0 0; color: #8a5a15; font-size: 10px; line-height: 1.45; }
.exam-whole-status.is-completed { color: #24734d; font-weight: 800; }
.exam-whole-action { white-space: nowrap; }
/* Exam picker: local typography and one catalog action per exact exam. */
@font-face {
  font-family: Heebo;
  src: url("./assets/fonts/heebo-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) {
  --exam-muted: #526176;
  gap: 22px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: Heebo, "Noto Sans Hebrew", Arial, sans-serif;
  line-height: 1.45;
  letter-spacing: normal;
}
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) .exam-mode-header h2,
.exam-chooser-heading h3 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: normal; }
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) .exam-mode-header p:not(.eyebrow) { margin-block-start: 3px; color: var(--exam-muted); font-size: 16px; line-height: 1.45; }
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) .eyebrow { color: var(--exam-muted); font-size: 14px; font-weight: 500; letter-spacing: normal; }
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) :is(.exam-mode-header, .exam-mode-picker) .button {
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  touch-action: manipulation;
}
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) .button-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) .button-quiet:hover:not(:disabled) { background: #edf0f5; }
.exam-mode-picker .button-primary { box-shadow: none; }
.exam-mode-panel:has(.exam-mode-picker:not([hidden])) :is(button, a, summary, h3):focus-visible,
.exam-mode-picker label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.exam-mode-picker { display: grid; gap: 16px; }
.exam-catalog-layout { display: grid; grid-template-columns: minmax(245px, 270px) minmax(0, 1fr); gap: clamp(20px, 3vw, 42px); align-items: start; }
.exam-filter-panel, .exam-status-board { min-width: 0; }
.exam-filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.exam-filter-panel > summary { min-height: 44px; padding: 11px 14px; font-size: 16px; font-weight: 600; cursor: pointer; border-radius: var(--radius-sm); }
.exam-filter-grid { display: grid; gap: 12px; padding: 0 14px 14px; }
.exam-filter-dimension { min-width: 0; border: 0; margin: 0; padding: 0; }
.exam-filter-dimension legend { padding: 0 0 2px; color: var(--exam-muted); font-size: 14px; font-weight: 600; }
.exam-filter-options { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 4px; margin: -4px; }
#exam-filter-years, #exam-filter-moeds { max-height: 144px; overflow: auto; scrollbar-gutter: stable; }
.exam-filter-option, .exam-option-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 3px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; cursor: pointer; }
.exam-filter-option:hover, .exam-option-toggle:hover { background: var(--paper); }
.exam-filter-option:has(input:checked), .exam-option-toggle:has(input:checked) { border-color: #bac8f5; background: var(--blue-soft); }
.exam-filter-option input, .exam-option-toggle input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.exam-option-toggle { border-color: var(--line); }
.exam-filter-empty, .exam-filter-summary, .exam-mode-helper, .exam-chooser-disclosure { margin: 0; color: var(--exam-muted); font-size: 14px; }
.exam-status-board { display: grid; gap: 12px; }
.exam-chooser-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.exam-continue-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.exam-continue-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.exam-continue-copy strong { font-size: 16px; font-weight: 700; }
.exam-continue-copy span { color: var(--exam-muted); font-size: 14px; }
.exam-status-kicker { font-weight: 600; }
.exam-status-group { display: grid; gap: 8px; }
.exam-status-list { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.exam-status-card { display: grid; grid-template-columns: minmax(0, 1fr) 74px; gap: 14px; align-items: center; padding: 7px 14px; }
.exam-status-card + .exam-status-card { border-block-start: 1px solid var(--line); }
.exam-status-card.is-selected { background: var(--blue-soft); box-shadow: inset -3px 0 var(--blue); }
.exam-status-card:first-child { border-start-start-radius: 9px; border-start-end-radius: 9px; }
.exam-status-card:last-child { border-end-start-radius: 9px; border-end-end-radius: 9px; }
.exam-status-card-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(92px, .56fr) 86px; align-items: baseline; column-gap: 14px; min-width: 0; }
.exam-status-card-copy strong { font-size: 16px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.exam-status-card-copy > span { color: var(--exam-muted); font-size: 14px; }
.exam-row-progress bdi { font-variant-numeric: tabular-nums; }
.exam-status-card-copy > .exam-status-badge { justify-self: start; align-self: center; width: fit-content; padding: 2px 8px; border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 700; line-height: 1.45; }
.exam-status-card-copy > .exam-status-badge.is-finished { color: var(--mint-ink); background: var(--mint); }
.exam-status-card-copy > .exam-status-badge.is-in-progress { color: #86500a; background: #fff3dc; }
.exam-status-card-copy > .exam-status-badge.is-not-started { color: #294c9d; background: var(--blue-soft); }
.exam-status-card-copy > .exam-status-badge::before { content: none; }
.exam-status-card .button { padding-inline: 8px; border-radius: 8px; }
.exam-status-card:not(.is-selected) .exam-start-action { color: #254fdd; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.exam-status-card:not(.is-selected) .exam-start-action:hover { background: var(--blue-soft); }
.exam-mode-picker .exam-history-notice strong,
.exam-mode-picker .exam-history-notice span:not(.exam-history-check) { font-size: 14px; }
.exam-chooser-status, .exam-chooser-state { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--exam-muted); font-size: 14px; }
.exam-chooser-show-more { justify-self: start; }
@media (max-width: 1000px) {
  .exam-status-card-copy { display: flex; flex-wrap: wrap; gap: 1px 9px; }
  .exam-status-card-copy strong { flex: 0 0 100%; }
  .exam-status-card-copy span + span::before { content: "·"; margin-inline-end: 8px; }
}
@media (max-width: 760px) {
  .exam-catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .exam-mode-panel:has(.exam-mode-picker:not([hidden])) .exam-mode-header .button { width: fit-content; }
  .exam-status-card { padding: 7px 10px; gap: 8px; }
}
@media (max-width: 380px) {
  .exam-continue-card { flex-wrap: wrap; }
  .exam-status-card { grid-template-columns: minmax(0, 1fr) 60px; }
}
.exam-history-notice { display: flex; align-items: center; gap: 11px; grid-column: 1 / -1; padding: 12px 14px; border: 1px solid #b8dec9; border-radius: 11px; color: #236b4a; background: #f0fbf4; }
.exam-history-notice[hidden] { display: none; }
.exam-history-check { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; color: #fff; background: #43a878; font-weight: 900; }
.exam-history-notice > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.exam-history-notice strong { font-size: 11px; }
.exam-history-notice span:not(.exam-history-check) { color: #55846b; font-size: 10px; }
.exam-history-notice .button { flex: 0 0 auto; min-height: 34px; color: #26704f; }
.exam-session { display: grid; gap: 18px; }
.exam-session[hidden] { display: none; }
.exam-session-header { align-items: center; padding-bottom: 4px; border-bottom: 1px solid rgba(71, 121, 151, .18); }
.exam-session-header h3 { margin: 0; color: var(--ink); font-size: clamp(18px, 3vw, 24px); }
.exam-session-progress { display: grid; gap: 8px; }
.exam-session-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.exam-session-progress strong { color: var(--ink); }
.exam-session-grid { display: grid; gap: 14px; }
.exam-question-card { display: grid; gap: 14px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 7px 22px rgba(30, 50, 75, .05); }
.exam-question-card.is-complete { border-color: #b5daca; background: #fbfffc; }
.exam-question-header { display: flex; align-items: baseline; gap: 11px; padding-bottom: 11px; border-bottom: 1px solid #edf0f4; }
.exam-question-header h3 { margin: 0; color: var(--ink); font-size: 16px; }
.exam-question-number { flex: 0 0 auto; color: var(--blue); font-size: 11px; font-weight: 900; }
.exam-question-prompt { color: var(--ink); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.exam-question-prompt .pdf-image-stack, .exam-question-solution .pdf-image-stack { margin: 0 0 10px; }
.exam-text-fallback { margin-top: 9px; color: var(--muted); font-size: 11px; }
.exam-text-fallback summary { cursor: pointer; font-weight: 700; }
.exam-question-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.exam-question-actions .button { min-height: 37px; }
.button-complete { border: 1px solid #b8dec9; border-radius: 8px; padding: 8px 12px; color: #26704f; background: #f0fbf4; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.button-complete:hover { border-color: #8fc6aa; background: #e5f7eb; }
.exam-solution-toggle { border: 0; padding: 8px 4px; color: var(--blue); background: transparent; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.exam-solution-toggle:disabled { color: #9aa5b2; cursor: not-allowed; }
.exam-question-solution { display: grid; gap: 8px; padding: 15px; border-inline-start: 3px solid #6ab08d; border-radius: 5px 10px 10px 5px; background: #f4fbf6; }
.exam-question-solution h4 { margin: 0; color: #2d7652; font-size: 12px; }

.resume-dock { flex-wrap: wrap; gap: 10px; }
.resume-exam-question { width: min(100%, 430px); }
.resume-exam-more { min-height: 34px; padding: 0 12px; border: 1px solid #cbd7fa; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.resume-exam-more:hover, .resume-exam-more:focus-visible { background: #e8eeff; outline: 2px solid #b7c7ff; outline-offset: 2px; }
.resume-question-copy > span { color: var(--muted); font-size: 10px; }

.exam-session-header { position: relative; z-index: 2; }
.exam-session-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; }
.timer-panel { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.timer-readout { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 9px; min-width: 0; }
.timer-label { grid-column: 1; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.timer-readout strong { grid-column: 2; grid-row: 1 / 3; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; white-space: nowrap; }
.timer-status { grid-column: 1; color: var(--muted); font-size: 10px; white-space: nowrap; }
.timer-panel.is-running .timer-status::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 5px; border-radius: 50%; background: var(--mint-ink); vertical-align: middle; }
.timer-panel.is-away-pending .timer-status::before { background: var(--orange); }
.timer-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.timer-button, .timer-more summary { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--blue); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.timer-button:hover, .timer-more summary:hover { background: var(--blue-soft); }
.timer-button:disabled { cursor: not-allowed; opacity: .45; }
.timer-more { position: relative; }
.timer-more[open] { z-index: 5; }
.timer-more summary { color: var(--muted); font-size: 18px; line-height: 1; list-style: none; }
.timer-more summary::-webkit-details-marker { display: none; }
.timer-more summary:focus-visible { outline: 3px solid rgba(49, 94, 251, .25); outline-offset: 2px; }
.timer-more-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); width: max-content; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.timer-more-menu .timer-button { width: 100%; justify-content: start; color: var(--ink); }
.modal-topbar { position: relative; z-index: 2; align-items: center; }
.modal-topbar > div:first-child { min-width: 0; }
.modal-topbar-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.question-timer-panel { padding-inline-start: 14px; border-inline-start: 1px solid var(--line); }
.question-timer-preview { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 22px; color: var(--muted); font-size: 10px; }
.question-timer-preview::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #adb6c4; }
.question-timer-preview.is-running::before { background: var(--mint-ink); }
.question-timer-preview strong { color: var(--ink); direction: ltr; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 750; }

@media (max-width: 960px) {
  .exam-session-header-actions:has(.timer-more[open]) { flex-direction: column; align-items: flex-start; gap: 58px; }
}
@media (max-width: 700px) {
  .exam-mode-header, .exam-session-header { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 14px; }
  .exam-mode-header > *, .exam-session-header > *, .exam-session, .exam-session-grid, .exam-session-header-actions, .exam-question-card,
  .exam-question-header, .exam-question-prompt, .exam-question-solution, .exam-question-actions,
  .exam-question-card .pdf-image-stack, .exam-question-card .pdf-page-figure { min-width: 0; max-width: 100%; width: 100%; }
  .exam-question-card .pdf-page-figure img { max-width: 100%; height: auto; }
  .exam-question-prompt .study-line.math-line, .exam-question-solution .study-line.math-line { width: 100% !important; min-width: 0; max-width: 100%; overflow-x: auto; overflow-wrap: anywhere; white-space: pre-wrap; }
  .exam-question-prompt .inline-math, .exam-question-solution .inline-math { max-width: 100%; overflow-wrap: anywhere; white-space: normal; word-break: break-word; }
  .exam-whole-status { max-width: 100%; overflow-wrap: anywhere; }
  .exam-history-notice { align-items: flex-start; flex-wrap: wrap; }
  .exam-history-notice .button { margin-inline-start: 37px; }
  .exam-whole-action { width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .exam-question-actions { align-items: flex-start; }
  .exam-session-header-actions { justify-content: space-between; width: 100%; }
  .modal-topbar { display: block; padding-inline-end: 60px; }
  .modal-topbar-tools { margin-top: 10px; }
  .modal-topbar-tools .icon-button { position: absolute; top: 18px; inset-inline-end: 20px; width: 44px; height: 44px; }
  .question-timer-panel { padding: 0; border: 0; }
}
@media (max-width: 360px) {
  .exam-session-header-actions { align-items: flex-start; flex-direction: column; }
  .timer-panel { gap: 5px; }
  .timer-readout { column-gap: 5px; }
  .timer-readout strong { font-size: 16px; }
}
.ticket-modal { border: 2px solid #d9e2ff; }
.ticket-context { max-width: 36rem; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ticket-form { gap: 14px; }
.ticket-question-link { color: var(--blue); font-size: 11px; font-weight: 750; text-decoration: none; }
.ticket-question-link:hover, .ticket-question-link:focus-visible { text-decoration: underline; }
.button-report { color: #744a00; background: #fff4d8; border: 1px solid #efd28e; }
.button-report:hover { background: #ffe9ad; }
.ticket-backdrop { z-index: 70; }
.modal-report-row { display: flex; justify-content: flex-start; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.context-dependency { margin: 16px 0 20px; padding: 14px 16px; border: 1px solid #d8e3f1; border-inline-start: 4px solid var(--blue); border-radius: var(--radius-sm); background: #f7faff; }
.context-dependency .section-label { margin: 0 0 10px; color: #355274; }
.context-dependency-item + .context-dependency-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e1e8f2; }
.context-dependency-item strong { display: block; margin-bottom: 5px; font-size: 12px; }
.context-dependency-prompt, .context-dependency-result { color: var(--ink); font-size: 13px; line-height: 1.75; }
.context-dependency-result-label { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
@media (max-width: 700px) {
  .ticket-form { padding-bottom: 28px; }
  .button-report { width: 100%; }
}

