/* ============================================================
   THE EDUCATION HUB — "The Wednesday Edition"
   The weekly paper of The Calibrated Quarterly: same spine
   (Fraunces · Mukta · Plex Mono, warm paper, ink rules),
   marked throughout in a teacher's red pen.
   Shared by every page under /education-hub/.
   ============================================================ */
:root {
  --bg: #F4F2ED; --surface: #EDE9E0; --sand: #E7E2D6; --sand-2: #D9D4C8; --paper: #FBFAF7;
  --ink: #15171C; --muted: #5A5C63;
  --primary: #0B3D91; --accent: #E2552B; --ielts: #C8102E; --toefl: #6D28D9; --sea: #0E6E64; --gold-text: #8A5A0A;
  --tint-blue: #E9ECF4;
  --rule: rgba(21,23,28,0.14); --rule-soft: rgba(21,23,28,0.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Mukta", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --pad: clamp(1.25rem, 5vw, 6rem); --maxw: 1320px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* the red pen and the highlighter */
  --pen: #C8102E; --ok: #0E6E64; --hl: #FFE27A;
  /* ten sections, ten inks (each passes AA as text on the paper) */
  --p1: #C8102E; --p2: #0F766E; --p3: #8A5A0A; --p4: #BE185D; --p5: #6D28D9;
  --p6: #0B3D91; --p7: #3A4553; --p8: #B83E1A; --p9: #166534; --p10: #0369A1;
  --p: var(--primary);
}
.p1 { --p: var(--p1); } .p2 { --p: var(--p2); } .p3 { --p: var(--p3); } .p4 { --p: var(--p4); } .p5 { --p: var(--p5); }
.p6 { --p: var(--p6); } .p7 { --p: var(--p7); } .p8 { --p: var(--p8); } .p9 { --p: var(--p9); } .p10 { --p: var(--p10); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: clamp(84px, 10vh, 110px); }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: clamp(1rem, 0.6vw + 0.92rem, 1.08rem); line-height: 1.62; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--hl); }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
img, svg { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
main, section, footer { position: relative; z-index: 2; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.en { direction: ltr; unicode-bidi: isolate; }
/* English inside an Arabic page reads in the Latin body face, unless the element sets its own (kept at low priority on purpose) */
:where([lang="ar"]) .en { font-family: "Mukta", system-ui, sans-serif; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--sans); font-weight: 600; font-size: 0.9rem; padding: 0.72rem 1.2rem; border: 1.5px solid var(--ink); white-space: nowrap; position: relative; overflow: hidden; cursor: pointer; background: transparent; color: var(--ink); isolation: isolate; transition: color .28s var(--ease), border-color .28s var(--ease), filter .28s var(--ease), background .28s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); z-index: -1; }
[dir="rtl"] .btn::before { transform-origin: right; }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--bg); }
.btn--ghost:hover::before, .btn--ghost:focus-visible::before { transform: scaleX(1); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--ink::before { content: none; }
.btn--ink:hover, .btn--ink:focus-visible { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--wa { background: #25D366; border-color: #1FB855; color: #0B2E17; }
.btn--wa::before { content: none; }
.btn--wa:hover { filter: brightness(0.95); }
.btn--paper { background: var(--bg); border-color: var(--bg); color: var(--ink); }
.btn--paper::before { content: none; }
.btn--paper:hover, .btn--paper:focus-visible { background: var(--hl); border-color: var(--hl); }
.btn .arrow { transition: transform .28s var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* ============================================================
   NAV — the site masthead (same as every other page)
   ============================================================ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg); transition: box-shadow .4s var(--ease); }
.nav__inner { max-width: var(--maxw); margin-inline: auto; padding: 0.85rem var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; line-height: 1; }
.brand__name { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: clamp(1.3rem, 3.6vw, 1.7rem); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.nav__right { display: flex; align-items: center; gap: 1.6rem; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { font-size: 0.92rem; font-weight: 500; color: var(--ink); position: relative; padding-block: 0.2rem; white-space: nowrap; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0; background: var(--primary); transition: width .3s var(--ease); }
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }
.nav__links a.is-current { color: var(--primary); font-weight: 600; }
.nav__links a[href*="#ielts"]:not(.btn) { color: var(--ielts); }
.nav__links a[href*="#toefl"]:not(.btn) { color: var(--toefl); }
.nav__links a[href*="business-learning-hub"]:not(.btn) { color: var(--gold-text); }
@media (min-width: 1161px) and (max-width: 1360px) {
  .nav__right, .nav__links { gap: 0.95rem; }
  .nav__links a { font-size: 0.84rem; }
}
.nav__toggle { display: none; width: 48px; height: 48px; padding: 0; background: transparent; border: 1.5px solid var(--ink); cursor: pointer; position: relative; transition: background .3s var(--ease), border-color .3s var(--ease); }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .4s var(--ease), opacity .2s var(--ease), background .3s var(--ease); }
.nav__toggle span:nth-child(1) { top: 16px; } .nav__toggle span:nth-child(2) { top: 23px; } .nav__toggle span:nth-child(3) { top: 30px; }
.nav__toggle:hover { background: var(--tint-blue); }
.nav__toggle[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); }
.nav__toggle[aria-expanded="true"] span { background: var(--bg); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }
.nav__backdrop { position: fixed; inset: 0; background: rgba(21,23,28,0.30); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.nav__backdrop.show { opacity: 1; pointer-events: auto; }
.nav__menu-foot { display: none; }
.nav-age { display: none; }
@media (max-width: 1160px) {
  .nav__toggle { display: block; }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); padding: 0 var(--pad); max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); counter-reset: mnav; box-shadow: 0 24px 40px -28px rgba(21,23,28,0.45); }
  .nav__links.open { max-height: 88vh; overflow-y: auto; border-bottom: 2.5px solid var(--primary); padding-bottom: 1.4rem; }
  .nav__links > a { display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.02rem 0.15rem; border-top: 1px solid var(--rule); font-size: 1.3rem; font-family: var(--serif); font-weight: 500; color: var(--ink); opacity: 0; transform: translateX(-12px); transition: opacity .45s var(--ease), transform .45s var(--ease), color .2s var(--ease); white-space: normal; }
  .nav__links.open > a { opacity: 1; transform: none; }
  [dir="rtl"] .nav__links:not(.open) > a { transform: translateX(12px); }
  .nav__links.open > a:nth-child(1) { transition-delay: .07s; } .nav__links.open > a:nth-child(2) { transition-delay: .12s; }
  .nav__links.open > a:nth-child(3) { transition-delay: .17s; } .nav__links.open > a:nth-child(4) { transition-delay: .22s; }
  .nav__links.open > a:nth-child(5) { transition-delay: .27s; } .nav__links.open > a:nth-child(6) { transition-delay: .32s; }
  .nav__links.open > a:nth-child(7) { transition-delay: .37s; } .nav__links.open > a:nth-child(8) { transition-delay: .42s; }
  .nav__links > a:first-child { border-top: none; }
  .ev-link .nav-age { display: inline-block; flex: none; line-height: 1; white-space: nowrap; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); border: 1.5px solid color-mix(in srgb, var(--muted) 38%, transparent); border-radius: 999px; padding: 0.5em 0.8em; transform: translateY(0.13rem); }
  .nav__links > a::before { counter-increment: mnav; content: "0" counter(mnav); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--primary); width: 2.4ch; flex: none; animation: none; transform: none; margin: 0; }
  .nav__links > a::after { content: "\2192"; position: static; width: auto; height: auto; margin-inline-start: auto; font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--muted); background: none; transition: transform .25s var(--ease), color .25s var(--ease); }
  .nav__links > a:hover::after { transform: translateX(6px); color: var(--primary); width: auto; }
  [dir="rtl"] .nav__links > a::after { content: "\2190"; }
  [dir="rtl"] .nav__links > a:hover::after { transform: translateX(-6px); }
  .nav__menu-foot { display: flex; flex-wrap: wrap; gap: 0.55rem 1.4rem; align-items: center; margin-top: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
  .nav__menu-foot a { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
  .nav__menu-foot a::after { content: none; }
  .nav__menu-foot a:hover { color: var(--primary); }
}
@media (max-width: 480px) { .nav__inner { gap: 0.9rem; } .nav__right { gap: 0.9rem; } }
.nav__rule { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
[dir="rtl"] .nav__rule { transform-origin: right; }
.nav.is-set { box-shadow: 0 1px 0 var(--rule-soft); }
.nav.is-set .nav__rule { transform: scaleX(1); }
.ev-link { position: relative; }
.ev-link__txt { font-weight: 700; background: linear-gradient(110deg, #C2410C, #BE185D, #7C3AED, #1D4ED8, #0F766E, #C2410C); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: ewFlow 6s linear infinite; }
@media (min-width: 1161px) {
  .ev-link::before { content: "\2726"; margin-inline-end: 0.34rem; font-size: 0.84em; color: #BE185D; display: inline-block; animation: ewTwinkle 2.2s var(--ease) infinite; }
  .nav__links a.ev-link::after { content: none; }
}
@keyframes ewFlow { from { background-position: 0 center; } to { background-position: 200% center; } }
@keyframes ewTwinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: .4; transform: scale(.55) rotate(90deg); } }

.lang { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; direction: ltr; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--bg); line-height: 1; }
.lang__slide { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); background: var(--ink); border-radius: 999px; transition: left .38s var(--ease); }
.lang.is-ar .lang__slide { left: 50%; }
.lang__opt { position: relative; z-index: 1; background: none; border: none; cursor: pointer; text-align: center; color: var(--muted); transition: color .3s var(--ease); padding: 0.4rem 0.62rem; border-radius: 999px; }
.lang__opt[data-lang="en"] { font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; }
.lang__opt[data-lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 1.02rem; font-weight: 600; }
.lang__opt.is-on { color: var(--bg); }
.lang:hover .lang__opt:not(.is-on) { color: var(--ink); }

/* ---------- reveal · progress · back-to-top ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress__bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--p); }
[dir="rtl"] .progress__bar { transform-origin: right; }
.totop { position: fixed; inset-inline-end: clamp(1rem,3vw,2.2rem); bottom: clamp(1rem,3vw,2.2rem); width: 46px; height: 46px; border: 1.5px solid var(--ink); background: var(--bg); display: grid; place-items: center; z-index: 55; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease), background .25s var(--ease), color .25s var(--ease); }
.totop.show { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { background: var(--ink); color: var(--bg); }
.totop svg { width: 18px; height: 18px; }

/* ---------- shared heads ---------- */
.section-head { display: flex; align-items: center; gap: 1.1rem; border-top: 1px solid var(--rule); padding-top: 1.1rem; margin-bottom: clamp(1.4rem, 2.6vw, 2rem); }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 0.72rem; text-wrap: balance; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.25rem, 3.6vw, 2.3rem); letter-spacing: -0.014em; line-height: 1.05; color: var(--ink); }
.section-head .eyebrow::before { content: ""; flex: none; width: 1.9rem; height: 2px; border-radius: 2px; background: var(--pen); }
.section-head .eyebrow b { font-style: normal; font-weight: 600; color: var(--pen); }
.section-head__aside { margin-inline-start: auto; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: end; }
@media (max-width: 620px) {
  .section-head { flex-wrap: wrap; row-gap: 0.5rem; }
  .section-head__aside { margin-inline-start: 0; flex-basis: 100%; text-align: start; }
}
.kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kicker b { font-weight: 500; color: var(--pen); }

/* the section tab: number + name, in the section's ink */
.tab { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--p); line-height: 1.2; }
.tab b { display: inline-grid; place-items: center; min-width: 2.2em; padding: 0.3em 0.45em; background: var(--p); color: #fff; font-weight: 500; letter-spacing: 0.04em; }
a.tab:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   FRONT PAGE — the masthead, then a desk: a marked worksheet
   on the left and, on the right, the lesson that explains it
   ============================================================ */
.eh-front { padding-top: clamp(4.7rem, 9.4vh, 5.4rem); }
.eh-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1.4rem; border-block: 1px solid var(--ink); padding: 0.46rem 0; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink); }
.eh-strip b { font-weight: 500; color: var(--pen); }

.eh-plate { --f: clamp(2.7rem, 9.4vw, 7.2rem); position: relative; text-align: center; padding: clamp(1.7rem, 2.9vw, 2.3rem) 0 clamp(0.9rem, 1.6vw, 1.2rem); }
.eh-plate h1 { font-family: var(--serif); font-weight: 800; font-size: var(--f); line-height: 0.9; letter-spacing: -0.048em; font-optical-sizing: auto; }
.eh-plate h1 .the { font-style: italic; font-weight: 400; font-size: 0.46em; letter-spacing: -0.02em; vertical-align: 0.62em; margin-inline-end: 0.12em; }
.eh-plate h1 .u { position: relative; display: inline-block; }
.eh-plate h1 .u svg { position: absolute; left: -2%; right: -2%; bottom: -0.12em; width: 104%; height: 0.2em; overflow: visible; }
/* drawn strokes use pathLength="1" for the dash, so they must NOT use non-scaling-stroke: together the two leave long strokes half drawn */
.eh-plate h1 .u path { fill: none; stroke: var(--pen); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: penDraw 1.1s var(--ease) .5s forwards; }
/* the scribble starts above the last letters of the title and runs out to the right, clear of the type */
.eh-plate__hand { position: absolute; left: calc(50% + 2.72 * var(--f)); top: clamp(0.5rem, 1vw, 0.95rem); font-family: var(--hand); font-weight: 700; font-size: clamp(1.1rem, 2.1vw, 1.8rem); line-height: 1; color: var(--pen); white-space: nowrap; transform: rotate(-4deg); transform-origin: 0 100%; opacity: 0; animation: handIn .7s var(--ease) 1.25s forwards; }
[dir="rtl"] .eh-plate__hand { left: auto; transform: rotate(6deg); transform-origin: 100% 100%; }
.eh-plate__tag { margin-top: clamp(0.9rem, 1.9vw, 1.4rem); font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.8vw, 1.42rem); line-height: 1.3; color: var(--ink); text-wrap: balance; }
.eh-plate__tag b { font-style: normal; font-weight: 600; }
@media (max-width: 720px) { .eh-plate__hand, [dir="rtl"] .eh-plate__hand { position: static; display: block; margin-top: 0.7rem; transform: rotate(-3deg); transform-origin: 50% 50%; } }
/* "inside this edition": the paper's index line */
.eh-inside { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 0; margin-top: clamp(0.8rem, 1.6vw, 1.15rem); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.eh-inside__k { color: var(--pen); margin-inline-end: 0.9rem; }
.eh-inside a { padding: 0.28rem 0; border-bottom: 1.5px solid transparent; transition: border-color .25s var(--ease), color .25s var(--ease); }
.eh-inside a + a::before { content: "\00B7"; display: inline-block; margin-inline: 0.85rem; color: var(--muted); }
.eh-inside a:hover, .eh-inside a:focus-visible { color: var(--pen); }
.eh-inside a[lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 0.88rem; font-weight: 600; letter-spacing: 0; }
@media (max-width: 720px) {
  .eh-inside { gap: 0.15rem 1.15rem; }
  .eh-inside__k { flex-basis: 100%; margin: 0 0 0.1rem; }
  .eh-inside a + a::before { content: none; }
  .eh-inside a { border-bottom-color: var(--rule); }
  .eh-paper__sub { display: none; }
  .eh-deck__stack { padding-inline: 5% 7%; }
}

/* ---------- the desk ---------- */
.eh-desk { position: relative; isolation: isolate; overflow: hidden; background: var(--sand); border-top: 3px solid var(--ink); }
.eh-desk::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: 0.75; background-image: radial-gradient(rgba(21,23,28,0.2) 1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, transparent 30%, #000 100%); mask-image: radial-gradient(120% 100% at 50% 0%, transparent 30%, #000 100%); }
.eh-desk::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--ink); }
.eh-desk__in { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr); gap: clamp(2rem, 5.2vw, 5.4rem); align-items: center; padding-block: clamp(1.9rem, 2.9vw, 2.4rem) clamp(1.9rem, 2.8vw, 2.4rem); }
@media (max-width: 960px) { .eh-desk__in { grid-template-columns: 1fr; gap: 2.4rem; } }

/* ---------- the marked worksheet ---------- */
.eh-pile { position: relative; min-width: 0; }
.eh-pile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #F3EEE2; transform: rotate(1.7deg) translate(8px, 9px); box-shadow: 0 22px 34px -24px rgba(21,23,28,0.5); }
.eh-paper { position: relative; background: #FFFEFA; padding: 1rem clamp(1rem, 2.2vw, 1.8rem) 1.05rem clamp(2.5rem, 5vw, 4.3rem); transform: rotate(-0.7deg); box-shadow: 0 1px 0 rgba(21,23,28,0.08), 0 34px 54px -34px rgba(21,23,28,0.55); }
.eh-paper::after { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(1.9rem, 3.8vw, 3.3rem); width: 1.5px; background: rgba(200,16,46,0.36); pointer-events: none; }
.eh-paper__holes { position: absolute; top: 0; bottom: 0; left: clamp(0.45rem, 1.1vw, 0.95rem); width: 15px; pointer-events: none;
  background:
    radial-gradient(circle closest-side, var(--sand) 0 84%, rgba(21,23,28,0.22) 86% 97%, transparent 100%) center 15% / 15px 15px no-repeat,
    radial-gradient(circle closest-side, var(--sand) 0 84%, rgba(21,23,28,0.22) 86% 97%, transparent 100%) center 50% / 15px 15px no-repeat,
    radial-gradient(circle closest-side, var(--sand) 0 84%, rgba(21,23,28,0.22) 86% 97%, transparent 100%) center 85% / 15px 15px no-repeat; }
@media (max-width: 520px) { .eh-paper__holes { display: none; } }
.eh-paper__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--ink); }
.eh-paper__count { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; }
.eh-paper__count b { font-weight: 500; font-size: 1.3em; color: var(--pen); }

/* ruled lines that follow the sentence size, so the text always sits on a line */
.eh-lines { position: relative; --fs: clamp(1.7rem, 3.3vw, 3rem); }
.eh-mark__stage { direction: ltr; text-align: left; display: grid; align-content: start; min-height: 6em; padding-top: 1.5em; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: var(--fs); line-height: 1.5; letter-spacing: -0.024em;
  background: linear-gradient(transparent 1.2em, rgba(11,61,145,0.17) 1.2em, rgba(11,61,145,0.17) calc(1.2em + 1.5px), transparent calc(1.2em + 1.5px)) 0 0 / 100% 1.5em; }
@media (max-width: 960px) { .eh-mark__stage { min-height: 7.5em; } }
.eh-mark__s { grid-area: 1 / 1; text-wrap: balance; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.eh-mark__s.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.eh-x { position: relative; display: inline-block; transition: color .5s var(--ease) .95s; }
.is-on .eh-x { color: color-mix(in srgb, var(--ink) 42%, #FFFEFA); }
.eh-x__line { position: absolute; left: -6%; top: 50%; width: 112%; height: 0.5em; transform: translateY(-42%); overflow: visible; }
.eh-x__line path, .eh-tick path { fill: none; stroke: var(--pen); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.eh-x__line path { stroke-width: 3.6; }
.eh-tick path { stroke-width: 2.7; }
.is-on .eh-x__line path { animation: penDraw .55s var(--ease) .72s forwards; }
/* the pen that does the marking */
.eh-pen { position: absolute; left: -10%; top: 50%; width: 0.95em; height: 0.95em; margin: -0.9em 0 0 -0.05em; opacity: 0; pointer-events: none; overflow: visible; filter: drop-shadow(0 0.1em 0.07em rgba(21,23,28,0.28)); }
.is-on .eh-pen { animation: penSweep .92s cubic-bezier(.4,.1,.3,1) .56s both; }
.eh-fix { position: absolute; left: 50%; bottom: 80%; transform: translateX(-50%) rotate(-5deg); white-space: nowrap; font-family: var(--hand); font-weight: 700; font-size: 0.9em; line-height: 1; letter-spacing: 0; color: var(--pen); opacity: 0; }
.is-on .eh-fix { animation: fixWrite .5s cubic-bezier(.4,0,.2,1) 1.42s both; }
.eh-tick { display: inline-block; width: 0.74em; height: 0.74em; margin-inline-start: 0.14em; vertical-align: -0.04em; overflow: visible; }
.is-on .eh-tick path { animation: penDraw .5s var(--ease) 2.05s forwards; }
/* the teacher's note, written on the last line of the sheet */
.eh-mark__notes { position: absolute; inset-inline: 0; bottom: 0; height: 1.5em; font-size: var(--fs); display: grid; align-items: end; padding-bottom: 0.32em; pointer-events: none; }
.eh-note { grid-area: 1 / 1; display: flex; align-items: baseline; gap: 0.5rem; font-family: var(--hand); font-weight: 700; font-size: max(0.5em, 1.22rem); line-height: 1; color: var(--pen); opacity: 0; visibility: hidden; }
.eh-note::before { content: "\21B3"; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7em; }
[dir="rtl"] .eh-note::before { content: "\21B2"; }
.eh-note.is-on { visibility: visible; animation: handIn .6s var(--ease) 1.75s forwards; }

.eh-paper__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.1rem; padding-top: 0.9rem; }
.eh-ctl { display: flex; gap: 0.35rem; }
.eh-ctl button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.eh-ctl button:hover { background: var(--ink); color: #FFFEFA; }
.eh-ctl svg { width: 16px; height: 16px; }
.eh-ctl .ic-play, .eh-ctl [aria-pressed="true"] .ic-pause { display: none; }
.eh-ctl [aria-pressed="true"] .ic-play { display: block; }
[dir="rtl"] .eh-ctl .ic-arr { transform: scaleX(-1); }
.eh-dots { display: flex; gap: 0.2rem; direction: ltr; }
.eh-dots button { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.eh-dots button::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--sand-2); }
.eh-dots button::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--pen); transform: scaleX(0); transform-origin: left; }
.eh-dots button.is-on::after { transform: scaleX(1); }
.eh-desk.is-auto .eh-dots button.is-on::after { animation: dotFill var(--dur, 7s) linear forwards; }
.eh-desk.is-paused .eh-dots button.is-on::after { animation-play-state: paused; }
/* "the lesson that explains it": a hand-drawn pointer from the sheet to the lesson */
.eh-point { margin-inline-start: auto; display: flex; align-items: center; gap: 0.5rem; font-family: var(--hand); font-weight: 700; font-size: 1.34rem; line-height: 1; color: var(--pen); transform: rotate(-2.5deg); white-space: nowrap; }
.eh-point svg { flex: none; width: 54px; height: 22px; overflow: visible; }
.eh-point path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .eh-point svg { transform: scaleX(-1); }
@media (max-width: 960px) { .eh-point svg, [dir="rtl"] .eh-point svg { transform: rotate(68deg); } }

/* ---------- the lesson deck: the cover on top answers the sentence on the sheet ---------- */
.eh-deck { min-width: 0; }
.eh-deck__stack { display: grid; padding: 11.5% 5% 0 4%; }
.eh-deck__card { grid-area: 1 / 1; display: block; padding: clamp(6px, 0.7vw, 10px); background: #FFFEFA; box-shadow: 0 1px 0 rgba(21,23,28,0.08), 0 28px 42px -26px rgba(21,23,28,0.62); transform-origin: 50% 62%; z-index: 1; opacity: 0; pointer-events: none; transform: translate(1%, -17%) rotate(1deg) scale(0.86); transition: transform .8s var(--ease), opacity .5s var(--ease); }
.eh-deck__card > .cover { transform: none !important; }
.eh-deck__card.k0 { z-index: 10; opacity: 1; pointer-events: auto; transform: rotate(-2.2deg); }
.eh-deck__card.k1 { z-index: 9; opacity: 1; transform: translate(3.4%, -5.6%) rotate(2.8deg) scale(0.962); }
.eh-deck__card.k2 { z-index: 8; opacity: 1; transform: translate(-2.8%, -10.6%) rotate(-4.4deg) scale(0.925); }
.eh-deck__card.k3 { z-index: 7; opacity: 1; transform: translate(4.2%, -15%) rotate(5.2deg) scale(0.89); }
.eh-deck__card.k0:hover { transform: translateY(-2.2%) rotate(-1deg) scale(1.016); }
.eh-deck__card.is-leaving { animation: deckOut .95s cubic-bezier(.5,0,.25,1) both; }
@keyframes deckOut {
  0% { transform: rotate(-2.2deg); z-index: 12; opacity: 1; }
  40% { transform: translate(44%, -3%) rotate(12deg); z-index: 12; opacity: 1; }
  52% { transform: translate(44%, -10%) rotate(10deg) scale(0.92); z-index: 0; opacity: 1; }
  100% { z-index: 0; }
}
.eh-deck__caps { display: grid; margin-top: clamp(1.2rem, 2.2vw, 1.7rem); }
.eh-cap { grid-area: 1 / 1; display: grid; gap: 0.5rem; align-content: start; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s; }
.eh-cap.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: .18s, .18s, 0s; }
.eh-cap__t { font-family: var(--serif); font-weight: 600; font-size: clamp(1.32rem, 2vw, 1.72rem); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.eh-cap__t a { background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 0% 0.36em; transition: background-size .5s var(--ease); }
[dir="rtl"] .eh-cap__t a { background-position: 100% 88%; }
.eh-cap__t a:hover, .eh-cap__t a:focus-visible { background-size: 100% 0.36em; }
.eh-cap__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-top: 0.25rem; }
.eh-cap .card__meta { margin: 0; padding: 0; }

/* ---------- the corrections ticker ---------- */
.eh-ticker { direction: ltr; overflow: hidden; background: var(--ink); color: var(--bg); }
.eh-ticker__run { display: flex; width: max-content; animation: ehTick 48s linear infinite; }
.eh-ticker:hover .eh-ticker__run, .eh-front.is-held .eh-ticker__run { animation-play-state: paused; }
.eh-ticker__grp { flex: none; display: flex; align-items: center; gap: 1.5rem; padding: 0.62rem 0.75rem; font-family: "Fraunces", Georgia, serif; font-size: 1.04rem; white-space: nowrap; }
.eh-ticker s { color: rgba(244,242,237,0.6); text-decoration-color: #FF6B6B; text-decoration-thickness: 2px; }
.eh-ticker b { margin-inline-start: 0.55rem; font-family: "Caveat", "Segoe Print", cursive; font-weight: 700; font-size: 1.38em; line-height: 1; color: var(--hl); }
.eh-ticker i { font-style: normal; font-size: 0.6rem; color: rgba(244,242,237,0.4); }
@keyframes ehTick { to { transform: translateX(-50%); } }

@keyframes penDraw { to { stroke-dashoffset: 0; } }
@keyframes penSweep {
  0% { left: -12%; opacity: 0; transform: translateY(-0.2em) rotate(-8deg); }
  14% { left: -7%; opacity: 1; transform: translateY(0.03em) rotate(0deg); }
  50% { transform: translateY(-0.03em) rotate(2deg); }
  80% { left: 103%; opacity: 1; transform: translateY(-0.06em) rotate(4deg); }
  100% { left: 110%; opacity: 0; transform: translateY(-0.34em) rotate(9deg); }
}
@keyframes fixWrite { from { opacity: 1; clip-path: inset(-40% 100% -40% -6%); } to { opacity: 1; clip-path: inset(-40% -8% -40% -6%); } }
@keyframes handIn { from { opacity: 0; translate: 0 0.3em; } to { opacity: 1; translate: 0 0; } }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- covers (inline SVG posters) ---------- */
.cover { direction: ltr; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--p); transition: transform .9s var(--ease); }
.cover text { font-family: "Fraunces", Georgia, serif; }
.cover .m { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.cover .h { font-family: "Caveat", "Segoe Print", cursive; font-weight: 700; }
.cover .bg { fill: var(--p); }
.cover .dk { fill: color-mix(in srgb, var(--p) 80%, #000); }
.cover .lt { fill: color-mix(in srgb, var(--p) 62%, #F4F2ED); }
.cover .pa { fill: #F4F2ED; } .cover .ik { fill: #15171C; } .cover .yl { fill: #FFE27A; } .cover .pc { fill: var(--p); }
.cover .s-pa, .cover .s-yl, .cover .s-ik, .cover .s-pc { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cover .s-pa { stroke: #F4F2ED; } .cover .s-yl { stroke: #FFE27A; } .cover .s-ik { stroke: #15171C; } .cover .s-pc { stroke: var(--p); }
.cover .wm { fill: color-mix(in srgb, var(--p) 86%, #000); font-style: italic; font-weight: 400; }
a:hover > .cover, a:focus-visible > .cover { transform: scale(1.035); }

/* ---------- the thumb index (dictionary fore-edge tabs) ---------- */
.eh-thumb { display: none; }
@media (min-width: 1340px) {
  .eh-thumb { display: grid; gap: 3px; position: fixed; z-index: 30; inset-inline-end: 0; top: 50%; transform: translateY(-50%); justify-items: end; }
  .eh-thumb a { display: flex; align-items: center; flex-direction: row-reverse; height: 30px; max-width: 34px; overflow: hidden; white-space: nowrap; background: var(--p); color: #fff; border-start-start-radius: 9px; border-end-start-radius: 9px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.06em; transition: max-width .5s var(--ease), box-shadow .3s var(--ease); }
  .eh-thumb a b { flex: none; width: 34px; text-align: center; font-weight: 500; }
  .eh-thumb a span { padding-inline-start: 0.9rem; text-transform: uppercase; }
  .eh-thumb a:hover, .eh-thumb a:focus-visible { max-width: 340px; box-shadow: 0 8px 22px -10px rgba(21,23,28,0.6); }
  .eh-thumb a.is-current { max-width: 340px; }
}

/* ---------- the ten sections (contents page) ---------- */
.eh-block { padding-block: clamp(2.6rem, 6vw, 5rem); }
.eh-secs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.4rem, 4vw, 4rem); counter-reset: none; }
@media (max-width: 820px) { .eh-secs { grid-template-columns: 1fr; } }
.eh-sec { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.2rem clamp(0.9rem, 2vw, 1.5rem); align-items: baseline; padding: 1.05rem 0.9rem 1.1rem 1.15rem; border-bottom: 1px solid var(--rule); isolation: isolate; transition: color .3s var(--ease); }
[dir="rtl"] .eh-sec { padding: 1.05rem 1.15rem 1.1rem 0.9rem; }
.eh-sec::before { content: ""; position: absolute; z-index: -1; inset-block: -1px; inset-inline-start: 0; width: 5px; background: var(--p); transition: width .45s var(--ease); }
.eh-sec::after { content: ""; position: absolute; z-index: -2; inset: 0; background: color-mix(in srgb, var(--p) 9%, var(--bg)); opacity: 0; transition: opacity .35s var(--ease); }
.eh-sec:hover::after, .eh-sec:focus-visible::after { opacity: 1; }
.eh-sec:hover::before, .eh-sec:focus-visible::before { width: 9px; }
.eh-sec__no { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1; color: var(--p); min-width: 1.5em; }
.eh-sec__name { font-family: var(--serif); font-weight: 600; font-size: clamp(1.12rem, 1.6vw, 1.38rem); line-height: 1.2; letter-spacing: -0.012em; }
.eh-sec__n { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.eh-sec__d { grid-column: 2 / -1; color: var(--muted); font-size: 0.95rem; line-height: 1.5; max-width: 52ch; }

/* ---------- lessons: filter bar + grid ---------- */
.eh-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.eh-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.eh-chips__lab { align-self: center; font-family: var(--serif); font-style: italic; font-size: 1.1rem; margin-inline-end: 0.3rem; }
.chip { font-family: var(--sans); font-size: 0.86rem; font-weight: 500; line-height: 1; padding: 0.56rem 0.9rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.chip:hover { background: var(--sand); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip--ar { border-style: dashed; }
.eh-search { margin-inline-start: auto; position: relative; flex: 0 1 280px; min-width: 200px; }
.eh-search input { width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; padding: 0.5rem 0.2rem 0.5rem 1.9rem; font-size: 0.95rem; border-radius: 0; }
[dir="rtl"] .eh-search input { padding: 0.5rem 1.9rem 0.5rem 0.2rem; }
.eh-search input::placeholder { color: var(--muted); }
.eh-search input:focus { outline: none; border-color: var(--pen); }
.eh-search svg { position: absolute; inset-inline-start: 0.2rem; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); pointer-events: none; }
@media (max-width: 720px) { .eh-search { margin-inline-start: 0; flex: 1 1 100%; } }
.eh-count { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.eh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 3.4vw, 3rem) clamp(1.4rem, 2.8vw, 2.6rem); }
@media (max-width: 1020px) { .eh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .eh-grid { grid-template-columns: 1fr; } }
/* the lead lesson runs two columns wide; a "suggest a lesson" tile squares off the last row */
@media (min-width: 1021px) {
  .eh-grid:not(.is-filtered) > .card--lead { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0.8rem clamp(1.2rem, 2.4vw, 2.2rem); align-content: start; }
  .eh-grid:not(.is-filtered) > .card--lead .card__top { grid-column: 1 / -1; }
  .eh-grid:not(.is-filtered) > .card--lead .card__cover { grid-column: 1; grid-row: 2 / span 3; }
  .eh-grid:not(.is-filtered) > .card--lead .card__title, .eh-grid:not(.is-filtered) > .card--lead .card__ex, .eh-grid:not(.is-filtered) > .card--lead .card__meta { grid-column: 2; }
  .eh-grid:not(.is-filtered) > .card--lead .card__title { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.1; align-self: end; }
  .eh-grid:not(.is-filtered) > .card--lead .card__meta { margin-top: 0; align-self: start; }
  .eh-grid:not(.is-filtered) > .eh-tile--3 { display: flex; }
  .eh-tile--3w { grid-column: span 2; }
}
@media (min-width: 621px) and (max-width: 1020px) { .eh-grid:not(.is-filtered) > .eh-tile--2 { display: flex; } }
.eh-tile { display: none; flex-direction: column; justify-content: space-between; gap: 1.2rem; min-height: 13rem; padding: 1.2rem 1.3rem 1.3rem; border: 1.5px dashed var(--ink); background: var(--paper); transition: background .3s var(--ease), color .3s var(--ease); }
.eh-tile__t { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 1.9vw, 1.62rem); line-height: 1.2; letter-spacing: -0.014em; text-wrap: balance; }
.eh-tile__go { font-weight: 600; font-size: 0.95rem; }
.eh-tile:hover, .eh-tile:focus-visible { background: var(--ink); color: var(--bg); border-style: solid; }
.eh-tile:hover .kicker, .eh-tile:focus-visible .kicker { color: rgba(244,242,237,0.7); }
.eh-tile:hover .kicker b, .eh-tile:focus-visible .kicker b { color: var(--hl); }
/* a section with a single lesson so far: give it the width */
@media (min-width: 821px) {
  .eh-grid > .card:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 0.8rem clamp(1.4rem, 3.4vw, 3.4rem); align-content: start; }
  .eh-grid > .card:only-child .card__top { grid-column: 1 / -1; }
  .eh-grid > .card:only-child .card__cover { grid-column: 1; grid-row: 2 / span 3; }
  .eh-grid > .card:only-child .card__title, .eh-grid > .card:only-child .card__ex, .eh-grid > .card:only-child .card__meta { grid-column: 2; }
  .eh-grid > .card:only-child .card__title { font-size: clamp(1.7rem, 2.9vw, 2.6rem); line-height: 1.08; align-self: end; }
  .eh-grid > .card:only-child .card__ex { font-size: 1.08rem; }
  .eh-grid > .card:only-child .card__meta { margin-top: 0; align-self: start; }
}
.eh-empty { border: 1.5px dashed var(--sand-2); padding: 2rem; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

.card { position: relative; display: flex; flex-direction: column; gap: 0.7rem; border-top: 1.5px solid var(--ink); padding-top: 0.75rem; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.card__ar { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 0.74rem; font-weight: 600; line-height: 1; padding: 0.32rem 0.55rem; border: 1.5px solid var(--ink); border-radius: 999px; white-space: nowrap; transition: background .25s var(--ease), color .25s var(--ease); }
.card__ar:hover, .card__ar:focus-visible { background: var(--ink); color: var(--bg); }
.card__cover { display: block; overflow: hidden; background: var(--p); }
.card__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.22rem, 1.65vw, 1.46rem); line-height: 1.16; letter-spacing: -0.016em; text-wrap: balance; }
.card__title a { background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 0% 0.36em; transition: background-size .5s var(--ease); }
[dir="rtl"] .card__title a { background-position: 100% 88%; }
.card:hover .card__title a, .card__title a:focus-visible { background-size: 100% 0.36em; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__ar, .card .tab { position: relative; z-index: 1; }
.card__ex { color: var(--muted); font-size: 0.97rem; line-height: 1.55; text-wrap: pretty; }
.card__meta { margin-top: auto; padding-top: 0.3rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card__meta b { font-weight: 500; color: var(--ink); }
.card--row { flex-direction: row; gap: 1rem; }

/* ---------- the weekly corner ---------- */
.eh-weekly { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: stretch; }
@media (max-width: 900px) { .eh-weekly { grid-template-columns: 1fr; } }
.eh-chal { position: relative; background: var(--ink); color: var(--bg); padding: clamp(1.5rem, 3.4vw, 2.8rem); overflow: hidden; isolation: isolate; }
.eh-chal::before { content: "?"; position: absolute; z-index: -1; inset-inline-end: -0.06em; bottom: -0.34em; font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 900; font-size: clamp(14rem, 30vw, 24rem); line-height: 1; color: rgba(244,242,237,0.06); }
.eh-chal .kicker { color: rgba(244,242,237,0.7); }
.eh-chal .kicker b { color: var(--hl); }
.eh-chal h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0.7rem 0 1.2rem; text-wrap: balance; }
.eh-chal__q { direction: ltr; text-align: left; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.35; margin-bottom: 1.1rem; }
.eh-chal__q .gap { display: inline-block; min-width: 4.2em; border-bottom: 2px solid var(--hl); text-align: center; font-style: italic; color: var(--hl); }
.eh-chal__opts { display: flex; flex-wrap: wrap; gap: 0.6rem; direction: ltr; }
.eh-chal__opts button { font-family: "Fraunces", Georgia, serif; font-size: 1.12rem; font-style: italic; padding: 0.5rem 1.25rem; background: transparent; color: var(--bg); border: 1.5px solid rgba(244,242,237,0.55); cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.eh-chal__opts button:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.eh-chal__opts button.is-right { background: var(--hl); border-color: var(--hl); color: var(--ink); }
.eh-chal__opts button.is-wrong { text-decoration: line-through; text-decoration-color: #FF8A8A; opacity: 0.6; }
.eh-chal__fb { min-height: 3.4em; margin-top: 1rem; max-width: 50ch; color: rgba(244,242,237,0.86); }
.eh-chal__fb b { color: var(--hl); font-weight: 600; }
.eh-chal .btn { margin-top: 0.6rem; }

.eh-word { position: relative; background: var(--paper); border: 1px solid var(--rule); padding: clamp(1.5rem, 3.4vw, 2.6rem); box-shadow: 10px 10px 0 var(--sand); }
[dir="rtl"] .eh-word { box-shadow: -10px 10px 0 var(--sand); }
.eh-word__entry { direction: ltr; text-align: left; }
.eh-word__hw { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1; letter-spacing: -0.03em; margin-top: 0.8rem; }
.eh-word__hw i { color: var(--pen); font-style: normal; }
.eh-word__ipa { margin-top: 0.5rem; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9rem; color: var(--muted); }
.eh-word__ipa em { font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--ink); margin-inline-start: 0.6rem; }
.eh-word__def { margin-top: 1rem; font-size: 1.06rem; max-width: 40ch; }
.eh-word__exm { margin-top: 0.8rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--hl); font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1.08rem; line-height: 1.45; max-width: 40ch; }
.eh-word__ar { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px dashed var(--sand-2); font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 1.02rem; direction: rtl; text-align: right; }
.eh-word__ar span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-inline-end: 0.5rem; }
.eh-word__try { margin-top: 1rem; font-family: var(--hand); font-weight: 700; font-size: 1.4rem; line-height: 1.15; color: var(--pen); transform: rotate(-1.5deg); }

/* ---------- anatomy of a lesson ---------- */
.eh-anat { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: clamp(1.6rem, 5vw, 5rem); align-items: center; }
@media (max-width: 900px) { .eh-anat { grid-template-columns: 1fr; } }
.eh-anat h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 1.04; letter-spacing: -0.028em; text-wrap: balance; }
.eh-anat h2 em { font-style: italic; font-weight: 500; color: var(--pen); }
.eh-anat__p { color: var(--muted); max-width: 48ch; margin-top: 1rem; text-wrap: pretty; }
.eh-sheet { position: relative; background: var(--paper); border: 1px solid var(--rule); padding: clamp(1.1rem, 2.4vw, 1.8rem) clamp(1.1rem, 2.6vw, 2rem); box-shadow: 0 30px 60px -38px rgba(21,23,28,0.5); transform: rotate(-0.8deg); list-style: none; counter-reset: sheet; }
[dir="rtl"] .eh-sheet { transform: rotate(0.8deg); }
.eh-sheet li { counter-increment: sheet; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 0.2rem 0.9rem; align-items: baseline; padding: 0.82rem 0; border-bottom: 1px solid var(--rule-soft); }
.eh-sheet li:last-child { border-bottom: 0; }
.eh-sheet li::before { content: "0" counter(sheet); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7rem; color: var(--muted); }
.eh-sheet b { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; }
.eh-sheet span { grid-column: 2; color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.eh-sheet i { grid-row: 1; grid-column: 3; font-family: var(--hand); font-style: normal; font-weight: 700; font-size: 1.25rem; line-height: 1; color: var(--pen); transform: rotate(-4deg); white-space: nowrap; }
@media (max-width: 520px) { .eh-sheet i { display: none; } }

/* ---------- Arabic shelf ---------- */
.eh-shelf { background: var(--sand); border-block: 1px solid var(--rule); }
.eh-shelf__in { padding-block: clamp(2.4rem, 5vw, 4rem); }
.eh-shelf__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; margin-bottom: clamp(1.2rem, 2.6vw, 2rem); }
.eh-shelf__head h2 { font-family: "Amiri", Georgia, serif; font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.2; }
.eh-shelf__head p { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eh-shelf__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
@media (max-width: 1020px) { .eh-shelf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .eh-shelf__grid { grid-template-columns: 1fr; } }
.eh-book { position: relative; display: flex; flex-direction: column; gap: 0.7rem; background: var(--paper); padding: 1.1rem 1.1rem 1.2rem; border-top: 5px solid var(--p); min-height: 12.5rem; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.eh-book:hover, .eh-book:focus-visible { transform: translateY(-5px); box-shadow: 0 22px 34px -24px rgba(21,23,28,0.55); }
.eh-book__sec { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 0.78rem; font-weight: 600; color: var(--p); }
.eh-book__t { font-family: "Amiri", Georgia, serif; font-weight: 700; font-size: 1.42rem; line-height: 1.4; }
.eh-book__go { margin-top: auto; font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 0.86rem; font-weight: 600; }

/* ---------- closing band ---------- */
.eh-close { background: var(--ink); color: var(--bg); }
.eh-close__in { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 1.6rem clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2.6rem, 6vw, 4.6rem); }
@media (max-width: 860px) { .eh-close__in { grid-template-columns: 1fr; } }
.eh-close h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 3.8vw, 3.1rem); line-height: 1.06; letter-spacing: -0.026em; text-wrap: balance; }
.eh-close h2 em { font-style: italic; font-weight: 500; color: var(--hl); }
.eh-close p { color: rgba(244,242,237,0.78); max-width: 56ch; margin-top: 0.9rem; }
.eh-close__acts { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.eh-close .btn--ghost { color: var(--bg); border-color: rgba(244,242,237,0.55); }
.eh-close .btn--ghost::before { background: var(--bg); }
.eh-close .btn--ghost:hover { color: var(--ink); border-color: var(--bg); }
.eh-close :focus-visible { outline-color: var(--hl); }

/* ---------- the back page (footer): one last correction, then where everything is ---------- */
.bp { position: relative; z-index: 2; isolation: isolate; overflow: hidden; background: var(--sand); border-top: 3px solid var(--ink); }
.bp::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--ink); }
.bp::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.6; background-image: radial-gradient(rgba(21,23,28,0.2) 1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 46%); mask-image: linear-gradient(180deg, #000, transparent 46%); }
.bp__in { padding-top: clamp(1.5rem, 3vw, 2.2rem); }
.bp__strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1.4rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; }
.bp__strip b { font-weight: 500; color: var(--pen); }

.bp__sign { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.4rem clamp(1.5rem, 4vw, 4rem); padding-block: clamp(2.7rem, 5.4vw, 4.2rem) clamp(1.5rem, 3vw, 2.2rem); }
.bp__line { grid-column: 1; direction: ltr; text-align: left; white-space: nowrap; font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: clamp(1.95rem, 6.4vw, 5.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.bp__note { grid-column: 1; display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.5rem; font-family: var(--hand); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.1; color: var(--pen); opacity: 0; }
.bp__note::before { content: "\21B3"; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7em; }
[dir="rtl"] .bp__note::before { content: "\21B2"; }
.bp__bye { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; font-family: var(--hand); font-weight: 700; font-size: clamp(1.7rem, 3.5vw, 3.1rem); line-height: 1; white-space: nowrap; color: var(--ink); transform: rotate(-5deg); opacity: 0; }
.bp__bye svg { position: absolute; left: -3%; bottom: -0.36em; width: 106%; height: 0.3em; overflow: visible; }
.bp__bye path { fill: none; stroke: var(--pen); stroke-width: 4.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.bp__sign.is-on .bp__note { animation: handIn .6s var(--ease) 1.75s forwards; }
.bp__sign.is-on .bp__bye { animation: handIn .7s var(--ease) 2.3s forwards; }
.bp__sign.is-on .bp__bye path { animation: penDraw .8s var(--ease) 2.85s forwards; }
@media (max-width: 820px) {
  .bp__sign { grid-template-columns: 1fr; }
  .bp__bye { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 1.5rem; transform: rotate(-3deg); }
}

.bp__cols { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.6fr) minmax(0, 0.78fr) minmax(0, 1.1fr); gap: clamp(1.6rem, 3.4vw, 3.4rem); padding-block: clamp(1.6rem, 3vw, 2.2rem) clamp(1.7rem, 3.2vw, 2.4rem); border-top: 1.5px solid var(--ink); }
@media (max-width: 1100px) { .bp__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bp__col--secs { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 620px) { .bp__cols { grid-template-columns: minmax(0, 1fr); } .bp__col--secs { grid-row: auto; } }
.bp__h { font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.6rem; margin-bottom: 0.65rem; border-bottom: 1px solid rgba(21,23,28,0.2); }
.bp__logo { display: inline-block; }
.bp__logo img { display: block; height: clamp(58px, 6vw, 80px); width: auto; }
.bp__lic { margin-top: 0.9rem; max-width: 36ch; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.05em; line-height: 1.65; text-transform: uppercase; color: var(--muted); }
.bp__acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.15rem; }
.bp__acts .btn { font-size: 0.86rem; padding: 0.62rem 1rem; }
.bp__secs { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: clamp(1rem, 2vw, 1.8rem); }
@media (max-width: 480px) { .bp__secs { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; } }
.bp__secs a { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.36rem 0; font-size: 0.96rem; font-weight: 500; line-height: 1.3; }
.bp__secs b { flex: none; min-width: 2.15em; padding: 0.22em 0.3em; background: var(--p); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.68rem; font-weight: 500; text-align: center; transform: translateY(-0.08em); transition: transform .3s var(--ease); }
.bp__secs a:hover span, .bp__secs a:focus-visible span { color: var(--p); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.bp__secs a:hover b { transform: translateY(-0.08em) scale(1.12); }
.bp__list { list-style: none; display: grid; }
@media (max-width: 620px) { .bp__list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.2rem; } }
.bp__list a { display: inline-block; padding: 0.36rem 0; font-size: 0.96rem; font-weight: 500; line-height: 1.3; }
.bp__list a:hover, .bp__list a:focus-visible, .bp__tel a:hover, .bp__tel a:focus-visible { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.bp__addr { max-width: 32ch; font-size: 0.96rem; line-height: 1.5; }
.bp__map { display: inline-block; margin-top: 0.55rem; font-size: 0.92rem; font-weight: 600; border-bottom: 1.5px solid var(--ink); transition: color .25s var(--ease), border-color .25s var(--ease); }
.bp__map:hover, .bp__map:focus-visible { color: var(--pen); border-color: var(--pen); }
.bp__hours { margin-top: 1.05rem; font-size: 0.9rem; }
.bp__hours div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: 0.3rem 0; border-bottom: 1px dashed rgba(21,23,28,0.2); }
.bp__hours dt { color: var(--muted); white-space: nowrap; }
.bp__hours dd { font-weight: 600; text-align: end; white-space: nowrap; margin-inline-start: auto; }
.bp__hours .is-closed dd { color: var(--pen); }
.bp__tel { margin-top: 1rem; display: grid; gap: 0.25rem; font-size: 0.96rem; }
.bp__tel a { font-weight: 600; width: fit-content; }
.foot__rule { height: 26px; position: relative; }
.foot__rule::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='26'%3E%3Cline x1='0.5' y1='0' x2='0.5' y2='26' stroke='%2315171C' stroke-width='1'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: left bottom; opacity: 0.5; }
.bp__bar { background: var(--ink); color: var(--bg); }
.bp__bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.8rem; padding-block: 1.05rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; }
.bp__bar a { color: rgba(244,242,237,0.8); transition: color .2s var(--ease); }
.bp__bar a:hover, .bp__bar a:focus-visible { color: var(--hl); }
.bp__bar :focus-visible { outline-color: var(--hl); }
.bp__social { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.bp__top { white-space: nowrap; }

/* ============================================================
   SECTION (category) PAGES
   ============================================================ */
.eh-chead { padding-top: clamp(6rem, 13vh, 7.6rem); }
.eh-crumb { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.eh-crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.eh-crumb .sep { opacity: 0.5; }
.eh-chead__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(1.2rem, 4vw, 3.6rem); align-items: end; margin-top: clamp(1.2rem, 3vw, 2.2rem); padding-bottom: clamp(1.6rem, 3.4vw, 2.6rem); border-bottom: 3px solid var(--p); }
.eh-chead__no { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(5.4rem, 17vw, 14rem); line-height: 0.78; letter-spacing: -0.05em; color: var(--p); }
.eh-chead h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 5.4vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.eh-chead__d { color: var(--muted); max-width: 60ch; margin-top: 0.9rem; font-size: 1.08rem; text-wrap: pretty; }
@media (max-width: 620px) { .eh-chead__grid { grid-template-columns: 1fr; } .eh-chead__no { font-size: 5rem; margin-bottom: 0.6rem; } }
.eh-others { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.eh-others a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.42rem 0.8rem 0.42rem 0.42rem; border: 1.5px solid var(--p); color: var(--p); font-size: 0.88rem; font-weight: 600; transition: background .25s var(--ease), color .25s var(--ease); }
[dir="rtl"] .eh-others a { padding: 0.42rem 0.42rem 0.42rem 0.8rem; }
.eh-others a b { display: inline-grid; place-items: center; min-width: 2.1em; padding: 0.25em 0.3em; background: var(--p); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7rem; font-weight: 500; }
.eh-others a:hover, .eh-others a:focus-visible { background: var(--p); color: #fff; }

/* ============================================================
   ARTICLE — the lesson sheet
   ============================================================ */
.eh-art { padding-top: clamp(6rem, 13vh, 7.6rem); }
.eh-ahead { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(1.4rem, 4vw, 4rem); align-items: end; margin-top: clamp(1rem, 2.4vw, 1.8rem); }
@media (max-width: 900px) { .eh-ahead { grid-template-columns: 1fr; } }
.eh-ahead h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.05rem, 4.5vw, 3.75rem); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; margin-top: 0.9rem; }
.eh-dek { font-family: var(--serif); font-style: italic; font-size: clamp(1.12rem, 1.7vw, 1.36rem); line-height: 1.42; color: color-mix(in srgb, var(--ink) 82%, var(--bg)); margin-top: 1rem; max-width: 46ch; text-wrap: pretty; }
.eh-ahead__cover { overflow: hidden; background: var(--p); box-shadow: 12px 12px 0 color-mix(in srgb, var(--p) 16%, var(--bg)); }
[dir="rtl"] .eh-ahead__cover { box-shadow: -12px 12px 0 color-mix(in srgb, var(--p) 16%, var(--bg)); }
/* the worksheet header: For · Level · Time · Published · Language */
.eh-slip { display: grid; grid-template-columns: 1.7fr 1fr 0.8fr 1fr 1fr; margin-top: clamp(1.8rem, 4vw, 3rem); border-block: 1.5px solid var(--ink); }
.eh-slip > div { padding: 0.75rem 1rem 0.85rem; border-inline-start: 1px solid var(--rule); min-width: 0; }
.eh-slip > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.eh-slip dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eh-slip dd { margin-top: 0.2rem; font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
.eh-slip dd a { color: var(--p); border-bottom: 1.5px solid currentColor; }
@media (max-width: 900px) {
  .eh-slip { grid-template-columns: 1fr 1fr; }
  .eh-slip > div { border-inline-start: 0; padding-inline: 0 0.8rem; border-top: 1px solid var(--rule); }
  .eh-slip > div:first-child { grid-column: 1 / -1; border-top: 0; }
}

.eh-layout { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 5.5rem); margin-top: clamp(2rem, 4.4vw, 3.6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
@media (max-width: 1000px) { .eh-layout { grid-template-columns: 1fr; gap: 1.6rem; } }
.eh-rail { position: sticky; top: clamp(84px, 11vh, 112px); align-self: start; display: grid; gap: 1.6rem; }
.eh-rail__h { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.eh-toc { list-style: none; counter-reset: toc; border-inline-start: 1.5px solid var(--rule); }
.eh-toc a { counter-increment: toc; display: block; position: relative; padding: 0.36rem 0 0.36rem 1rem; margin-inline-start: -1.5px; border-inline-start: 1.5px solid transparent; font-size: 0.93rem; line-height: 1.35; color: var(--muted); transition: color .25s var(--ease), border-color .25s var(--ease); }
[dir="rtl"] .eh-toc a { padding: 0.36rem 1rem 0.36rem 0; }
.eh-toc a:hover { color: var(--ink); }
.eh-toc a.is-on { color: var(--ink); font-weight: 600; border-color: var(--p); }
.eh-share { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.eh-share a, .eh-share button { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.5rem 0.7rem; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.eh-share a:hover, .eh-share button:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 1000px) {
  .eh-rail { position: static; gap: 1rem; padding: 1rem 1.1rem; background: var(--surface); }
  .eh-rail__share { display: none; }
}

.eh-also { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; margin-bottom: 1.6rem; padding: 0.85rem 1.1rem; background: color-mix(in srgb, var(--p) 9%, var(--bg)); border-inline-start: 4px solid var(--p); }
.eh-only { display: none; }
.eh-only[lang="ar"] { display: block; margin-bottom: 1.6rem; padding: 0.85rem 1.1rem; background: color-mix(in srgb, var(--p) 9%, var(--bg)); border-inline-start: 4px solid var(--p); font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-weight: 500; }
.eh-body .src { font-size: 0.86em; color: var(--muted); padding-top: 0.9rem; border-top: 1px dashed var(--sand-2); }
.eh-also p { font-family: "IBM Plex Sans Arabic", var(--sans); font-weight: 500; }
.eh-also a { font-weight: 700; color: var(--p); border-bottom: 1.5px solid currentColor; white-space: nowrap; }

.eh-body { max-width: 44rem; font-size: clamp(1.06rem, 0.5vw + 0.98rem, 1.17rem); line-height: 1.74; counter-reset: pt; }
.eh-body > * + * { margin-top: 1.15em; }
.eh-body p { text-wrap: pretty; }
.eh-body .lede { font-size: 1.14em; line-height: 1.62; }
.eh-body .lede:first-of-type::first-letter { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 3.5em; line-height: 0.82; float: left; margin: 0.08em 0.1em 0 0; color: var(--p); }
[dir="rtl"] .eh-body .lede:first-of-type::first-letter { all: unset; }
.eh-body h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.55rem, 2.7vw, 2.1rem); line-height: 1.12; letter-spacing: -0.022em; margin-top: 2.1em; padding-top: 0.9rem; border-top: 1px solid var(--rule); text-wrap: balance; }
.eh-body h2::before { content: ""; display: block; width: 2.2rem; height: 3px; background: var(--p); margin: -0.9rem 0 0.9rem; transform: translateY(-2px); }
.eh-body h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.2rem, 1.9vw, 1.42rem); line-height: 1.22; letter-spacing: -0.012em; margin-top: 1.7em; text-wrap: balance; }
.eh-body strong, .eh-body b { font-weight: 700; }
.eh-body em { font-style: italic; }
.eh-body a:not(.btn) { color: var(--p); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.eh-body a:not(.btn):hover { text-decoration-thickness: 2.5px; }
.eh-body ul, .eh-body ol { padding-inline-start: 1.3em; }
.eh-body li + li { margin-top: 0.42em; }
.eh-body li::marker { color: var(--p); font-weight: 700; }
.eh-body mark, .hl { background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 88%, transparent 88%); color: inherit; padding-inline: 0.12em; }
.eh-body .en { font-family: "Mukta", system-ui, sans-serif; }

/* a numbered teaching point */
.eh-body .pt { counter-increment: pt; position: relative; margin-top: 2em; }
.eh-body .pt > h3 { margin-top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.eh-body .pt > h3::before { content: counter(pt); font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500; font-size: 1.85em; line-height: 0.8; color: var(--p); }
.eh-body .pt > * + * { margin-top: 0.8em; }

/* learning goal */
.goal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 1.1rem; padding: 1.15rem 1.25rem 1.25rem; background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--p); }
.goal svg { grid-row: 1 / 3; width: 42px; height: 42px; color: var(--p); margin-top: 0.15rem; }
.goal__k { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--p); }
.goal__t { font-family: var(--serif); font-weight: 500; font-size: 1.12em; line-height: 1.42; margin-top: 0 !important; }

/* marked examples: ✗ struck in red pen, ✓ in green */
.ex { direction: ltr; text-align: left; padding: 1rem 1.2rem 1.05rem; background: var(--surface); border-inline-start: 3px solid var(--ink); font-family: "Mukta", system-ui, sans-serif; }
.ex > * + * { margin-top: 0.5rem !important; }
.ex__k { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ex .no, .ex .yes, .ex .say { position: relative; padding-inline-start: 1.9rem; line-height: 1.5; }
.ex .no::before, .ex .yes::before, .ex .say::before { position: absolute; inset-inline-start: 0; top: 0; font-family: "Caveat", cursive; font-weight: 700; font-size: 1.5em; line-height: 1.05; }
.ex .no { color: color-mix(in srgb, var(--ink) 66%, var(--bg)); }
.ex .no::before { content: "\2717"; color: var(--pen); }
.ex .no s, .ex .no del { text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.ex .yes { font-weight: 500; }
.ex .yes::before { content: "\2713"; color: var(--ok); }
.ex .yes b, .ex .yes ins { text-decoration: none; font-weight: 700; color: var(--ok); }
.ex .say::before { content: "\201C"; font-family: "Fraunces", Georgia, serif; font-size: 1.9em; line-height: 0.95; color: var(--p); }
.ex .why { font-family: "Caveat", cursive; font-weight: 700; font-size: 1.28em; line-height: 1.15; color: var(--pen); padding-inline-start: 1.9rem; }
.ex--mail { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.86em; line-height: 1.7; background: var(--paper); border: 1px solid var(--rule); border-inline-start: 3px solid var(--p); }
.ex--mail > * + * { margin-top: 0.75rem !important; }
.ex--mail .sub { padding-bottom: 0.6rem; border-bottom: 1px dashed var(--sand-2); }
.ex p.ar { direction: rtl; text-align: right; font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 0.93em; line-height: 1.7; color: var(--muted); margin-top: 0.1rem !important; padding-bottom: 0.55rem; border-bottom: 1px dashed var(--sand-2); }
.ex p.ar:last-child { border-bottom: 0; padding-bottom: 0; }

.tbl { overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 0.95em; line-height: 1.45; }
.tbl th { text-align: start; font-family: var(--mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.tbl td { padding: 0.62rem 0.8rem 0.62rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
[dir="rtl"] .tbl th, [dir="rtl"] .tbl td { padding: 0.62rem 0 0.62rem 0.8rem; }
.tbl td:first-child { font-weight: 700; }
.tbl td .en { font-weight: 600; }

/* your turn: activity · challenge · checklist · reflection */
.act { position: relative; margin-top: 2.4em !important; padding: clamp(1.3rem, 3vw, 2rem); background: color-mix(in srgb, var(--p) 8%, var(--bg)); border: 1.5px solid var(--p); }
.act__k { position: absolute; top: 0; inset-inline-start: clamp(1rem, 3vw, 1.8rem); transform: translateY(-50%); background: var(--p); color: #fff; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.34rem 0.7rem; }
.act h2 { border: 0; padding: 0; margin: 0 !important; font-size: clamp(1.4rem, 2.3vw, 1.8rem); }
.act h2::before { content: none; }
.act > * + * { margin-top: 0.9em; }
.act__hand { font-family: var(--hand); font-weight: 700; font-size: 1.4em; line-height: 1.1; color: var(--p); }
.checks { list-style: none; padding: 0 !important; display: grid; gap: 0.1rem; }
.checks li { margin: 0 !important; }
.checks label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; align-items: start; padding: 0.55rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--p) 34%, transparent); cursor: pointer; }
.checks input { appearance: none; -webkit-appearance: none; flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.2em; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center; cursor: pointer; }
.checks input::after { content: "\2713"; font-family: "Caveat", cursive; font-weight: 700; font-size: 1.7rem; line-height: 0; color: var(--pen); transform: scale(0) rotate(-12deg); transition: transform .25s var(--ease); }
.checks input:checked::after { transform: scale(1) rotate(-8deg) translateY(-0.12rem); }
.checks input:checked + span { color: var(--muted); }
.act__note { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.act textarea { display: block; width: 100%; min-height: 7.5rem; resize: vertical; padding: 0.9rem 1rem; border: 1.5px solid var(--ink); border-radius: 0; background: var(--paper) repeating-linear-gradient(transparent 0 1.74em, var(--rule-soft) 1.74em calc(1.74em + 1px)); background-attachment: local; background-position: 0 0.9rem; line-height: 1.74; }
.act textarea:focus { outline: 2px solid var(--p); outline-offset: 2px; }
details.ans { border-top: 1px dashed color-mix(in srgb, var(--p) 40%, transparent); padding-top: 0.8rem; }
details.ans summary { cursor: pointer; font-weight: 700; color: var(--p); list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; }
details.ans summary::-webkit-details-marker { display: none; }
details.ans summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1.5px solid currentColor; font-family: var(--mono); font-size: 0.9rem; line-height: 1; }
details.ans[open] summary::before { content: "\2212"; }
details.ans > * + * { margin-top: 0.7em; }

/* quiz */
.quiz { display: grid; gap: 1.1rem; counter-reset: q; }
.q { counter-increment: q; border: 0; padding: 1rem 1.1rem 1.1rem; background: var(--paper); border: 1px solid var(--rule); min-width: 0; }
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 0.7rem; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.14em; line-height: 1.4; direction: ltr; text-align: left; }
.q legend::before { content: counter(q) "."; font-style: italic; color: var(--p); margin-inline-end: 0.5rem; }
.q legend .gap { display: inline-block; min-width: 3.4em; border-bottom: 2px solid var(--p); }
.q legend.ar { direction: rtl; text-align: right; font-family: "Amiri", Georgia, serif; font-size: 1.22em; line-height: 1.6; }
.quiz--ar .q__opts { justify-content: flex-end; }
.q__opts { clear: both; display: flex; flex-wrap: wrap; gap: 0.5rem; direction: ltr; }
.q__opts label { position: relative; cursor: pointer; }
.q__opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.q__opts span { display: inline-block; padding: 0.42rem 1rem; border: 1.5px solid var(--ink); font-weight: 600; background: var(--bg); transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.q__opts label:hover span { background: var(--sand); }
.q__opts input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.q.is-done .q__opts input { pointer-events: none; }
.q__opts .is-right span { background: var(--ok); border-color: var(--ok); color: #fff; }
.q__opts .is-wrong span { background: transparent; border-color: var(--pen); color: var(--pen); text-decoration: line-through; }
.q__why { margin-top: 0.8rem !important; font-size: 0.95em; line-height: 1.55; color: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.js .q:not(.is-done) .q__why { display: none; }
.q__why b { color: var(--ok); }
.quiz__score { font-family: var(--serif); font-size: 1.3em; font-weight: 600; }
.quiz__score b { color: var(--p); }

/* key takeaway */
.take { margin-top: 2.4em !important; padding: clamp(1.2rem, 3vw, 1.9rem) 0 0; border-top: 3px solid var(--ink); }
.take__k { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.take__t { margin-top: 0.6rem !important; font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.3vw, 1.72rem); line-height: 1.42; letter-spacing: -0.012em; text-wrap: pretty; }
.take__t span { background: linear-gradient(transparent 10%, var(--hl) 10%, var(--hl) 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: 0.16em; }

/* from English World — the soft call to action */
.eh-cta { margin-top: 2.6em !important; display: grid; gap: 0.8rem; padding: clamp(1.3rem, 3vw, 2rem); background: var(--paper); border: 1px solid var(--rule); box-shadow: 9px 9px 0 var(--sand); }
[dir="rtl"] .eh-cta { box-shadow: -9px 9px 0 var(--sand); }
.eh-cta__k { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eh-cta__t { font-family: var(--serif); font-size: 1.18em; line-height: 1.5; margin: 0 !important; }
.eh-cta__acts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.3rem !important; }

.eh-by { margin-top: 2.2em !important; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.1rem; align-items: center; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
.eh-by__m { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; font-weight: 700; font-style: italic; font-size: 1.25rem; letter-spacing: -0.04em; }
.eh-by__n { font-weight: 700; line-height: 1.3; }
.eh-by__d { margin-top: 0.15rem !important; font-size: 0.92em; line-height: 1.5; color: var(--muted); }

.eh-more { border-top: 1px solid var(--rule); }

/* ---------- Arabic ---------- */
[lang="ar"] { --serif: "Amiri", Georgia, serif; --sans: "IBM Plex Sans Arabic", system-ui, sans-serif; --mono: "IBM Plex Sans Arabic", system-ui, sans-serif; --hand: "IBM Plex Sans Arabic", system-ui, sans-serif; }
[lang="ar"] *:not(.en):not(.en *) { letter-spacing: 0 !important; }
[lang="en"], .en { --serif: "Fraunces", Georgia, "Times New Roman", serif; --sans: "Mukta", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace; --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive; }
[lang="ar"] .ex.en, [lang="ar"] .q legend.en { font-size: 0.96em; line-height: 1.6; }
html[lang="ar"] body { font-size: clamp(1.02rem, 0.6vw + 0.95rem, 1.12rem); line-height: 1.85; }
[lang="ar"] .section-head .eyebrow, [lang="ar"] .eh-plate__tag, [lang="ar"] .eh-dek, [lang="ar"] .eh-anat h2 em, [lang="ar"] .eh-close h2 em, [lang="ar"] .eh-chips__lab, [lang="ar"] .eh-empty { font-style: normal; }
[lang="ar"] .eh-plate h1 { letter-spacing: 0; line-height: 1.25; font-weight: 700; font-size: clamp(2.6rem, 8.2vw, 6.4rem); }
[lang="ar"] .eh-point { font-size: 1rem; font-weight: 600; transform: none; }
[lang="ar"] .eh-cap__t { line-height: 1.45; }
[lang="ar"] .eh-tile__t { line-height: 1.5; }
[lang="ar"] .eh-inside { font-size: 0.82rem; }
[lang="ar"] .eh-plate h1 .the { display: none; }
[lang="ar"] .eh-ahead h1, [lang="ar"] .eh-chead h1, [lang="ar"] .eh-anat h2, [lang="ar"] .eh-close h2, [lang="ar"] .eh-chal h3 { line-height: 1.35; }
[lang="ar"] .eh-lead__title, [lang="ar"] .card__title, [lang="ar"] .eh-sec__name, [lang="ar"] .eh-body h2, [lang="ar"] .eh-body h3 { line-height: 1.45; }
[lang="ar"] .eh-body { line-height: 1.95; }
[lang="ar"] .eh-body .pt > h3::before { content: counter(pt, arabic-indic); font-family: "Amiri", Georgia, serif; font-style: normal; font-weight: 700; }
[lang="ar"] .eh-note, [lang="ar"] .eh-plate__hand, [lang="ar"] .eh-sheet i, [lang="ar"] .act__hand, [lang="ar"] .eh-word__try { font-weight: 600; font-size: 1.05rem; transform: none; }
[lang="ar"] .eh-plate__hand { font-size: clamp(1rem, 1.6vw, 1.3rem); inset-inline-end: clamp(0rem, 16vw, 16rem); top: clamp(0.6rem, 1.4vw, 1.4rem); }
[lang="ar"] .tab, [lang="ar"] .kicker, [lang="ar"] .eh-strip, [lang="ar"] .card__meta, [lang="ar"] .eh-slip dt, [lang="ar"] .eh-crumb, [lang="ar"] .goal__k, [lang="ar"] .act__k, [lang="ar"] .take__k, [lang="ar"] .eh-cta__k, [lang="ar"] .eh-rail__h, [lang="ar"] .eh-sec__n, [lang="ar"] .eh-count, [lang="ar"] .section-head__aside { font-size: 0.8rem; }
[lang="ar"] .eh-toc a { font-size: 1rem; }
[lang="ar"] .foot__brand { font-family: "Fraunces", Georgia, serif; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .eh-x__line path, .eh-tick path, .eh-plate h1 .u path { stroke-dashoffset: 0 !important; }
  .eh-pen { display: none; }
  .eh-deck__card, .eh-cap, .eh-mark__s { transition: none !important; }
  .eh-fix, .eh-plate__hand { opacity: 1 !important; }
  .eh-note.is-on { opacity: 1 !important; }
  .cover, .eh-book, .lang__slide, .nav__links { transition: none !important; }
}
@media print {
  .nav, .nav__backdrop, body::before, .totop, .progress, .eh-thumb, .eh-ticker, .eh-ctl, .eh-pen, .eh-rail, .eh-more, .eh-close, .eh-share, .eh-also, .foot__social { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .eh-art, .eh-chead, .eh-front { padding-top: 0; }
  .eh-layout { display: block; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .js .q:not(.is-done) .q__why { display: none; }
  .eh-ahead__cover { box-shadow: none; max-width: 60%; }
  .act, .ex, .goal, .q { break-inside: avoid; }
}

/* ---------- back page: Arabic, reduced motion, print ---------- */
[dir="rtl"] .bp__line { text-align: right; }
.bp__bar .en { font-family: var(--mono); }
[lang="ar"] .bp__note, [lang="ar"] .bp__bye { transform: none; }
[lang="ar"] .bp__note { font-size: 1.05rem; font-weight: 600; }
[lang="ar"] .bp__bye { font-size: clamp(1.35rem, 2.6vw, 2.1rem); }
[lang="ar"] .bp__h, [lang="ar"] .bp__strip, [lang="ar"] .bp__bar-in, [lang="ar"] .bp__lic { font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) {
  .bp__note, .bp__bye { opacity: 1 !important; }
  .bp__bye path { stroke-dashoffset: 0 !important; }
}
@media print {
  .bp__sign, .bp__acts, .bp__social, .bp__top, .bp__col--nav, .bp .foot__rule { display: none !important; }
  .bp, .bp__bar { background: none; color: #000; border: 0; }
  .bp::before, .bp::after { display: none; }
}
