:root{
  --bg:#f6f8fc;
  --surface:#ffffff;
  --ink:#18253b;
  --muted:#6f7c90;
  --line:#e5e9f1;

  --brand:#6558e8;
  --brand-2:#3f80d8;
  --heading:#5147b8;
  --heading-bg:#f0efff;
  --heading-bg-2:#f8f8ff;

  --nom:#23886a;
  --akk:#cf4c63;
  --akk-bg:#fff1f3;
  --question:#3974c7;
  --question-bg:#eff5ff;
  --note:#fff9e8;
  --note-line:#ead89d;

  --shadow:0 18px 48px rgba(38,53,79,.075);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  padding-bottom:0;
  color:var(--ink);
  font-family:"Segoe UI",Tahoma,Arial,sans-serif;
  background:
    radial-gradient(circle at 88% 0,#eeedff 0,transparent 26rem),
    radial-gradient(circle at 0 34%,#eef9f5 0,transparent 28rem),
    var(--bg);
}
a{color:inherit}
button{font:inherit}
.arabic{
  direction:rtl;
  text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
}

.topbar{
  position:sticky;top:0;z-index:50;height:68px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 28px;
  border-bottom:1px solid rgba(229,233,241,.96);
  background:rgba(246,248,252,.9);
  backdrop-filter:blur(16px);
}
.brand{display:flex;align-items:center;gap:11px;font-weight:900}
.logo{
  width:40px;height:40px;border-radius:14px;display:grid;place-items:center;
  color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand-2));
  box-shadow:0 12px 28px rgba(101,88,232,.24)
}
.top-actions{display:flex;align-items:center;gap:10px}
.level{
  padding:7px 10px;border-radius:999px;background:#f0efff;
  color:var(--heading);font-size:11px;font-weight:900;letter-spacing:.08em
}
.ghost-btn{
  border:1px solid var(--line);background:#fff;color:var(--ink);
  border-radius:12px;padding:9px 12px;cursor:pointer;font-weight:750
}

.shell{max-width:1500px;margin:auto;padding:0 28px 80px}
.hero{padding:28px 0 18px}
.hero-card{
  position:relative;overflow:hidden;
  border:1px solid #e1e2ff;
  background:linear-gradient(120deg,#fff 0%,#fbfbff 56%,#f1f0ff 100%);
  border-radius:30px;padding:36px 40px 30px;box-shadow:var(--shadow)
}
.hero-card:after{
  content:"";position:absolute;width:260px;height:260px;border-radius:50%;
  right:-95px;top:-120px;
  background:linear-gradient(135deg,rgba(101,88,232,.16),rgba(63,128,216,.05))
}
.eyebrow{color:var(--heading);font-size:10px;font-weight:900;letter-spacing:.16em}
.eyebrow{margin:0}
.hero-head,.step-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.step-head{margin-bottom:8px}
.title-levels{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.lvl-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;height:24px;padding:0 10px;border-radius:999px;
  background:#f2efff;border:1px solid #ddd7ff;color:#5f51d6;
  font-size:10px;font-weight:900;letter-spacing:.06em;line-height:1
}
.title-row{display:flex;align-items:baseline;gap:14px;flex-wrap:nowrap;margin-top:10px}
h1{
  margin:0;color:var(--heading);
  font-size:clamp(48px,6vw,78px);line-height:.95;letter-spacing:-.055em;
}
.ar-title{
  margin-left:auto;
  font-size:29px;font-weight:900;color:var(--nom);
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif
}
.hero-text{
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  max-width:840px;margin:18px 0 0 auto;line-height:2;color:#465873;font-size:15px
}
.hero-meta{display:flex;gap:10px;flex-wrap:nowrap;margin-top:20px}
.pill{
  padding:8px 11px;border-radius:999px;background:#fff;border:1px solid var(--line);
  font-size:11px;font-weight:750;color:var(--muted)
}
.progress-wrap{
  position:fixed;
  left:0;
  right:0;
  bottom:var(--lesson-progress-footer-offset, 0px);
  top:auto;
  transform:none;
  z-index:60;
  width:100%;
  margin:0;
  background:rgba(255,255,255,.97);
  border:0;
  border-top:1px solid var(--line);
  border-radius:0;
  padding:7px 22px 8px;
  box-shadow:0 -8px 24px rgba(38,53,79,.08);
  backdrop-filter:blur(12px)
}
.progress-head{display:flex;justify-content:space-between;gap:14px;font-size:10px;color:var(--muted);margin-bottom:5px}
.progress{height:5px;background:#eef1f6;border-radius:999px;overflow:hidden}
.progress span{
  display:block;width:11.11%;height:100%;
  background:linear-gradient(90deg,var(--brand),var(--brand-2));border-radius:999px;
  transition:width .25s ease
}

.lesson-layout{
  display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;margin-top:20px
}
.lesson-nav{
  align-self:start;position:sticky;top:88px;
  padding:13px;border-radius:18px;border:1px solid var(--line);
  background:rgba(255,255,255,.92);backdrop-filter:blur(10px);
  box-shadow:0 14px 38px rgba(38,53,79,.05)
}
.lesson-nav small{
  display:block;color:#98a3b3;font-size:9px;font-weight:900;letter-spacing:.14em;
  padding:4px 8px 9px
}
.lesson-nav a{
  display:flex;align-items:flex-start;gap:10px;text-decoration:none;
  color:var(--muted);font-size:13px;padding:10px 9px;border-radius:10px;line-height:1.35
}
.lesson-nav a:hover,.lesson-nav a.active{background:#f3f2ff;color:var(--heading)}
.nav-num{
  width:25px;height:25px;border-radius:8px;display:grid;place-items:center;
  font-size:9px;font-weight:900;background:#eceaff;color:var(--heading)
}

.nav-label{display:block;min-width:0;flex:1}
.nav-de{display:block;color:#4b5870;font-weight:800}
.lesson-nav a.active .nav-de,.lesson-nav a:hover .nav-de{color:var(--heading)}
.nav-ar{
  display:block;margin-top:3px;direction:rtl;text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
  color:var(--nom);font-size:11.5px;font-weight:750;line-height:1.5
}

.flow{position:relative}
.flow:before{
  content:"";position:absolute;left:18px;top:12px;bottom:0;width:2px;
  background:linear-gradient(var(--brand),#dce1ed)
}
.step{
  position:relative;padding-left:54px;margin-bottom:18px;scroll-margin-top:92px
}
.step-dot{
  position:absolute;left:0;top:5px;width:38px;height:38px;border-radius:50%;
  background:#fff;border:2px solid var(--brand);display:grid;place-items:center;
  color:var(--brand);font-weight:900;z-index:3;
  box-shadow:0 8px 22px rgba(101,88,232,.12)
}
.step-card{
  background:#fff;border:1px solid var(--line);border-radius:22px;
  padding:26px 28px;box-shadow:0 16px 40px rgba(38,53,79,.055)
}
.step-kicker{
  color:var(--brand);font-size:9px;font-weight:900;letter-spacing:.13em;margin-bottom:0
}

/* FULL highlight, not a marker stripe */
.section-title{
  width:100%;
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:7px;
  margin:0;
  padding:9px 14px 10px;
  border-radius:12px;
  color:var(--heading);
  background:linear-gradient(90deg,var(--heading-bg),var(--heading-bg-2));
  border:1px solid #e3e0ff;
  box-shadow:inset 4px 0 0 var(--brand);
  font-size:25px;
  line-height:1.18;
  font-weight:900;
}
.section-title .tno{color:var(--brand);font-weight:950}
.section-title .de-main{display:inline-block}
.section-title .ar-inline{display:inline-block;direction:rtl;text-align:right;font-family:Tahoma,"Segoe UI",Arial,sans-serif;color:var(--nom);font-size:.78em;font-weight:900;margin-left:auto;white-space:nowrap}
.step-ar{
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  color:var(--nom);font-weight:850;font-size:14px;margin-top:9px
}

.explain{
  margin-top:15px;
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  line-height:2.05;color:#344861;
  background:#fbfbff;border-right:4px solid var(--brand);
  border-radius:14px;padding:15px 16px
}
.explain + .explain{margin-top:11px}
.note{
  margin-top:13px;background:var(--note);border:1px solid var(--note-line);
  border-radius:14px;padding:14px 15px;
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  color:#675e3a;line-height:1.9
}
.subhead-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:24px 0 12px;
  padding:8px 12px;
  border:0;
  border-radius:0;
  background:#ffe45c
}

.subhead{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:#26364f;
  font-size:17px;
  font-weight:900;
  line-height:1.4
}


.step-card > .subhead{
  display:block;
  width:100%;
  margin:24px 0 12px;
  padding:8px 14px;
  background:#ffe45c;
  color:#26364f;
  border-radius:0;
  font-size:17px;
  font-weight:900;
  line-height:1.45;
  box-shadow:none
}

.subhead.arabic{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--nom);
  font-size:15px;
  font-weight:900;
  line-height:1.5;
  direction:rtl;
  text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif
}

.pairs{display:grid;gap:11px;margin-top:16px}
.pair{
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);
  align-items:center;
  gap:10px;
  border:1px solid #e7eaf2;
  border-radius:13px;
  padding:10px 12px;
  background:#fcfdff
}
.sentence{
  border:0;
  border-radius:10px;
  padding:10px 12px;
  background:transparent
}
.sentence.answer-side{background:#fff9fa}
.pair .sentence:first-child{background:#f7faff}
.de{font-size:16px;font-weight:750;line-height:1.65}
.ar{
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  color:#758298;font-size:13px;line-height:1.8;margin-top:5px
}
.arrow{display:grid;place-items:center;color:var(--akk);font-weight:900}
.qword{
  color:var(--question);font-weight:900;background:var(--question-bg);
  border-radius:7px;padding:1px 4px
}
.nom{
  color:var(--nom);font-weight:900;background:#eef9f5;border-radius:6px;padding:1px 4px
}
.akk-phrase{
  background:var(--akk-bg);border-radius:7px;padding:2px 5px;
  box-decoration-break:clone;-webkit-box-decoration-break:clone;
}
.changed{color:var(--akk);font-weight:950}
.akk-word{color:var(--akk);font-weight:900}

.compare{
  display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:16px
}
.compare-box{
  border:1px solid var(--line);border-radius:16px;padding:16px
}
.nom-box{background:#eff9f4;border-top:4px solid var(--nom)}
.akk-box{background:#fff1f3;border-top:4px solid var(--akk)}
.compare-box .label{font-size:10px;font-weight:900;letter-spacing:.08em}
.compare-box p{margin:8px 0 0}

.rule-strip{
  display:flex;gap:8px;flex-wrap:nowrap;margin-top:15px
}
.rule-chip{
  border:1px solid var(--line);background:#fcfdff;border-radius:12px;padding:9px 11px;
  font-weight:850
}
.rule-chip strong{color:var(--akk)}

table{
  width:100%;border-collapse:separate;border-spacing:0;margin-top:14px;
  border:1px solid var(--line);border-radius:16px;overflow:hidden
}
th,td{
  padding:12px 13px;border-bottom:1px solid var(--line);
  border-right:1px solid var(--line);vertical-align:top;text-align:left
}
th:last-child,td:last-child{border-right:none}
tr:last-child td{border-bottom:none}
th{background:#f7f8ff;color:#435270;font-size:13px}
td .ar{margin-top:4px;font-size:12px}
.table-change{color:var(--akk);font-weight:950;background:var(--akk-bg);border-radius:6px;padding:1px 4px}

.examples-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px
}
.example-card{
  border:1px solid #e7eaf2;
  border-radius:13px;
  padding:14px 16px;
  background:#fcfdff;
  box-shadow:0 5px 16px rgba(38,53,79,.025)
}
.example-card .tag{
  display:inline-block;margin-bottom:7px;padding:4px 7px;border-radius:999px;
  background:#f0efff;color:var(--heading);font-size:9px;font-weight:900;letter-spacing:.08em
}

.verb-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px
}
.verb-card{
  border:1px solid #e6e9f3;
  border-radius:14px;
  padding:14px 16px;
  background:linear-gradient(180deg,#ffffff 0%,#fcfdff 100%);
  box-shadow:0 6px 18px rgba(38,53,79,.03)
}
.verb-card b{
  color:var(--heading);
  display:block;
  margin-bottom:8px;
  font-size:18px;
  line-height:1.5
}
.verb-card .de{
  font-size:17px;
  font-weight:800;
  color:#243548;
  margin-bottom:6px
}
.verb-card .ar{
  direction:rtl;
  text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
  color:var(--muted);
  font-size:14px;
  line-height:1.85
}

.preps{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px
}
.prep{
  border:1px solid var(--line);background:#fbfcfe;border-radius:13px;padding:11px
}
.prep b{display:block;color:var(--nom);font-size:16px}
.prep.secondary b{color:#65758a}

.mistake{
  margin-top:15px;border:1px solid #f1c9ce;background:#fff5f6;border-radius:15px;padding:14px
}
.wrong{color:var(--akk);font-weight:900}
.right{color:var(--nom);font-weight:900}

.quiz{
  margin-top:15px;background:linear-gradient(135deg,#f6f2ff,#fff);
  border:1px solid #e3ddff;border-radius:17px;padding:17px
}
.quiz + .quiz{margin-top:12px}
.quiz-q{font-size:18px;font-weight:850}
.opts{display:flex;gap:8px;flex-wrap:nowrap;margin-top:11px}
.opt{
  border:1px solid var(--line);background:#fff;border-radius:11px;
  padding:9px 14px;cursor:pointer;font-weight:800
}
.opt:hover{border-color:#c9c2ff}
.opt.good{background:#edf8f3;border-color:#b9dece;color:#17694f}
.opt.bad{background:#fff0f1;border-color:#edc5ca;color:#a23845}
.feedback{
  direction:rtl;text-align:right;font-family:Tahoma,Arial,sans-serif;
  color:var(--muted);font-size:12px;margin-top:10px;min-height:20px
}

.summary{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px
}
.summary > div{
  border:1px solid var(--line);background:#fbfcfe;border-radius:15px;padding:13px
}
.summary strong{display:block;color:var(--heading);margin-bottom:5px}


@media(max-width:980px){
  .lesson-layout{grid-template-columns:1fr}
  .lesson-nav{display:none}
  .preps{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:720px){
  .subhead-row{
    flex-wrap:nowrap;
    gap:6px 12px
  }
  .subhead.arabic{
    margin-left:auto
  }

  .ar-title{width:100%;margin-left:0;text-align:right}
  .progress-wrap{
    bottom:var(--lesson-progress-footer-offset, 0px);
    width:100%;
    border-radius:0;
    padding:6px 10px 7px
  }
  .topbar{padding:0 16px}.level{display:none}
  .shell{padding:0 14px 58px}
  .hero-card{padding:27px 20px;border-radius:24px}
  .step{padding-left:46px}.flow:before{left:15px}
  .step-dot{width:32px;height:32px;font-size:12px}
  .step-card{padding:20px 16px}
  .pair,.compare,.examples-grid,.verb-grid,.summary{grid-template-columns:1fr}
  .arrow{transform:rotate(90deg);height:24px}
  .preps{grid-template-columns:1fr 1fr}
  .section-title{
  width:100%;font-size:21px;padding:8px 11px 9px}
  .section-title .ar-inline{width:100%;margin-left:0;white-space:normal}
  .hero-head,.step-head{gap:6px}
  .lvl-badge{min-width:31px;height:22px;padding:0 8px;font-size:9px}
  th,td{padding:10px 9px}
}


/* v6: expanded pedagogical components */
:root{
  --dat:#a66018;
  --dat-bg:#fff5e9;
  --info:#3567b0;
  --info-bg:#f2f6ff;
  --info-line:#cfdcf4;
}
.important-note{
  margin-top:15px;
  border:1px solid var(--info-line);
  border-right:4px solid var(--info);
  background:var(--info-bg);
  border-radius:14px;
  padding:14px 15px;
  direction:rtl;
  text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
  color:#405577;
  line-height:1.95;
}
.important-note .note-title{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:7px;
  color:var(--info);
  font-weight:900;
  margin-bottom:5px;
}
.dat{
  color:var(--dat);
  font-weight:900;
  background:var(--dat-bg);
  border-radius:6px;
  padding:1px 4px;
}
.deep-explain{
  margin-top:14px;
  border:0;
  border-radius:12px;
  background:#fafbff;
  padding:14px 15px;
}
.deep-explain .de-rule{
  color:var(--heading);
  font-weight:900;
  margin-bottom:7px;
}
.deep-explain .ar-rule{
  direction:rtl;
  text-align:right;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
  color:#44566f;
  line-height:2;
}
.contrast-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.contrast-card{
  border:1px solid var(--line);
  border-radius:15px;
  padding:14px;
  background:#fbfcfe;
}
.contrast-card.good-side{border-top:4px solid var(--nom)}
.contrast-card.bad-side{border-top:4px solid var(--akk)}
.formula{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  border:1px dashed #cbc6f4;
  background:#faf9ff;
  color:var(--heading);
  font-weight:900;
}
.formula .ar{
  margin-top:6px;
  color:#65718a;
}
.mini-list{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
}
.mini-list li{
  border:1px solid var(--line);
  background:#fbfcfe;
  border-radius:12px;
  padding:10px 12px;
}
.mini-list .ar{
  margin-top:4px;
}
.section-divider{
  height:1px;
  background:var(--line);
  margin:18px 0;
}
.exercise-label{
  color:var(--brand);
  font-size:10px;
  letter-spacing:.08em;
  font-weight:900;
  margin-bottom:7px;
}
@media(max-width:720px){
  .contrast-row{grid-template-columns:1fr}
}


/* v11.3: simplified Wohin/Wo comparison */
.compact-formula{margin-top:14px}
.compact-formula > div + div{margin-top:4px}
.wohin-table td:first-child,
.wohin-table th:first-child{
  width:110px;
  white-space:nowrap;
  font-weight:900;
}
.wohin-table td:nth-child(2){
  font-size:16px;
  font-weight:780;
  line-height:1.8;
}
.wohin-table td:nth-child(3){
  width:34%;
}
.less-busy{
  background:#fbfbff;
  border:1px solid #e7eaf2;
}
@media(max-width:720px){
  .wohin-table td:first-child,
  .wohin-table th:first-child,
  .wohin-table td:nth-child(3){width:auto}
}


/* v11.5: inline grammar keywords = color only (no highlight) */
.hero-text b,
.explain b,
.deep-explain b,
.important-note b,
.formula b,
.ar-rule b,
.step-ar b,
.note b{
  color: #3558b8;
  background: transparent;
  border-radius: 0;
  padding: 0;
  font-weight: 900;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}


/* ==========================================================
   DeuSall Laravel integration / responsive compatibility
   This block does not redesign lesson content. It only makes
   the approved Aurora Flow layout coexist safely with the
   platform shell, mobile screens and PDF printing.
   ========================================================== */
.grammar-studio-page .shell{min-width:0}
.grammar-studio-page .flow,
.grammar-studio-page .step-card,
.grammar-studio-page .lesson-layout{min-width:0}
.grammar-studio-page img,
.grammar-studio-page svg{max-width:100%;height:auto}

@media(max-width:720px){
  .grammar-studio-page .title-row{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  .grammar-studio-page .hero-meta,
  .grammar-studio-page .rule-strip,
  .grammar-studio-page .opts,
  .grammar-studio-page .subhead-row{
    flex-wrap:wrap;
  }
  .grammar-studio-page .section-title{
    flex-wrap:wrap;
    overflow-wrap:anywhere;
  }
  .grammar-studio-page .step-card{
    overflow:hidden;
  }
  .grammar-studio-page table{
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .grammar-studio-page th,
  .grammar-studio-page td{
    min-width:max-content;
  }
}
@media(max-width:480px){
  .grammar-studio-page .preps{grid-template-columns:1fr}
  .grammar-studio-page .step{padding-left:40px}
  .grammar-studio-page .step-card{padding:18px 13px}
  .grammar-studio-page h1{font-size:clamp(38px,13vw,52px)}
  .grammar-studio-page .ar-title{font-size:23px}
}

@media print{
  @page{size:A4 portrait;margin:13mm 12mm 15mm}
  body{padding-bottom:0!important;background:#fff!important}
  .deusall-topbar,
  .site-footer,
  .consent-banner,
  .grammar-level-switcher,
  .grammar-lesson-pager,
  .progress-wrap,
  .lesson-nav{display:none!important}
  .grammar-studio-page .shell{
    max-width:none!important;
    padding:0!important;
  }
  .grammar-studio-page .hero{padding:0 0 10mm!important}
  .grammar-studio-page .hero-card{
    box-shadow:none!important;
    border-radius:18px!important;
    padding:18px 20px!important;
  }
  .grammar-studio-page .lesson-layout{display:block!important;margin:0!important}
  .grammar-studio-page .flow:before{display:none!important}
  .grammar-studio-page .step{
    padding-left:0!important;
    margin-bottom:6mm!important;
    break-inside:auto;
    page-break-inside:auto;
  }
  .grammar-studio-page .step-dot{display:none!important}
  .grammar-studio-page .step-card{
    box-shadow:none!important;
    break-inside:auto;
    page-break-inside:auto;
    padding:17px 18px!important;
  }
  .grammar-studio-page .example-card,
  .grammar-studio-page .important-note,
  .grammar-studio-page .note,
  .grammar-studio-page .quiz,
  .grammar-studio-page .compare-box,
  .grammar-studio-page .verb-card{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  .grammar-studio-page table{
    break-inside:auto;
    page-break-inside:auto;
  }
  .grammar-studio-page tr{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  *{
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
}


/* ================================================================
   DeuSall v11.2.7 — Lesson progress / footer collision fix
   JS updates --lesson-progress-footer-offset while the footer enters
   the viewport. The fixed progress bar therefore stays directly
   above the footer instead of overlaying it.
   ================================================================ */
.grammar-studio-page .progress-wrap{
  will-change:bottom;
}


/* ================================================================
   DeuSall v11.2.7.1 — Footer true-bottom alignment
   The old grammar stylesheet reserved 56px on BODY for the fixed
   progress bar. That space sits *after* the footer and therefore
   lifts the footer away from the real bottom of the document.
   The lesson shell already has its own bottom clearance (80px).
   ================================================================ */
body.deusall-public-body:has(.grammar-studio-page){
  padding-bottom:0 !important;
}

.grammar-studio-page .shell{
  padding-bottom:max(80px, calc(48px + env(safe-area-inset-bottom))) !important;
}

/* Footer itself must end the document with no artificial bottom gap. */
body.deusall-public-body:has(.grammar-studio-page) .public-site-footer{
  margin-bottom:0 !important;
}
