:root {
  color-scheme: light;
  --page: #faf8f4;
  --card: #fffdfa;
  --ink: #292521;
  --muted: #695f56;
  --line: #e8e0d6;
  --accent: #a14127;
  --accent-dark: #80321e;
  --soft: #f6e9dd;
  --sand: #eee4d7;
  --green: #386049;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hebrew: 'Noto Serif Hebrew', 'SBL Hebrew', 'Times New Roman', 'DejaVu Sans', serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.6 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.16; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #925035; outline-offset: 3px; }
button, a { -webkit-tap-highlight-color: transparent; }
[lang="he"] { font-family: var(--hebrew); }
svg.icon { width: 19px; height: 19px; display: inline-block; flex: 0 0 auto; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -200px; top: 0; z-index: 5; background: white; padding: 8px 12px; }
.skip:focus { left: 8px; }
.site-header { background: #fdfbf7; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1296px; min-height: 73px; margin: auto; padding: 0 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 12px; font: 23px var(--serif); white-space: nowrap; }
.brand strong { font-weight: 500; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #fff9ed; background: #984127; border-radius: 9px; font-size: 26px; line-height: 1; padding-bottom: 3px; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 29px; }
.main-nav a { display: grid; place-items: center; position: relative; color: var(--muted); font-size: 14px; font-weight: 550; white-space: nowrap; }
.main-nav a:hover, .main-nav [aria-current="page"] { color: var(--accent-dark); }
.main-nav [aria-current="page"]::after { content: ''; height: 2px; background: var(--accent); position: absolute; bottom: 0; inset-inline: 0; }
.progress-link { justify-self: end; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.progress-link:hover, .progress-link[aria-current="page"] { border-color: #c77e60; color: var(--accent); }
.progress-link .icon { width: 16px; height: 16px; }
.shell { width: min(1160px, calc(100% - 80px)); min-height: 67vh; margin: 0 auto; padding: 38px 0 54px; }
.shell:focus { outline: none; }
.page-intro { margin-bottom: 25px; }
.page-intro h1 { font-size: clamp(42px, 5vw, 61px); letter-spacing: -.046em; margin-bottom: 9px; }
.page-intro > p:not(.eyebrow) { color: var(--muted); font-size: 15.5px; max-width: 660px; }
.eyebrow { display: block; color: var(--accent-dark); font-size: 10.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; margin-bottom: 9px; }
.hero { display: flex; align-items: center; position: relative; isolation: isolate; margin-bottom: 34px; padding: 29px 36px 32px; min-height: 263px; border-radius: 13px; overflow: hidden; color: #fff9f0; background-color: #382017; background-image: linear-gradient(90deg, #30170fdc 0%, #30190ed4 32%, #30190e5f 59%, #30190e12 100%), url(manuscript.webp); background-size: cover; background-position: center 48%; }
.hero .eyebrow { color: #f2c7ae; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero .eyebrow .icon { width: 13px; height: 13px; }
.hero h2 { font-size: clamp(31px, 4vw, 46px); letter-spacing: -.035em; max-width: 690px; margin: 6px 0 10px; }
.hero p:not(.eyebrow) { max-width: 470px; color: #f7e6d6; margin-bottom: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 9px 14px; min-height: 41px; font-size: 13px; line-height: 1.5; font-weight: 650; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.secondary { border-color: #d8c8b9; color: var(--ink); background: var(--card); }
.btn.secondary:hover { background: var(--soft); }
.btn.light { background: #fff2e3; color: #65301c; }
.btn.light:hover { background: white; }
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: .53; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .43fr); gap: 24px; align-items: start; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; margin-bottom: 13px; }
.section-title h2 { font-size: 29px; letter-spacing: -.033em; }
.section-title span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.stage, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 11px; }
.stage { margin-bottom: 10px; overflow: clip; }
.stage summary { cursor: pointer; padding: 15px 15px 15px 16px; display: flex; align-items: center; gap: 13px; list-style: none; }
.stage summary::-webkit-details-marker, .help summary::-webkit-details-marker { display: none; }
.stage summary:hover { background: #faf3eb; }
.stage[open] { border-color: #d9bda9; }
.stage[open] summary { background: #fdf6ed; }
.stage-symbol { background: #f2e7d9; color: var(--accent-dark); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; font-size: 26px; line-height: 1; padding-bottom: 4px; flex: 0 0 auto; }
.stage-info { flex: 1; }
.stage-info b { display: block; font-weight: 650; line-height: 1.4; }
.stage-info small { color: var(--muted); line-height: 1.3; display: block; margin-top: 3px; }
.stage-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.stage summary > .icon { color: #8a7563; transition: transform .15s ease; width: 15px; }
.stage[open] summary > .icon { transform: rotate(180deg); }
.lesson-list { list-style: none; margin: 0; padding: 0 15px; }
.lesson-row { border-top: 1px solid var(--line); }
.lesson-row > a, .lesson-row > .row-body { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 5px 3px; }
.lesson-row > a:hover { color: var(--accent); }
.lesson-row .row-num { flex: 0 0 27px; height: 26px; display: grid; place-items: center; background: #f3ede5; border-radius: 6px; color: #706458; font-size: 11px; font-weight: 650; }
.lesson-row .row-title { flex: 1; min-width: 0; font-weight: 550; font-size: 13px; }
.lesson-row .row-tail { color: var(--muted); font-size: 11px; display: inline-flex; gap: 7px; align-items: center; }
.lesson-row .row-tail .icon { width: 14px; height: 14px; }
.lesson-row.current .row-num { color: var(--accent-dark); background: #f4e3d4; }
.lesson-row.current .row-title, .lesson-row.current .row-tail { color: var(--accent-dark); }
.lesson-row.done .row-num { color: var(--green); background: #e7efe5; }
.stack { display: grid; gap: 12px; }
.panel { padding: 18px; }
.panel h3 { font-size: 23px; margin-bottom: 8px; letter-spacing: -.024em; }
.panel > p { color: var(--muted); }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 12px; gap: 7px; margin: 9px 0 7px; }
.progress-meta b { color: var(--accent-dark); font-size: 16px; font-weight: 650; }
progress { display: block; border: 0; width: 100%; height: 7px; appearance: none; overflow: hidden; border-radius: 20px; color: var(--accent); background: #eee4d9; }
progress::-webkit-progress-bar { background: #eee4d9; }
progress::-webkit-progress-value { background: #a54b2e; border-radius: 20px; }
progress::-moz-progress-bar { background: #a54b2e; border-radius: 20px; }
.text-link { color: var(--accent-dark); font-weight: 650; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 15px; height: 15px; }
.panel .text-link { margin-top: 13px; }
.rhythm { padding: 0; margin: 8px 0 0; list-style: none; }
.rhythm li { padding: 8px 0; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); }
.rhythm li:first-child { border-top: 0; }
.rhythm .icon { color: var(--accent); width: 16px; }
.rhythm b { flex: 1; font-size: 13px; font-weight: 650; }
.rhythm span { font-size: 12px; color: var(--muted); }
.site-footer { display: flex; justify-content: center; align-items: center; color: var(--muted); gap: 9px; border-top: 1px solid var(--line); padding: 20px 16px; font-size: 12px; }
.site-footer a { margin-left: 12px; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand { color: var(--accent); font-size: 17px; }
.session-header { margin-bottom: 24px; }
.session-header .text-link { margin-bottom: 17px; }
.session-header h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -.045em; margin-bottom: 9px; }
.session-header p:not(.eyebrow) { color: var(--muted); }
.session-header .timer-jump { display: none; margin: 8px 0 0; padding: 3px 0; background: none; border: 0; }
.session-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .38fr); gap: 24px; align-items: start; }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 0; margin: 0 0 12px; list-style: none; gap: 6px; }
.phase { width: 100%; text-align: left; padding: 10px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--card); display: grid; gap: 3px; }
.phase b { color: var(--ink); font-size: 13px; }
.phase span { font-size: 11px; }
.phase:hover, .phase[aria-current="step"] { border-color: #ca9578; background: #f7ece2; }
.phase[aria-current="step"] b { color: var(--accent-dark); }
.lesson-panel { padding: clamp(16px, 3vw, 26px); }
.lesson-panel h2 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.035em; margin-bottom: 12px; }
.lesson-panel > p, .lesson-panel .body-list { color: #41372e; margin: 9px 0 15px; }
.sample { background: #f8efe3; border: 1px solid #eddfcf; border-radius: 9px; padding: 10px 12px 14px; margin: 17px 0; text-align: center; }
.sample small { color: var(--muted); display: block; font-size: 12px; }
.sample [lang="he"] { font-size: clamp(26px, 4vw, 38px); display: block; line-height: 1.75; overflow-wrap: anywhere; }
.body-list { padding-inline-start: 23px; }
.body-list li { padding-inline-start: 4px; margin: 9px 0; }
.lesson-actions { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 19px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson-actions .next { margin-left: auto; }
.lesson-actions .icon { margin: 0; }
.resource-list { padding: 0; margin: 0; list-style: none; }
.resource-list li { border-top: 1px solid var(--line); padding: 9px 0; display: grid; gap: 3px; }
.resource-list li:first-child { border-top: 0; }
.resource-list a { display: inline-flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--accent-dark); font-weight: 650; font-size: 13px; }
.resource-list a:hover { text-decoration: underline; }
.resource-list .icon { width: 14px; }
.resource-list small { color: var(--muted); }
.video-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.video-section h3 { margin-bottom: 10px; font-size: 23px; }
.video-grid { display: grid; gap: 8px; }
.video-card { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.video-card summary { min-height: 51px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; list-style: none; border-radius: 8px; }
.video-card summary::-webkit-details-marker { display: none; }
.video-card summary:hover, .video-card[open] summary { background: #fcf3e9; }
.video-card summary > .icon:first-child { color: var(--accent-dark); }
.video-card summary > .icon:last-child { width: 15px; color: var(--muted); }
.video-card[open] summary > .icon:last-child { transform: rotate(180deg); }
.video-title { flex: 1; min-width: 0; line-height: 1.4; }
.video-title strong { display: block; font-size: 14px; font-weight: 650; }
.video-title small { display: block; color: var(--muted); font-size: 11px; }
.video-body { padding: 10px; }
.video-body p { padding-bottom: 8px; color: var(--muted); font-size: 13px; }
.video-body p.video-help { padding: 8px 0 0; }
.video-frame { border-radius: 6px; background: #292521; overflow: hidden; }
.video-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; height: auto; border: 0; }
.video-actions { display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: center; padding-top: 8px; }
.video-switch { border: 0; background: none; padding: 4px 0; cursor: pointer; }
.resource-videos { margin-bottom: 26px; max-width: 760px; }
.resource-videos h2, .resource-subheading { margin-bottom: 11px; font-size: 27px; letter-spacing: -.025em; }
.passage-section { margin-top: 22px; }
.passage-section h3 { margin-bottom: 8px; font-size: 23px; }
.passage-card + .passage-card { margin-top: 8px; }
.passage-verses { margin: 0 0 8px; padding-left: 30px; }
.passage-verses li { padding: 7px 4px 7px 0; }
.passage-verses li + li { border-top: 1px solid var(--line); }
.passage-verses li::marker { color: var(--muted); font-size: 12px; }
.passage-verses [lang="he"] { font-size: clamp(22px, 4vw, 29px); line-height: 1.65; overflow-wrap: anywhere; }
.timer-display { font-variant-numeric: tabular-nums; font-size: 31px; line-height: 1.2; color: var(--accent-dark); margin: 8px 0; }
.timer-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.timer-buttons .btn { padding: 6px 10px; min-height: 34px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 7px; }
.reveal { border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; background: #fbf6ee; text-align: center; }
.reveal summary { cursor: pointer; margin-bottom: 1px; }
.reveal span[lang="he"] { font-size: 26px; }
.reveal b, .reveal small { display: block; }
.reveal b { font-size: 13px; }
.reveal small { color: var(--muted); font-size: 11px; margin: 3px 0; }
.help { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.help summary { cursor: pointer; color: var(--accent-dark); font-weight: 650; }
.help p { margin: 6px 0; color: var(--muted); }
.quiz { display: grid; gap: 13px; }
.q-card { border: 1px solid var(--line); padding: 13px; border-radius: 9px; }
.q-card h3 { font: 650 14px/1.45 var(--sans); margin-bottom: 7px; }
.question-he { display: block; font-size: 27px; padding: 3px 0 7px; text-align: center; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { border: 1px solid #dacec0; background: #fffbf5; color: var(--ink); border-radius: 7px; padding: 6px 10px; min-height: 38px; font-size: 13px; text-align: start; }
.choice:lang(he) { font-size: 21px; line-height: 1.3; }
.choice:hover { border-color: var(--accent); }
.choice.right { border-color: #9cb4a0; color: #285239; background: #eaf1e6; }
.choice.wrong { border-color: #c88f7d; background: #faeee6; color: #783120; }
.feedback { color: var(--muted); line-height: 1.5; font-size: 12.5px; margin-top: 8px; }
.feedback.right { color: var(--green); }
.feedback.wrong { color: #783120; }
.quiz:not(:first-child) { margin-top: 12px; }
.backup-panel .feedback:empty { display: none; }
.backup-panel .timer-buttons { gap: 8px; }
.check-status { font-size: 12px; color: var(--muted); }
.bridge { border-left: 3px solid #b56b4a; background: #f8efe3; padding: 10px 12px; margin-top: 16px; font-size: 13px; }
.bridge b { display: block; margin-bottom: 3px; }
.note-label { display: block; font-weight: 650; margin: 13px 0 5px; font-size: 13px; }
textarea { display: block; width: 100%; min-height: 94px; resize: vertical; background: #fffcf6; color: var(--ink); border: 1px solid #d8cabb; border-radius: 7px; padding: 9px; font-size: 14px; }
.local-note { display: inline-block; color: var(--muted); font-size: 11px; padding-top: 4px; }
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.resource-panel .eyebrow { margin-bottom: 7px; }
.resource-panel p { font-size: 14px; }
.practice-tabs { display: inline-flex; border: 1px solid var(--line); padding: 3px; border-radius: 8px; margin-bottom: 14px; gap: 2px; background: var(--card); }
.practice-tabs a { border-radius: 6px; padding: 6px 13px; font-size: 13px; }
.practice-tabs a[aria-current="page"] { background: var(--soft); color: var(--accent-dark); font-weight: 650; }
.flash-panel { max-width: 710px; }
.flash-face { min-height: 195px; display: grid; place-content: center; text-align: center; border-radius: 9px; background: #f8efe3; border: 1px solid #eddfcf; margin: 8px 0 14px; padding: 16px; }
.flash-face [lang="he"] { font-size: clamp(36px, 6vw, 49px); }
.flash-face p { color: var(--muted); }
.stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.stat strong { display: block; color: var(--accent-dark); font-size: 25px; }
.stat span { color: var(--muted); font-size: 12px; }
.note-entry { padding: 8px 0; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-entry p { color: var(--muted); }
.save-error { color: #783120; padding: 7px 10px; background: #faeee6; }
@media (max-width: 800px) {
  .header-inner { padding-inline: 24px; gap: 17px; }
  .main-nav { gap: 17px; }
  .shell { width: calc(100% - 42px); }
  .dashboard { grid-template-columns: minmax(0, 1fr) minmax(215px, .47fr); gap: 14px; }
  .session-layout { grid-template-columns: minmax(0, 1fr) minmax(190px, .41fr); gap: 13px; }
  .hero { background-position: 61% 50%; }
}
@media (max-width: 635px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; padding: 11px 16px 0; gap: 4px 12px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 35px; height: 35px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; min-height: 42px; justify-content: space-between; gap: 12px; }
  .main-nav a { font-size: 13px; }
  .progress-link { grid-column: 2; grid-row: 1; padding-inline: 8px; }
  .shell { width: calc(100% - 30px); padding-top: 24px; }
  .page-intro { margin-bottom: 20px; }
  .hero { min-height: 231px; padding: 21px 17px; margin-bottom: 23px; background-image: linear-gradient(90deg, #30170fea 0%, #30190ed2 46%, #30190e77 100%), url(manuscript.webp); background-position: 61% 50%; }
  .hero h2 { max-width: 92%; }
  .dashboard, .session-layout, .page-grid { grid-template-columns: minmax(0, 1fr); }
  .stage summary { padding: 10px 8px; gap: 8px; }
  .stage-symbol { width: 37px; height: 37px; }
  .stage-count { font-size: 10px; }
  .stage-info small { font-size: 11px; }
  .lesson-row.current .duration { display: none; }
  .session-header .timer-jump { display: inline-flex; }
  .phases { gap: 4px; }
  .phase { padding-inline: 6px; }
  .phase b { font-size: 12px; }
  .choice { min-height: 42px; }
  .site-footer { justify-content: start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
