

  :root{
    --paper: #F6F0E4;
    --paper-edge: #ECE2C9;
    --ink: #2E2B28;
    --ink-soft: #1D3A5C;
    --wine: #2B2660;
    --wine-deep: #1E1A47;
    --gold: #C1875A;
    --gold-soft: #F1DFC8;
    --sage: #6F8A5C;
    --sage-soft: #E4EBDD;
    --sky: #7C74D6;
    --error: #B5433A;
    --radius: 14px;
    --serif-he: 'Heebo', serif;
    --sans-he: 'Varela Round', sans-serif;
    --serif-en: 'DM Serif Display', serif;
    --sans-en: 'Varela Round', sans-serif;
  }
  @font-face {
    font-family: 'Shmulik CLM';
    src: url(../assets/shared/font.ttf) format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Varela Round';
    src: url(../assets/shared/font-varela.ttf) format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Heebo';
    src: url(../assets/shared/font-heebo.ttf) format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'DM Serif Display';
    src: url(../assets/shared/font-dmserif-reg.ttf) format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'DM Serif Display';
    src: url(../assets/shared/font-dmserif-italic.ttf) format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
  }
  *{box-sizing:border-box;}
  body{
    margin:0;
    background: var(--paper-edge);
    color: var(--ink);
    font-family: var(--sans-en);
    padding: 28px 12px 80px;
  }
  .book{
    max-width: 880px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 20px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.03), 0 20px 50px -20px rgba(94,31,43,0.25);
    position: relative;
    overflow: hidden;
    border: 1px solid #EADFC2;
  }
  .book::before{
    content:"";
    position:absolute; inset:0;
    background-image: radial-gradient(rgba(124,43,58,0.035) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events:none;
  }
  header.top{
    padding: 32px 40px 24px;
    text-align:center;
    border-bottom: 1px solid #E2D6B4;
    position: relative;
  }
  .logo{ width: 92px; height: 92px; display: block; margin: 0 auto 12px; }
  .divider{ display:flex; align-items:center; justify-content:center; gap: 12px; margin-bottom: 16px; }
  .divider .line{ width:64px; height:1px; background: var(--gold); }
  .divider .dot{ width:6px; height:6px; background: var(--gold); transform:rotate(45deg); }
  h1.chapter-he{
    font-family: var(--serif-he); font-size: 60px; color: var(--wine);
    margin: 16px 0 0; font-weight: 900; line-height: 1.2;
    direction: rtl; unicode-bidi: isolate;
  }
  h2.chapter-en{
    font-family: var(--serif-en); font-weight: 500; font-size: 21px; color: var(--wine); margin: 4px 0 0;
  }
  h2.chapter-en em{ font-style: italic; color: var(--sky); font-weight: 500; }

  .unit-photo-wrap{ text-align:center; padding: 34px 24px 38px; }
  .unit-photo{ width: 190px; height: auto; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(30,26,71,0.35); }

  nav.ribbon{
    display:flex; flex-wrap:wrap; gap:6px; justify-content:center;
    padding: 16px 24px; background: var(--wine); position: sticky; top:0; z-index: 10;
  }
  nav.ribbon a{
    color: #F6E6D8; text-decoration:none; font-size: 12.5px; font-weight:600;
    padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(246,230,216,0.25);
    transition: all .15s ease; white-space:nowrap;
  }
  nav.ribbon a:hover{ background: rgba(246,230,216,0.15); }

  section.page{ padding: 40px 40px 20px; position: relative; }
  section.page + section.page{ border-top: 1px dashed #E0D2AC; }
  .seed{
    display:inline-flex; align-items:center; justify-content:center;
    width: 34px; height:34px; border-radius: 50%; background: var(--gold);
    color: #fff; font-size:16px; font-weight:700; margin-inline-end: 12px; flex-shrink:0;
  }
  .section-title{
    display:flex; align-items:center; font-family: var(--serif-en), var(--serif-he), serif; font-weight:400;
    font-size: 30px; color: var(--wine-deep); margin: 0 0 20px;
  }
  .section-title em{ font-style: italic; color: var(--sky); font-weight: 500; }
  .part2-divider{
    display:flex; align-items:center; gap:14px; margin: 6px 40px 0; padding-top: 26px;
  }
  .part2-divider .line{ flex:1; height:1px; background:#D9CBE8; }
  .part2-divider .label{
    font-family: var(--sans-en); font-size: 11px; letter-spacing:.1em; text-transform:uppercase;
    color: var(--sky); white-space:nowrap;
  }
  .part2-chips{ display:flex; gap:8px; justify-content:center; margin: 14px 40px 0; }
  .part2-chips span{
    background:#EEEDFE; color:#3C3489; font-family: var(--sans-en); font-size:12px;
    padding:4px 12px; border-radius:999px;
  }
  section.page.part2{
    background:#F5F3FC; border-left:4px solid var(--sky); border-radius:0 var(--radius) var(--radius) 0;
    padding-right: 36px;
  }
  section.page.part2 + section.page.part2{ border-top: 1px dashed #D9CBE8; }
  section.page.part2 .seed{ background: var(--sky); border-radius: 8px; }
  .imp-icon-wrap{ text-align:center; margin: 6px 0 20px; }
  .imp-icon{ width:64px; height:64px; }
  .section-subtitle-en{
    font-family: var(--serif-en), serif; font-weight: 500;
    font-size: 20px; color: var(--wine-deep); margin: -12px 0 20px;
  }
  .instructions{ color: var(--wine-deep); font-size: 15px; margin: 0 0 20px; line-height:1.55; }
  .body-text{ color: var(--wine-deep); font-size: 18px; margin: 0 0 18px; line-height:1.6; }
  .body-text b{ color: var(--wine-deep); }

  /* Examples frame — a bordered card around a demonstration sentence list or en/he table.
     Use .example-box > table.example-table (td.en / td.he) when English translations exist;
     use .example-box > ol.sentences (add class "boxed" to the ol) for Hebrew-only examples. */
  .example-box{
    border: 1px solid var(--gold); border-radius: var(--radius); overflow:hidden;
    background: #FFFDF6; margin-bottom: 20px;
    box-shadow: 0 6px 16px -10px rgba(30,26,71,0.25);
  }
  .example-table{ width:100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 0; }
  .example-table td{ padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid #EADFC2; }
  .example-table tr:last-child td{ border-bottom: none; }
  .example-table td.en{ font-family: var(--sans-en); color: var(--ink); width: 46%; }
  .example-table td.he{ font-family: var(--sans-he); direction: rtl; text-align:right; font-size: 16px; color: var(--wine-deep); }
  .example-box ol.sentences.boxed{ padding: 16px 20px; margin: 0; }
  .listen-label{
    font-family: var(--sans-en); font-size: 13px; font-weight:600; color: var(--ink-soft);
    display:inline-flex; align-items:center;
  }

  table.conj{
    width:100%; border-collapse: collapse; font-family: var(--sans-he);
    direction: rtl; margin-bottom: 10px; font-size: 16px;
  }
  table.conj th{ background: var(--wine-deep); color: #fff; padding: 9px 8px; font-size: 12.5px; font-weight:600; }
  table.conj td{ padding: 9px 8px; text-align:center; border-bottom: 1px solid #EADFC2; }
  table.conj td.eng{ direction: ltr; text-align:center; font-family: var(--sans-en); font-size: 14px; color: var(--ink-soft); }
  table.conj tr:hover td{ background: #F4ECD6; }

  ol.sentences{
    list-style: none; counter-reset: sent; padding:0; margin:0; direction: rtl;
    font-family: var(--sans-he); font-size: 17px; line-height: 2.3;
  }
  ol.sentences li{ counter-increment: sent; margin-bottom: 6px; padding-inline-start: 8px; }
  ol.sentences li::before{
    content: counter(sent) "."; color: var(--gold); font-weight:700;
    margin-inline-end: 6px; font-family: var(--sans-en);
  }
  .hint{ font-size: 14px; color: var(--ink-soft); font-family: var(--sans-en); direction: ltr; display:inline-block; }
  input.blank{
    width: 110px; direction: rtl; font-family: var(--sans-he); font-size: 16px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:center; padding: 3px 2px; color: var(--ink); outline:none;
  }
  input.blank:focus{ border-color: var(--wine); }
  input.blank.correct{ border-color: var(--sage); background: var(--sage-soft); }
  input.blank.incorrect{ border-color: var(--error); background: #FBE7E4; }

  .check-btn{
    background: var(--wine); color:#fff; border:none; padding: 11px 22px; border-radius: 999px;
    font-family: var(--sans-en); font-weight:700; font-size: 14px; cursor:pointer; margin-top: 8px;
    box-shadow: 0 6px 14px -6px rgba(124,43,58,0.6);
  }
  .check-btn:hover{ background: var(--wine-deep); }
  .reset-btn{
    background:none; border: 1px solid #C9BB92; color: var(--ink-soft); padding: 10px 18px;
    border-radius: 999px; font-family: var(--sans-en); font-size: 14px; cursor:pointer;
    margin-top:8px; margin-inline-start: 8px;
  }
  .score-pill{
    display:inline-block; margin-inline-start: 12px; font-family: var(--sans-en); font-weight:700;
    font-size: 13px; color: var(--wine-deep); background: var(--gold-soft); padding: 8px 14px;
    border-radius: 999px; vertical-align: middle;
  }

  .word-bank{ display:flex; flex-wrap:wrap; gap:8px; margin: 4px 0 22px; direction:rtl; }
  .word-bank .chip{
    background: var(--gold-soft); color: var(--wine-deep); border: 1px solid var(--gold);
    padding: 6px 14px; border-radius: 999px; font-family: var(--sans-he); font-size: 14px;
  }

  .resource-row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin: 4px 0 20px; }
  .resource-row.transcript-only{ justify-content: center !important; }
  .quizlet-btn{
    display:inline-flex; align-items:center; gap:8px; background: var(--gold-soft); color: var(--wine-deep);
    border: 1px solid var(--gold); padding: 9px 16px; border-radius: 999px; font-family: var(--sans-en);
    font-size: 13px; font-weight:700; cursor:pointer; text-decoration:none;
  }
  .quizlet-btn:hover{ background: var(--gold); color:#fff; }
  .drive-audio-wrap{ width: 100%; max-width: 420px; border-radius: 10px; overflow:hidden; border: 1px solid #EADFC2; }
  .drive-audio-wrap iframe{ width:100%; height:60px; border:none; display:block; }

  .podcast-toggle{
    display:inline-flex; align-items:center; gap:8px; background: #fff; color: var(--sky);
    border: 1px solid var(--sky); padding: 9px 16px; border-radius: 999px; font-family: var(--sans-en);
    font-size: 13px; font-weight:700; cursor:pointer;
  }
  .podcast-toggle:hover{ background: var(--sky); color:#fff; }
  .podcast-embed{
    display:none; margin: 4px 0 20px; border-radius: 10px; overflow:hidden; border: 1px solid #EADFC2;
  }
  .podcast-embed iframe{ width:100%; height:152px; border:none; display:block; }

  .mini-btn{
    background:none; border: 1px solid var(--sage); color: var(--sage); padding: 5px 12px;
    border-radius: 999px; font-size: 12px; font-family: var(--sans-en); font-weight:600; cursor:pointer;
  }
  .mini-btn:hover{ background: var(--sage); color:#fff; }
  .model-sentence{
    display:none; margin-top:8px; font-family: var(--sans-he); direction: rtl; font-size: 14px;
    color: var(--ink-soft); background: var(--sage-soft); padding: 8px 10px; border-radius: 8px;
  }
  /* Podcast transcripts specifically (ids ending "-transcript") get extra size and
     line spacing for comfortable reading of a full block of Hebrew text. */
  .model-sentence[id$="-transcript"]{
    font-size: 18px; line-height: 1.9; padding: 14px 16px;
  }

  .qa-row{
    border: 1px solid #EADFC2; border-radius: var(--radius); padding: 12px 16px;
    margin-bottom: 12px; background: #FFFDF6;
  }
  .qa-row .qa-num{ font-family: var(--sans-en); font-weight:700; color: var(--gold); font-size: 13px; margin-bottom: 6px; text-align: right;}
  label.field-label{
    font-size: 12px; font-weight:700; text-transform:uppercase; letter-spacing: .06em;
    color: var(--wine); display:block; margin-bottom:6px;
  }
  label.field-label.he{ direction: rtl; text-align: right; text-transform: none; letter-spacing: 0; font-size: 16px; }
  /* Use .en on field-label when the label wraps a full English sentence (not a short field tag like "ENGLISH") — resets the default uppercase transform. */
  label.field-label.en{ direction: ltr; text-align: left; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; }
  input.qa-input, textarea.qa-input{
    width:100%; direction: rtl; font-family: var(--sans-he); font-size: 15px;
    border: 1px solid #E0D2AC; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px;
    background: var(--paper); outline:none; resize: vertical;
  }
  input.qa-input:focus, textarea.qa-input:focus{ border-color: var(--wine); }

  /* Round-trip ("translate it back") pattern — reusable across any translate-style exercise.
     See renderMlTranslate() / startMlBackTranslate() / revealMlBack() in build_more_less.py
     for the reference JS implementation to copy into a new unit's script:
       1. Give the source-language label + model-reveal an id per row.
       2. A "Now translate it back" button hides the source label, shows the learner's own
          typed answer as static text, and reveals a fresh input + check-yourself reveal
          asking them to reconstruct the original from their own translation.
  */
  .back-translate{ display:none; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #E0D2AC; }
  .back-translate.open{ display:block; }
  .model-sentence.en{ direction: ltr; text-align: left; font-family: var(--sans-en); }

  .sample-flag{
    font-size: 11.5px; color: var(--ink-soft); font-family: var(--sans-en); margin-top: 4px;
    display:block;
  }

  .prototype-flag{
    background: #FBE7E4; border: 1px dashed var(--error); color: #7A2E24; font-size: 12.5px;
    padding: 8px 12px; border-radius: 8px; margin-top: 10px; font-family: var(--sans-en);
  }

  footer.pagefoot{ text-align:center; padding: 26px; color: var(--ink-soft); font-size: 12px; font-family: var(--sans-en); }

  /* ---------- podcast-card ----------
     A single, platform-agnostic "closed" appearance (mic icon + title + play button) that looks
     identical no matter what's actually embedded inside once opened (Google Drive, Spotify, or
     any other player) — episodes live on different platforms across units, but the button that
     invites the student to listen should always look the same. Centered on the page; Hebrew
     episode name is the prominent line, "PODCAST EPISODE" is a small uppercase English label. */
  .podcast-card{
    max-width: 480px; margin: 4px auto 20px; border-radius: 16px;
    overflow:hidden; background: var(--wine-deep); box-shadow: 0 8px 20px -10px rgba(30,26,71,.5);
  }
  .podcast-card .pc-head{
    display:flex; flex-direction:column; align-items:center; gap:4px;
    padding: 20px 18px 14px; text-align:center;
  }
  .podcast-card .pc-icon-badge{
    width:44px; height:44px; border-radius:50%; background: var(--gold);
    display:flex; align-items:center; justify-content:center; margin-bottom:4px; flex-shrink:0;
  }
  .podcast-card .pc-icon-badge svg{ width:22px; height:22px; }
  .podcast-card .pc-title{
    font-family: var(--sans-en); font-size: 12.5px; font-weight:700; text-transform:uppercase;
    letter-spacing: .04em; color: var(--gold-soft); line-height:1.3;
  }
  .podcast-card .pc-sub{
    font-family: var(--serif-he), var(--serif-en), serif; font-weight: 500;
    font-size: 15px; color: var(--paper); margin-top: 2px;
    direction: rtl; text-align: center;
  }
  .podcast-card .pc-player{ display:block; padding: 0 18px 18px; }
  .podcast-card .pc-player audio{ width:100%; }
  .podcast-card .pc-player iframe{ width:100%; height:80px; border:none; border-radius:10px; display:block; }
  .podcast-card .pc-player iframe.spotify-embed{ height:152px; }

  @media (max-width: 600px){
    section.page{ padding: 28px 18px 12px; }
    header.top{ padding: 24px 18px 16px; }
    h1.chapter-he{ font-size: 38px; }
    .section-title{ font-size: 22px; }
    table.conj{ font-size: 13px; }
    ol.sentences{ font-size: 15px; }
  }

  .quizlet-icon{ width: 34px; height: auto; flex-shrink:0; }
  .transcript-icon{ width: 22px; height: auto; flex-shrink:0; vertical-align: -6px; margin-right: 4px; }
  .roundtrip-icon{ width: 20px; height: auto; flex-shrink:0; vertical-align: -5px; margin-right: 4px; }
  /* generic small inline icon - for icon-prefixed button/label text that isn't part of a
     full listen-card/podcast-card component (e.g. "listen and read" labels, standalone
     "related podcast episode" / "agreement recording" buttons) */
  .inline-icon{ width: 20px; height: auto; flex-shrink:0; vertical-align: -5px; margin-right: 5px; }

  /* ---------- listen-card (closed-card wrapper around Drive audio embeds) ----------
     Replaces the raw black Drive iframe with a headphones-icon closed card; the iframe
     is lazy-loaded (data-src) only on first open. */
  .listen-card{
    width:100%; max-width: 420px; margin: 4px auto 20px; border: none; border-radius: 14px;
    overflow:hidden; background: var(--gold);
  }
  .listen-card .lc-head{
    display:flex; align-items:center; justify-content:center; gap:12px; padding: 14px 16px; cursor:pointer; user-select:none;
  }
  .listen-card .lc-icon{ width:32px; height:32px; flex-shrink:0; }
  .listen-card .lc-icon path, .listen-card .lc-icon rect{ stroke: var(--wine-deep) !important; }
  .listen-card .lc-label{
    flex:1; font-family: var(--sans-en); font-size: 14px; font-weight:700; color: var(--wine-deep);
  }
  .listen-card .lc-play{
    width:34px; height:34px; border-radius:50%; background: var(--wine-deep); color: var(--gold-soft);
    display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0;
    transition: transform .15s ease, background .15s ease;
  }
  .listen-card:hover .lc-play{ transform: scale(1.08); background: #14103A; }
  .listen-card .lc-player{ display:none; background: var(--gold-soft); }
  .listen-card .lc-player.open{ display:block; }
  .listen-card .lc-frame-wrap{ overflow:hidden; }
  .listen-card .lc-frame-wrap iframe{ width: calc(100% + 44px); height:60px; border:none; display:block; }
  .listen-card:has(audio){ cursor:default; }
  .listen-card:has(audio) .lc-head{ cursor:default; pointer-events:none; }
  .listen-card:has(audio) .lc-play{ display:none; }
  .listen-card:has(audio) .lc-player{ display:block; }
  .listen-card:has(audio) .lc-frame-wrap{ padding: 10px 16px 14px; }
  .listen-card:has(audio) audio{ width:100%; display:block; }
  .listen-card .lc-frame-wrap audio{ width:100%; height:54px; display:block; }

  /* ---------- podcast-card (closed-card wrapper around a Spotify podcast embed) ----------
     Same closed-card pattern as listen-card. Ported here so bespoke/standalone unit
     scripts (Family, Numbers, SHEL, ET) that don't inherit CSS_TEMPLATE's own copy of
     this component still get it correctly styled instead of an unsized raw icon. */
  

  /* ---------- VOCAB FRAME: fixed box for any new-vocabulary block ---------- */
  .vocab-frame{
    max-width: 480px; margin: 4px auto 24px; border: 3px solid var(--ink);
    border-radius: 4px; overflow:hidden; background: var(--paper);
  }
  .vocab-frame .vf-label{
    font-family: var(--serif-en), var(--serif-he), serif; font-weight: 500;
    font-size: 17px; color: var(--wine-deep); background: var(--gold-soft);
    padding: 8px 14px; border-bottom: 3px solid var(--ink); text-align: center;
  }
  .vocab-frame .vf-row{
    display:grid; grid-template-columns:1fr 1fr; align-items:baseline; gap:14px;
    padding: 12px 14px; border-bottom: 1px solid #EADFC2;
  }
  .vocab-frame.vocab-frame-narrow{ max-width: 240px; }
  .vocab-frame .vf-row:last-child{ border-bottom:none; }
  .vocab-frame .vf-en{ font-family: var(--sans-en); font-size: 14.5px; color: var(--ink); direction: ltr; text-align:left; order: 1; }
  .vocab-frame .vf-he{ font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep); direction: rtl; text-align:right; order: 2; }

  /* ---------- "Say it out loud" pronunciation-check box (own component, sits right
     after a vocab-frame / conjugation table / exercise block - built automatically
     by attachMicChecks() in app.js). Shows one item at a time (stepper) rather than
     a long list, and is centered with generous top margin so it reads as its own
     card rather than crowding the wider element above it. ---------- */
  .say-it-frame{
    max-width: 420px; margin: 26px auto 28px; border: 2px dashed var(--sky); border-radius: 14px;
    overflow:hidden; background: #FAFAFF;
  }
  .say-it-label{
    font-family: var(--serif-en), var(--serif-he), serif; font-weight: 500;
    font-size: 14.5px; color: var(--wine-deep); background: var(--gold-soft);
    padding: 8px 14px; text-align: center; border-bottom: 2px dashed var(--sky);
  }
  .say-it-label-he{ font-family: var(--sans-he); font-size: 13px; direction: rtl; unicode-bidi: isolate; }

  .say-it-stepper{ display:flex; align-items:center; gap: 4px; padding: 16px 10px 8px; }
  .say-it-nav{
    flex-shrink:0; width: 32px; height:32px; border-radius:50%; border: none;
    background: var(--gold-soft); color: var(--wine-deep); font-size:18px; line-height:1;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition: background .15s ease;
  }
  .say-it-nav:hover:not(:disabled){ background: var(--sky); color:#fff; }
  .say-it-nav:disabled{ opacity:.35; cursor:default; }

  .say-it-current{ flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; }
  .say-it-sub{ font-family: var(--sans-en); font-size: 12.5px; color: var(--ink-soft); direction: rtl; unicode-bidi: isolate; }
  .say-it-word-big{
    font-family: var(--sans-he); font-size: 26px; color: var(--wine-deep);
    direction: rtl; unicode-bidi: isolate; line-height:1.3; word-break: break-word;
  }
  .say-it-controls{ display:flex; align-items:center; gap:10px; }
  .say-it-check{ flex-shrink:0; min-width:20px; text-align:center; font-size:16px; font-weight:700; color: var(--ink-soft); }
  .say-it-check.match{ color: var(--sage); }
  .say-it-check.no-match{ color: var(--error); }
  .say-it-check.pending{ color: var(--ink-soft); font-style:italic; font-size:13px; }
  .say-it-progress{ font-family: var(--sans-en); font-size: 11.5px; color: var(--ink-soft); text-align:center; padding: 0 10px 12px; opacity:.7; }

  .vf-mic-btn{
    flex-shrink:0; width: 34px; height:34px; border-radius:50%; border:none; padding:0;
    background: var(--wine); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition: background .15s ease, transform .15s ease;
  }
  .vf-mic-btn:hover{ background: var(--wine-deep); }
  .vf-mic-btn.listening{ background: var(--error); animation: vfMicPulse 1s infinite; }
  .vf-mic-icon{ width:15px; height:15px; display:block; }
  @keyframes vfMicPulse{ 0%{ transform:scale(1); } 50%{ transform:scale(1.12); } 100%{ transform:scale(1); } }

  /* ---------- DIALOGUE FRAME: fixed box for any dialogue/example-sentence block ---------- */
  .dialogue-frame{
    max-width: 560px; margin: 4px auto 24px; border: 2px solid var(--sky);
    border-radius: 14px; overflow:hidden; background: #FAFAFF;
  }
  .dialogue-frame .df-head{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:8px; padding: 22px 16px 18px; text-align:center;
    background: #EFEEFB; border-bottom: 2px solid var(--sky);
  }
  .dialogue-frame .df-head .dlg-icon{ width: 92px; height: auto; flex-shrink:0; }
  .dialogue-frame .df-head .df-title{
    font-family: var(--serif-en), var(--serif-he), serif; font-weight: 500;
    font-size: 26px; color: var(--wine-deep); line-height: 1.3;
  }
  .dialogue-frame .df-body{ padding: 14px 18px; }
  .dialogue-frame .dlg-line{
    display:flex; justify-content:space-between; gap: 14px; padding: 9px 0;
    border-bottom: 1px dashed #DCDAF3; direction: rtl;
  }
  .dialogue-frame .dlg-line:last-child{ border-bottom:none; }
  .dialogue-frame .dlg-line .en{ font-family: var(--sans-en); font-size: 14.5px; color: var(--ink); direction: ltr; text-align:left; flex: 1; }
  .dialogue-frame .dlg-line .he{ font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep); text-align:right; flex: 1; }

  /* ---------- grammar-note callout ----------
     For short grammar explanations tied to a single Hebrew word/particle — a boxed
     callout with the headword large and centered, then an English explanation
     paragraph, then an optional Hebrew example line. */
  .grammar-note{
    max-width: 480px; margin: 4px auto 24px; border: 2px dashed var(--gold);
    border-radius: 12px; padding: 20px 24px; background: var(--gold-soft);
  }
  .grammar-note .gn-word{
    font-family: var(--serif-he), var(--serif-en), serif; font-weight:700;
    font-size: 30px; color: var(--wine-deep); text-align:center; margin-bottom: 12px;
  }
  .grammar-note .gn-text{
    font-family: var(--sans-en); font-size: 16px; color: var(--ink); line-height:1.7;
  }
  .grammar-note .gn-text strong{ color: var(--wine-deep); }
  .grammar-note .gn-example{
    font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep);
    direction: rtl; text-align: center; margin-top: 14px;
  }


  /* ---------- model-verb table frame (added for shell parity — task #388) ---------- */
  .model-verb-frame{
    border: 1.5px solid var(--sky); border-radius: var(--radius); overflow:hidden;
    margin: 4px 0 10px; background: var(--paper);
  }
  .model-verb-frame .mvf-head{
    background: #EDEBFA; text-align:center; padding: 10px 14px;
    font-family: var(--sans-en); font-size: 15px; font-weight:500; color: #26215C;
    border-bottom: 2px solid var(--sky);
  }
  .model-verb-frame table.conj{ margin-bottom:0; }

  /* ---------- combined Hebrew+English section heading (added for shell parity — task #388) ---------- */
  .section-title.combined{
    display:flex; flex-direction:column; align-items:center; text-align:center;
  }
  .section-title.combined .seed{ margin-inline-end:0; margin-bottom:10px; }
  .section-title.combined .lang-he{ font-family: var(--serif-he); font-size: 30px; color: var(--sky); direction:rtl; }
  .section-title.combined .lang-en{ font-family: var(--serif-en); font-size: 20px; color: var(--sky); margin-top:4px; font-weight:500; }

  /* ---------- podcast transcript reveal box (added for shell parity — task #388) ---------- */
  .pt-box{ max-width: 480px; margin: 4px auto 20px; border: 1.5px solid var(--gold); border-radius: 12px; background: var(--paper); overflow:hidden; }
  .pt-toggle{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; padding:12px; background: var(--gold-soft); border:none; border-bottom: 1.5px solid var(--gold); cursor:pointer; font-size:15px; font-weight:700; color: var(--wine-deep); font-family: inherit; }
  .pt-toggle .transcript-icon{ width:20px; height:20px; margin-right:0; vertical-align:middle; }
  .pt-toggle .pt-chevron{ flex-shrink:0; transition: transform .2s ease; }
  .pt-toggle.open .pt-chevron{ transform: rotate(180deg); }
  .pt-body{ padding: 16px 18px; font-size:16px; line-height:1.8; color: var(--wine-deep); text-align:right; }
  /* speaker-labeled podcast transcript inside a .pt-box */
  .pt-body p{ margin: 0 0 10px; font-family: var(--sans-he); line-height: 1.85; }
  .pt-body p:last-child{ margin-bottom: 0; }
  .pt-body p .spk{ font-weight: 700; color: var(--wine-deep); }


  /* ---------- autosave toast (added for shell parity — task #388; each unit's own
     per-file <style> block is discarded by the extraction script, so this shared
     copy is required for the toast to render styled at all). ---------- */
  .autosave-toast{
    position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px);
    background: var(--wine-deep); color: #F6E6D8; font-family: var(--sans-en);
    font-size: 12.5px; padding: 7px 16px; border-radius: 999px; pointer-events:none;
    opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 60;
  }
  .autosave-toast.show{ opacity: 1; transform: translate(-50%, 0); }
  @media (max-width: 600px){ .autosave-toast{ font-size: 11.5px; padding: 6px 14px; } }

  /* ---------- Quizlet button is a primary call-to-action — icon + bold label ---------- */
  .quizlet-btn{ font-weight: 700 !important; }


  textarea.free{
    width:100%; direction: rtl; font-family: var(--sans-he); font-size: 17px;
    border: 1px solid #E0D2AC; border-radius: 8px; padding: 8px 10px; margin-top: 8px;
    background: var(--paper); outline:none; resize: vertical;
  }
  textarea.free:focus{ border-color: var(--wine); }

  /* ---------- verb chain (infinitive -> present -> past/future) ---------- */
  .verb-chain{
    display:flex; align-items:center; justify-content:center; gap:18px; flex-wrap:wrap;
    font-family: var(--serif-he), serif; font-weight:900; direction:rtl; font-size:26px; color:var(--wine-deep);
    margin:10px 0 22px;
  }
  .verb-chain .arrow{ color: var(--gold); font-size:22px; }

  /* ---------- functions list (future tense: future / imperative / subjunctive) ---------- */
  .func-list{
    max-width: 420px; margin: 6px auto 26px; padding: 18px 26px;
    border: 1px solid #EADFC2; border-radius: var(--radius); background: #FFFDF6;
  }
  .func-list ol{ margin:0; padding-inline-start: 22px; font-family: var(--sans-en); font-size: 18px; color: var(--ink); }
  .func-list li{ margin-bottom: 6px; }

  /* ---------- practice conjugation grid (audio-guided, ungraded) ---------- */
  .practice-table-wrap{ overflow-x:auto; margin-bottom: 16px; }
  table.practice{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 17px; }
  table.practice th{ background: var(--wine-deep); color:#fff; padding: 9px 6px; font-size: 16px; font-weight:600; white-space:nowrap; }
  table.practice td{ padding: 7px 4px; border-bottom: 1px solid #EADFC2; text-align:center; }
  table.practice td.inf{ text-align:right; font-weight:700; color: var(--wine-deep); white-space:nowrap; padding-inline-end: 10px; }
  table.practice input.pcell{
    width: 62px; direction: rtl; font-family: var(--sans-he); font-size: 17px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:right; padding: 4px 4px; outline:none;
  }
  table.practice input.pcell:focus{ border-color: var(--wine); }

  /* ---------- imperative positive/negative example table (full Hebrew sentences —
     right-aligned, not centered, so they read naturally). Positive column is always first
     in markup (= rightmost, in an RTL table) and Negative second (= leftmost), matching the
     source book's own layout and Hebrew reading order. ---------- */
  table.imp-example{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 18px; margin-bottom: 18px; }
  table.imp-example th{ background: var(--wine-deep); color:#fff; padding: 9px 12px; font-size: 16px; font-weight:600; text-align:right; }
  table.imp-example td{ padding: 10px 12px; border-bottom: 1px solid #EADFC2; text-align:right; }

  /* ---------- imperative rewrite exercise (given sentence -> imperative input) ---------- */
  .rewrite-row{
    display:grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items:center;
    border-bottom: 1px solid #EADFC2; padding: 12px 4px; direction: rtl;
  }
  .rewrite-row:last-child{ border-bottom:none; }
  .rewrite-row .given{ font-family: var(--sans-he); direction: rtl; text-align:right; font-size: 18px; color: var(--ink); }
  .rewrite-row input.rw-input{
    width:100%; direction: rtl; font-family: var(--sans-he); font-size: 18px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:right; padding: 4px 2px; outline:none;
  }
  .rewrite-row input.rw-input:focus{ border-color: var(--wine); }
  .rewrite-row input.rw-input.correct{ border-color: var(--sage); background: var(--sage-soft); }
  .rewrite-row input.rw-input.incorrect{ border-color: var(--error); background: #FBE7E4; }

  /* ---------- imperative "write your own" — positive column on the right, negative on the
     left, matching the example table above it. ---------- */
  .imp-own-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 0 18px; direction: rtl; }
  .imp-own-grid .imp-own-col-head{
    font-family: var(--sans-en); font-size: 14px; font-weight:700; color: var(--wine-deep);
    text-transform:uppercase; letter-spacing:.04em; margin-bottom: 8px; text-align:center;
  }
  @media (max-width: 560px){ .imp-own-grid{ grid-template-columns: 1fr; } }

  /* ---------- gerund / shem-pe'ula table (partly pre-filled, blanks as inputs).
     Hebrew columns (שם הפועל / שם פעולה) are right-aligned; English "Meaning" columns
     are left-aligned — plain center-alignment reads wrong for Hebrew text. ---------- */
  .gerund-table-wrap{ overflow-x:auto; margin-bottom: 16px; }
  table.gerund{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 17px; }
  table.gerund th{ background: var(--wine-deep); color:#fff; padding: 9px 6px; font-size: 15px; font-weight:600; text-align:right; }
  table.gerund th:nth-child(2), table.gerund th:nth-child(4){ text-align:left; }
  table.gerund td{ padding: 8px 6px; border-bottom: 1px solid #EADFC2; text-align:right; vertical-align:middle; }
  table.gerund td.he-fixed{ font-weight:700; color: var(--wine-deep); text-align:right; }
  table.gerund td.en-fixed{ font-family: var(--sans-en); direction: ltr; font-size: 15px; color: var(--ink-soft); text-align:left; }
  table.gerund input.gcell{
    width: 100%; min-width: 90px; direction: rtl; font-family: var(--sans-he); font-size: 17px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:right; padding: 4px 4px; outline:none;
  }
  table.gerund input.gcell.en{ direction: ltr; font-family: var(--sans-en); font-size: 15px; text-align:left; }
  table.gerund input.gcell:focus{ border-color: var(--wine); }
  table.gerund input.gcell.correct{ border-color: var(--sage); background: var(--sage-soft); }
  table.gerund input.gcell.incorrect{ border-color: var(--error); background: #FBE7E4; }

  /* ---------- two-choice fill-in-the-blank hint, e.g. "____ (להמתין/המתנה)" — the two
     options are Hebrew words, not English, so this must be RTL/Hebrew-font, not LTR/English
     as originally (incorrectly) written. ---------- */
  .choice-hint{ font-family: var(--sans-he); font-size: 16px; color: var(--ink-soft); direction: rtl; unicode-bidi: embed; }

  /* ---------- story box (listening dictation) + free-write prompt box. NOTE: these classes
     were used throughout B1's binyan units (e.g. build_b1_hifil_past.py) but were only ever
     defined PER-UNIT there, never promoted into build_b1_shared.py's B1_EXTRA_CSS. B2 reused
     the class names assuming they were shared — they weren't, so B2 units were rendering these
     boxes with no real styling at all (no width, no direction, tiny UA-default textarea size).
     Defining them properly here, once, for every B2 unit. ---------- */
  .story-box{ background: #FFFDF6; border: 1px solid #EADFC2; border-radius: var(--radius); padding: 18px; }
  textarea.story-input{
    width:100%; box-sizing:border-box; direction: rtl; font-family: var(--sans-he); font-size: 18px;
    border: 1px solid #E0D2AC; border-radius: 8px; padding: 12px; min-height: 170px;
    margin-bottom: 12px; background: var(--paper); outline:none; resize: vertical;
  }
  textarea.story-input:focus{ border-color: var(--wine); }
  textarea.story-input.en{ direction: ltr; font-family: var(--sans-en); }

  .verb-prompt{
    border: 1px solid #EADFC2; border-radius: var(--radius); padding: 14px 16px;
    margin-bottom: 12px; background: #FFFDF6; direction: rtl; text-align: right;
  }
  .verb-prompt .heb{ font-family: var(--sans-he); font-size: 16px; font-weight:700; color: var(--wine-deep); }

  textarea.free{
    width:100%; box-sizing:border-box; direction: rtl; font-family: var(--sans-he); font-size: 18px;
    border: 1px solid #E0D2AC; border-radius: 8px; padding: 10px; margin-top: 8px;
    min-height: 68px; background: var(--paper); outline:none; resize: vertical;
  }
  textarea.free:focus{ border-color: var(--wine); }

  /* ---------- dual conjugation tables side by side (e.g. יכול-עתיד / צריך-עתיד).
     First .conj-col in markup = rightmost (matches source: יכול on the right). The heading
     gets a fixed min-height (flex-centered) so both columns' tables start at the same height
     even when only one heading has a second ("sub") line — otherwise the column whose heading
     is one line taller sits visibly lower than the other. ---------- */
  .dual-conj-wrap{ display:flex; gap:28px; justify-content:center; align-items:flex-start; flex-wrap:wrap; direction:rtl; margin-bottom: 18px; }
  .conj-col{ flex: 1 1 220px; max-width: 260px; }
  .conj-col .conj-col-head{
    font-family: var(--sans-he); font-size: 18px; font-weight:700; color: var(--wine-deep);
    text-align:center; margin-bottom: 8px; direction: rtl;
    min-height: 48px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  }
  .conj-col .conj-col-head .sub{ display:block; font-family: var(--sans-en); font-size: 12.5px; font-weight:500; color: var(--ink-soft); margin-top:2px; }

  /* ---------- Hebrew-content instruction line — the shared .instructions class has no
     direction set (it's used for English instructions everywhere else in the book), so a
     pure-Hebrew instruction line needs this modifier or it silently left-aligns. ---------- */
  .instructions.he{ direction: rtl; text-align: right; }

  /* ---------- present -> future fill-in table. Right column = given (present tense),
     left column = blank input (future tense) — matches the source's own right-to-left
     "read first, then answer" layout. ---------- */
  table.fe-table{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 17px; margin-bottom: 16px; }
  table.fe-table th{ background: var(--wine-deep); color:#fff; padding: 9px 12px; font-size: 15px; font-weight:600; }
  table.fe-table td{ padding: 10px 12px; border-bottom: 1px solid #EADFC2; }
  table.fe-table td.given{ text-align:right; color: var(--ink); }
  table.fe-table td.blank-cell{ text-align:right; }
  table.fe-table input.fe-input{
    width:100%; box-sizing:border-box; direction: rtl; font-family: var(--sans-he); font-size: 17px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:right; padding: 4px 4px; outline:none;
  }
  table.fe-table input.fe-input:focus{ border-color: var(--wine); }
  table.fe-table input.fe-input.correct{ border-color: var(--sage); background: var(--sage-soft); }
  table.fe-table input.fe-input.incorrect{ border-color: var(--error); background: #FBE7E4; }

  /* ---------- podcast reading transcript (printed in full, speaker-labeled) ---------- */
  .transcript-block{
    background: #FFFDF6; border: 1px solid #EADFC2; border-radius: var(--radius);
    padding: 18px 20px; margin-bottom: 18px; direction: rtl;
  }
  .transcript-block p{ margin: 0 0 14px; font-family: var(--sans-he); font-size: 18px; line-height: 1.85; color: var(--ink); text-align:right; }
  .transcript-block p:last-child{ margin-bottom:0; }
  .transcript-block p .spk{ font-weight:700; color: var(--wine-deep); }

  .spotify-btn{
    display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border-radius: 999px;
    font-family: var(--sans-en); font-size:15px; font-weight:600; text-decoration:none;
    background:#1DB954; color:#fff; border:1px solid transparent;
  }
  .spotify-btn:hover{ background:#169c46; }

  /* ---------- open "find the verbs in the text" table — both columns are student-filled,
     ungraded (there's no single correct list of verbs to extract). ---------- */
  table.verb-extract{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 16px; margin-bottom: 16px; }
  table.verb-extract th{ background: var(--wine-deep); color:#fff; padding: 9px 12px; font-size: 15px; font-weight:600; }
  table.verb-extract td{ padding: 6px 8px; border-bottom: 1px solid #EADFC2; }
  table.verb-extract input.ve-input{
    width:100%; box-sizing:border-box; direction: rtl; font-family: var(--sans-he); font-size: 16px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:right; padding: 6px 4px; outline:none;
  }
  table.verb-extract input.ve-input:focus{ border-color: var(--wine); }

  /* ---------- native-audio listen-card: same closed-card shell as .listen-card, but the
     player holds a real <audio> element (uploaded mp3) rather than a Drive iframe. ---------- */
  .listen-card .lc-frame-wrap audio{ width: calc(100% - 8px); margin: 10px 4px; display:block; }


  .instructions{ font-size: 17px; }
  .body-text{ font-size: 20px; }
  table.conj{ font-size: 19px; }
  table.conj th{ font-size: 15px; }
  table.conj td.eng{ font-size: 16px; }
  ol.sentences{ font-size: 19px; }
  input.blank{ font-size: 18px; }
  .hint{ font-size: 16px; }
  .check-btn{ font-size: 16px; }
  .reset-btn{ font-size: 16px; }
  .score-pill{ font-size: 15px; }
  .word-bank .chip{ font-size: 16px; }
  .quizlet-btn{ font-size: 15px; }
  .podcast-toggle{ font-size: 15px; }
  .example-table{ font-size: 16.5px; }
  .example-table td.he{ font-size: 18px; }
  .example-table td.en{ font-size: 15px; }
  .qa-row .qa-num{ font-size: 15px; text-align: right;}
  label.field-label.he{ font-size: 18px; }
  label.field-label.en{ font-size: 17px; }
  input.qa-input, textarea.qa-input{ font-size: 17px; }
  .model-sentence{ font-size: 20px; }
  .model-sentence[id$="-transcript"]{ font-size: 20px; }
  .mini-btn{ font-size: 15px; }
  footer.pagefoot{ font-size: 14px; }
  .vocab-frame .vf-en{ font-size: 16px; }
  .vocab-frame .vf-he{ font-size: 21px; }
  .vocab-frame .vf-label{ font-size: 19px; }

/* --- Mood banners (Maayan, 2026-08) ---------------------------------
   A long future-tense chapter used to signal its second half with one
   hairline "Part two" divider plus three tiny chips. Imperative and the
   ש+עתיד construction now each get their own banner AND their own colour
   spine, carried down every section of that mood, so a student always
   knows which mood they are inside without scrolling back.
   Hebrew banner text is set in Heebo (--serif-he), the Hebrew heading
   face, not in Varela Round. */
.mood-banner{ border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 0 0 22px; }
.mood-banner .he{ font-family: var(--serif-he), serif; font-size: 28px; font-weight: 900; line-height: 1.25; }
.mood-banner .en{ font-size: 14px; margin-top: 3px; }
section.page.mood-imp  { background:#F5F3FC; border-left:6px solid #7F77DD; border-radius:0 var(--radius) var(--radius) 0; padding-right:36px; }
section.page.mood-imp  .mood-banner{ background:#EEEDFE; }
section.page.mood-imp  .mood-banner .he{ color:#26215C; }
section.page.mood-imp  .mood-banner .en{ color:#534AB7; }
section.page.mood-subj { background:#F0F8F5; border-left:6px solid #1D9E75; border-radius:0 var(--radius) var(--radius) 0; padding-right:36px; }
section.page.mood-subj .mood-banner{ background:#E1F5EE; }
section.page.mood-subj .mood-banner .he{ color:#04342C; }
section.page.mood-subj .mood-banner .en{ color:#0F6E56; }
section.page.mood-test { background:#FBF6EE; border-left:6px solid var(--gold); border-radius:0 var(--radius) var(--radius) 0; padding-right:36px; }
section.page.mood-test .mood-banner{ background:#F1DFC8; }
section.page.mood-test .mood-banner .he{ color:#5A3A1C; }
section.page.mood-test .mood-banner .en{ color:#8A5A2B; }

  /* ---------- rules carried by the unit files' own <style> but missing here (synced 2026-09-02) ---------- */
  .podcast-card .pc-player audio.pc-audio{ width:100%; display:block; }
  .say-it-row{
    display:flex; align-items:center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #E4EBDD;
  }
  .say-it-row:last-child{ border-bottom:none; }
  .say-it-word { flex:1; font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep); direction: rtl; text-align:right; }
  .unit-illustration-wrap{ text-align:center; padding: 6px 24px 22px; }
  .unit-illustration{
    width: auto; height: auto; max-width: min(380px, 82%); max-height: 310px; display:inline-block;
  }
  .toc-fab{ position: fixed; top: 22px; right: 22px; z-index: 500; width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--wine-deep); color: #F6E6D8; cursor: pointer; box-shadow: 0 10px 22px -8px rgba(30,26,71,0.55); display:flex; align-items:center; justify-content:center; transition: transform .15s ease, background .15s ease; }
  .toc-fab .toc-fab-icon{ width: 27px; height: 27px; }
  .toc-fab:hover{ background: var(--wine); transform: scale(1.06); }
  .toc-backdrop{ position: fixed; inset:0; background: rgba(30,26,71,0.38); z-index: 600; opacity:0; pointer-events:none; transition: opacity .2s ease; }
  .toc-backdrop.open{ opacity:1; pointer-events:auto; }
  .toc-panel{ position: fixed; top:0; right:0; height: 100vh; width: min(340px, 86vw); background: var(--paper); z-index: 601; box-shadow: -14px 0 34px -14px rgba(30,26,71,0.45); transform: translateX(100%); transition: transform .25s ease; display:flex; flex-direction:column; border-left: 1px solid #EADFC2; }
  .toc-panel.open{ transform: translateX(0); }
  .toc-panel-head{ padding: 22px 20px 16px; border-bottom: 1px solid #E2D6B4; text-align:center; position:relative; flex-shrink:0; }
  .toc-panel-head .toc-title-he{ font-family: var(--serif-he); font-size: 24px; color: var(--wine-deep); font-weight:700; direction:rtl; }
  .toc-panel-head .toc-title-en{ font-family: var(--serif-en); font-size: 13px; color: var(--ink-soft); margin-top:2px; }
  .toc-close{ position:absolute; top:16px; left:16px; width:30px; height:30px; border-radius:50%; border: 1px solid #C9BB92; background:none; color: var(--ink-soft); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .toc-close:hover{ background: var(--gold-soft); }
  .toc-list{ overflow-y:auto; padding: 10px 12px 20px; flex:1; }
  .toc-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 11px 12px; border-radius: 10px; text-decoration:none; margin-bottom: 3px; direction: rtl; }
  .toc-row:hover{ background: var(--gold-soft); }
  .toc-row.current{ background: var(--wine-deep); }
  .toc-row.current .toc-row-he, .toc-row.current .toc-row-en, .toc-row.current .toc-row-num{ color: #F6E6D8 !important; }
  .toc-row-num{ font-family: var(--sans-en); font-size: 11px; color: var(--ink-soft); flex-shrink:0; width: 22px; text-align:center; }
  .toc-row-text{ flex:1; min-width:0; }
  .toc-row-he{ font-family: var(--sans-he); font-size: 15px; font-weight:700; color: var(--wine-deep); display:block; }
  .toc-row-en{ font-family: var(--sans-en); font-size: 11.5px; color: var(--ink-soft); display:block; direction:ltr; text-align:right; }
  #vg-asLongAs .verb-prompt .heb{ font-size: 19px; }
  #vg-asLongAs textarea.free{ font-size: 19px; min-height: 60px; }
  .vocab-hint-row{
    display:flex; flex-wrap:wrap; gap:10px; justify-content:center;
    border: 2px dashed var(--gold); border-radius: 12px; padding: 16px 20px;
    background: var(--gold-soft); margin: 4px 0 20px;
  }
  .vocab-hint-row .vh-box{
    background: #fff; border: 1px solid var(--gold); border-radius: 999px;
    padding: 7px 14px; font-family: var(--sans-en); font-size: 14px; color: var(--ink);
    white-space: nowrap;
  }
  .vocab-hint-row .vh-box .he{
    font-family: var(--sans-he); direction: rtl; color: var(--wine-deep); font-size: 15px;
    margin-inline-start: 4px;
  }
  table.conj.dual-model th{ text-align:center; }
  #p3f-subjunctive #p3fSubjQA .verb-prompt .heb{ font-size: 20px; }
  #p3f-subjunctive #p3fSubjQA textarea.free{ font-size: 19px; }
  #cor-title1{ direction: rtl; }
  #cor-kdei .grammar-note{ max-width: 560px; }
  #cor-kdei .gn-example{ line-height: 1.9; }
  #cor-kdei .gn-example + .gn-example{ margin-top: 10px; }
  #corKdeiList input.blank{ width: 170px; }
  #lf-yeshein .section-title, #lf-yeshli .section-title, #lf-feelings .section-title, #lf-qa .section-title{ direction: rtl; }
  #p3g-gerunds table.gerund{ font-size: 19px; }
  #p3g-gerunds table.gerund th{ font-size: 16px; }
  #p3g-gerunds table.gerund td.en-fixed{ font-size: 16.5px; }
  #p3g-gerunds table.gerund input.gcell{ font-size: 19px; }
  #p3g-gerunds table.gerund input.gcell.en{ font-size: 16.5px; }
  #p3g-gerund-ex .choice-hint{ font-size: 18px; }
  #pg-gerunds table.gerund{font-size:19px;}
  #pg-gerunds table.gerund th{font-size:16px;}
  #pg-gerunds table.gerund td.en-fixed{font-size:16.5px;}
  #pg-gerunds table.gerund input.gcell{font-size:19px;}
  #pg-gerunds table.gerund input.gcell.en{font-size:16.5px;}
  #pg-gerund-ex .choice-hint{font-size:18px;}
  .resource-row:has(.podcast-toggle){ flex-direction:column; align-items:center; text-align:center; }
  .resource-row:has(.transcript-icon){ justify-content:center; text-align:center; }
  .mini-illustration-wrap{ text-align:center; margin: 4px 0 14px; }
  .mini-illustration{ width:auto; height:auto; max-width: 150px; max-height: 150px; display:inline-block; }
  table.practice-conj{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 16px; }
  table.practice-conj th{ background: var(--wine-deep); color:#fff; padding: 8px 6px; font-size: 14px; font-weight:600; }
  table.practice-conj td{ padding: 6px 4px; border-bottom: 1px solid #EADFC2; text-align:center; }
  table.practice-conj td.pron{ font-weight:700; color: var(--wine-deep); background: #EAF3FB; }
  table.practice-conj input.pcell{
    width: 92%; direction: rtl; font-family: var(--sans-he); font-size: 16px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent;
    text-align:center; padding: 4px 2px; outline:none;
  }
  table.practice-conj input.pcell:focus{ border-color: var(--wine); }
  table.practice-conj input.pcell.correct{ border-color: var(--sage); background: var(--sage-soft); }
  .reveal-model-table{ display:none; margin-top: 10px; }
  .reveal-model-table.open{ display:block; }
  #htg-gerunds table.gerund{font-size:19px;}
  #htg-gerunds table.gerund th{font-size:16px;}
  #htg-gerunds table.gerund td.en-fixed{font-size:16.5px;}
  #htg-gerunds table.gerund input.gcell{font-size:19px;}
  #htg-gerunds table.gerund input.gcell.en{font-size:16.5px;}
  #htg-gerund-ex .choice-hint{font-size:18px;}
  .my-example{
    border: 1px solid #EADFC2; border-radius: var(--radius); background: #FFFDF6;
    padding: 16px 20px; margin-bottom: 16px;
  }
  .my-example .my-sentence{
    font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep); font-weight:700;
    direction: rtl; text-align: right; margin-bottom: 10px;
  }
  .my-example .my-row{
    font-family: var(--sans-he); font-size: 15.5px; color: var(--ink); direction: rtl;
    text-align: right; line-height: 1.8;
  }
  .my-example .my-row b{ color: var(--ink-soft); font-weight:700; }
  .group-head{
    text-align:center; font-family: var(--sans-he); font-size: 19px; font-weight:700;
    color: var(--wine-deep); margin: 22px 0 4px;
  }
  .group-head.first{ margin-top: 6px; }
  .group-bank{ text-align:center; direction:rtl; font-size:15.5px; color: var(--ink-soft); margin-bottom:10px; }
  #p1g-gerunds table.gerund{font-size:19px;}
  #p1g-gerunds table.gerund th{font-size:16px;}
  #p1g-gerunds table.gerund td.en-fixed{font-size:16.5px;}
  #p1g-gerunds table.gerund input.gcell{font-size:19px;}
  #p1g-gerunds table.gerund input.gcell.en{font-size:16.5px;}
  #p1g-gerund-ex .choice-hint{font-size:18px;}
  .fill-item{ border: 1px solid #EADFC2; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: #FFFDF6; }
  .fill-item .sent{ direction: rtl; text-align:right; font-family: var(--sans-he); font-size: 18px; line-height:1.9; }
  .fill-item input.blank{
    width: 110px; text-align:center; direction: rtl; font-family: var(--sans-he); font-size: 17px;
    border:none; border-bottom: 2px solid #C9BB92; background: transparent; padding: 3px 4px; outline:none;
  }
  .fill-item input.blank:focus{ border-color: var(--wine); }
  .fill-item .hint{ color: var(--ink-soft); font-size: 13px; }

  .vocab-strip{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 16px; direction: rtl; }
  .vocab-chip{ border: 1px solid var(--gold); background: var(--gold-soft); color: var(--wine-deep); font-family: var(--sans-he); direction: rtl; font-size: 16px; padding: 6px 12px; border-radius: 999px; }
  .vocab-chip .en{ font-family: var(--sans-en); direction: ltr; color: var(--ink-soft); font-size: 14px; }

  .pir-quad{ display:grid; grid-template-columns:repeat(2, max-content); justify-content:center; align-items:end; gap:18px 30px; padding: 4px 24px 22px; }
  .pir-quad img{ width:auto; height:auto; max-height:130px; max-width:150px; }
  .pir-verb-row{ display:flex; align-items:center; gap:22px; margin: 6px 0 18px; }
  .pir-verb-row .pir-verb-illus{ flex: 0 0 210px; text-align:center; }
  .pir-verb-row .pir-verb-illus img{ width:auto; height:auto; max-width:210px; max-height:210px; }
  .pir-verb-row .pir-verb-table{ flex:1 1 auto; min-width:0; }
  .pir-verb-row .model-verb-frame{ margin-bottom:0; }
  @media (max-width: 640px){ .pir-verb-row{ flex-direction:column; } .pir-verb-row .pir-verb-illus{ flex-basis:auto; } }
  table.practice-conj input.pcell.incorrect{ border-color: var(--error); background: #FBE7E4; }

  /* ---- sticky in-unit section strip (Maayan, 2026-09-02) ---- */
  .book.sticky-nav{ overflow: clip; }   /* overflow:hidden silently kills position:sticky */
  .book.sticky-nav nav.ribbon{ position: sticky; top: 0; z-index: 40; box-shadow: 0 8px 18px -12px rgba(30,26,71,.55); }
  .book.sticky-nav nav.ribbon a.active{ background: rgba(246,230,216,0.32); border-color: rgba(246,230,216,0.7); }
  .book.sticky-nav nav.ribbon a.ribbon-top{ opacity:.75; }
  .book.sticky-nav section.page, .book.sticky-nav header.top{ scroll-margin-top: 66px; }

  /* ---- per-unit CSS synced from the source builders (2026-09-09): units 11/20 (song pages)
     and unit 26 (podcast: verb tables + question cards). The shell only takes the fragment's
     body <style> (autosave toast), so head-level unit CSS has to live here. ---- */
  .song-links{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin: 6px 0 24px; }
  .spotify-btn{ display:inline-flex; align-items:center; gap:8px; padding: 12px 22px; border-radius: 999px; font-family: var(--sans-en); font-weight:700; font-size:16px; text-decoration:none; background:#1DB954; color:#fff; box-shadow: 0 6px 16px -8px rgba(0,0,0,.35); }
  .spotify-btn:hover{ background:#169c46; }
  .lyrics-box{ max-width: 560px; margin: 10px auto 22px; padding: 22px 26px; border: 1.5px solid var(--gold); border-radius: 14px; background: var(--paper); direction: rtl; text-align: center; }
  .lyrics-box .stanza{ font-family: var(--serif-he); font-size: 19px; line-height: 1.85; color: var(--wine-deep); margin: 0 0 18px; }
  .lyrics-box .stanza:last-of-type{ margin-bottom: 6px; }
  .lyrics-credit{ direction: rtl; text-align: center; font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 0; }
  table.verb-table{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 16px; margin-top:10px; }
  table.verb-table th{ background: var(--wine-deep); color:#fff; padding: 8px 6px; font-size: 14px; font-weight:600; }
  table.verb-table td{ padding: 8px 4px; border-bottom: 1px solid #EADFC2; text-align:center; }
  table.verb-table td.num{ color: var(--ink-soft); font-family: var(--sans-en); font-size: 13px; width: 28px; }
  table.verb-table input.pcell{ width: 100%; box-sizing: border-box; border: 1.5px solid #D9CBA8; border-radius: 8px; padding: 7px 6px; font-family: var(--sans-he); font-size: 16px; text-align:center; direction: rtl; background:#fff; color: var(--wine-deep); }
  table.verb-table input.pcell:focus{ border-color: var(--wine); outline:none; }
  .model-list{ display:none; direction: rtl; margin-top: 14px; }
  .model-list table{ width:100%; border-collapse: collapse; font-family: var(--sans-he); font-size: 16px; }
  .model-list th{ background: var(--gold-soft); color: var(--wine-deep); padding: 7px 6px; font-size: 14px; }
  .model-list td{ padding: 7px 6px; border-bottom: 1px solid #EADFC2; text-align:center; color: var(--wine-deep); }
  .pt-box{ max-width: 480px; margin: 4px auto 20px; border: 1.5px solid var(--gold); border-radius: 12px; background: var(--paper); overflow:hidden; }
  .pt-toggle{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; padding:12px; background: var(--gold-soft); border:none; border-bottom: 1.5px solid var(--gold); cursor:pointer; font-size:15px; font-weight:700; color: var(--wine-deep); font-family: inherit; }
  .pt-toggle .pt-chevron{ flex-shrink:0; transition: transform .2s ease; }
  .pt-toggle.open .pt-chevron{ transform: rotate(180deg); }
  .pt-body{ padding: 16px 18px; font-size:16px; line-height:1.8; color: var(--wine-deep); text-align:right; }
  .pt-body p{ margin: 0 0 10px; font-family: var(--sans-he); line-height: 1.85; }
  .pt-body p:last-child{ margin-bottom: 0; }
  .pt-body p .spk{ font-weight: 700; color: var(--wine-deep); }
  table.practice-conj{ width:100%; border-collapse: collapse; font-family: var(--sans-he); direction: rtl; font-size: 16px; }
  table.practice-conj th{ background: var(--wine-deep); color:#fff; padding: 8px 6px; font-size: 14px; font-weight:600; }
  table.practice-conj td{ padding: 6px 4px; border-bottom: 1px solid #EADFC2; text-align:center; }
  table.practice-conj td.pron{ font-weight:700; color: var(--wine-deep); background: #EAF3FB; }
  table.practice-conj input.pcell{ width: 92%; direction: rtl; font-family: var(--sans-he); font-size: 16px; border:none; border-bottom: 2px solid #C9BB92; background: transparent; text-align:center; padding: 4px 2px; outline:none; }
  table.practice-conj input.pcell:focus{ border-color: var(--wine); }
  table.practice-conj input.pcell.correct{ border-color: var(--sage); background: var(--sage-soft); }
  table.practice-conj input.pcell.incorrect{ border-color: var(--error); background: #FBE7E4; }
  .am-verb{ border: 1.5px solid var(--sky); border-radius: var(--radius); background: var(--paper); margin: 4px 0 22px; overflow:hidden; }
  .am-verb .am-head{ display:flex; direction: rtl; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:#EDEBFA; padding: 10px 14px; border-bottom: 2px solid var(--sky); }
  .am-verb .am-inf{ font-family: var(--sans-he); font-size: 22px; font-weight:700; color: var(--wine-deep); direction: rtl; }
  .am-verb .am-binyan{ display:flex; align-items:center; gap:8px; font-family: var(--sans-en); font-size: 14px; color: #26215C; }
  .am-verb .am-binyan input{ width: 150px; border: 1.5px solid #D9CBA8; border-radius: 8px; padding: 6px 8px; font-family: var(--sans-he); font-size: 16px; text-align:center; direction: rtl; background:#fff; color: var(--wine-deep); }
  .am-verb .am-binyan input:focus{ outline:none; border-color: var(--wine); }
  .am-verb .am-binyan input.correct{ border-color: var(--sage); background: var(--sage-soft); }
  .am-verb .am-binyan input.incorrect{ border-color: var(--error); background: #FBE7E4; }
  .am-verb table.practice-conj{ margin: 0; }
  .am-verb .am-actions{ padding: 10px 14px 14px; }
  table.practice-conj input.pcell.shown{ border-color: var(--gold); background: var(--gold-soft); }
  .am-q{ border: 1px solid #EADFC2; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: #FFFDF6; }
  .am-q .am-qtext{ font-family: var(--sans-he); font-size: 18px; color: var(--wine-deep); direction: rtl; text-align: right; margin-bottom: 8px; line-height: 1.6; }
  .am-q .am-qtext .am-num{ color: var(--gold); font-weight:700; margin-inline-end: 6px; }
  .am-q .am-word{ display:inline-block; background: var(--gold-soft); border: 1px solid var(--gold); color: var(--wine-deep); border-radius: 999px; padding: 2px 10px; font-size: 14px; margin-inline-start: 8px; vertical-align: middle; }
  .am-q textarea.free{ margin-top: 0; }
  .am-q .model-sentence{ font-size: 16px; line-height: 1.8; }

  /* ---- unit 03 (podcast: work and private life) — the מבחינת inflection grid + examples ---- */
  .mib-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 0 18px; max-width: 480px; margin: 6px auto 4px; direction: rtl; }
  .mib-grid .vf-row{ display:grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid #EADFC2; }
  .mib-grid .vf-row .pron{ font-family: var(--sans-he); font-size: 14px; color: var(--ink-soft); }
  .mib-grid .vf-row .form{ font-family: var(--sans-he); font-size: 19px; color: var(--wine-deep); direction: rtl; text-align: right; }
  .mib-ex{ max-width: 560px; margin: 8px auto 0; }
  .mib-ex .ex-row{ padding: 8px 4px; border-bottom: 1px dashed #EADFC2; }
  .mib-ex .ex-he{ font-family: var(--sans-he); font-size: 18px; color: var(--wine-deep); direction: rtl; text-align: right; }
  .mib-ex .ex-en{ font-family: var(--sans-en); font-size: 14px; color: var(--ink-soft); direction: ltr; text-align: left; margin-top: 2px; }
  @media (max-width: 520px){ .mib-grid{ grid-template-columns: 1fr; } }

  /* ---- unit 08 (podcast: imperative 1) — imperative table ---- */
  table.imp-ex td.given{ font-family: var(--sans-he); font-size: 16px; color: var(--wine-deep); text-align: right; padding-inline-start: 8px; }
  table.imp-ex th:first-child{ text-align: right; }
