/* Workbook decks: the .pptx slides rebuilt on a 1280x720 canvas (site/workbooks/convert.py), scaled to fit. */
.wb { --s: 1; margin: 0; }
.wb-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.wb-bar .wb-count { font: 600 14px var(--f-ui); color: var(--muted); min-width: 64px; }
.wb-bar select { font: 600 14px var(--f-ui); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; max-width: min(420px, 100%); }
.wb-bar .wb-sp { flex: 1; }
.wb-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #f8f1e6;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(60, 45, 20, .35); outline: 1px solid var(--line); }
.wb-slide { position: absolute; inset: 0 auto auto 0; width: 1280px; height: 720px; transform: scale(var(--s)); transform-origin: 0 0; overflow: hidden;
  font-family: "Figtree", Arial, sans-serif; color: #2a2a22; -webkit-font-smoothing: antialiased; }
.js .wb-deck .wb-slide:not(.on) { visibility: hidden; }
.wb-slide > * { position: absolute; box-sizing: border-box; }
.wb-sh { display: flex; flex-direction: column; }
.wb-sh p { margin: 0; line-height: 1.2; overflow-wrap: break-word; }
.wb-slide .ar { unicode-bidi: isolate; font-family: "Noto Sans Arabic", "Geeza Pro", sans-serif; }
.wb-pic { object-fit: contain; user-select: none; }
.wb-line { overflow: visible; }
.wb-in { display: flex; align-items: center; justify-content: center; padding: 0 10px; text-align: center; cursor: text;
  font: 500 22px/1.3 "Noto Sans Arabic", "Figtree", sans-serif; color: #2a2a22; background: rgba(255, 255, 255, .55); overflow: hidden; white-space: nowrap; }
.wb-in:hover { background: rgba(255, 255, 255, .85); }
.wb-in:focus { outline: 3px solid rgba(176, 85, 63, .45); outline-offset: 1px; background: #fff; }
.wb-chip { cursor: grab; touch-action: none; transition: box-shadow .15s; z-index: 2; }
.wb-chip.dragging { cursor: grabbing; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); z-index: 5; }
.wb-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.wb-nav .btn { min-height: 42px; padding: 0 18px; }
.wb-nav .wb-dots { font: 600 14px var(--f-ui); color: var(--muted); min-width: 90px; text-align: center; }
.wb-deck:fullscreen, .wb-deck.wb-filled { background: #1d1c17; display: flex; flex-direction: column; justify-content: safe center; padding: 2vh 2vw; overflow-y: auto; }
.wb-deck.wb-filled { position: fixed; inset: 0; z-index: 100; margin: 0; }
.wb-deck:fullscreen .wb-stage, .wb-deck.wb-filled .wb-stage { flex: none; width: min(96vw, calc((96vh - 70px) * 16 / 9)); margin: 0 auto; }
.wb-deck:fullscreen .wb-nav .wb-dots, .wb-deck.wb-filled .wb-nav .wb-dots { color: #ddd; }
.wb-noscroll, .wb-noscroll body { overflow: hidden; }
.wb-deck:fullscreen .btn:not(.solid), .wb-deck.wb-filled .btn:not(.solid) { color: #f3e9d6; border-color: #8a8770; background: transparent; }
/* without JS (and for print): every slide, one after another */
html:not(.js) .wb-stage { aspect-ratio: auto; overflow: visible; background: none; box-shadow: none; outline: 0; }
html:not(.js) .wb-slide { position: relative; transform: none; margin-bottom: 16px; zoom: .5; }
.wb-all .wb-stage { aspect-ratio: auto; height: auto; overflow: visible; background: none; box-shadow: none; outline: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wb-all .wb-slide { position: relative; visibility: visible !important; transform: none; zoom: var(--z, .25); cursor: pointer; outline: 4px solid var(--line); }
.wb-all .wb-slide:hover { outline-color: var(--clay); }
.wb-all .wb-nav { display: none; }

/* page around the deck (mirrors .sx-top / .sx-more on the class-workbook pages) */
.wb-top { padding-block: 14px 18px; }
.wb-top .meta { margin: 0 0 8px; font: 700 13px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
.wb-top h1 { margin: 0; font: 700 clamp(28px, 4.4vw, 44px)/1.15 var(--f-ui); letter-spacing: -.015em; }
.wb-top h1 [lang="ar"] { display: inline-block; font: 400 .9em/1 var(--f-display); color: var(--clay); margin-inline-start: 6px; }
.wb-top .intro { margin: 12px 0 0; max-width: 64ch; font: 400 19px/1.5 var(--f-serif); color: #5b5d43; }
.wb-how { margin: 10px 0 0; max-width: 70ch; font-size: 15px; color: var(--muted); }
.wb-deck { scroll-margin-top: 76px; margin-bottom: 36px; }
.wb-h2 { font: 700 22px var(--f-ui); margin: 8px 0 14px; }
.wb-more { margin: 10px 0 44px; }
.wb-more h2 { font: 700 22px var(--f-ui); margin: 0 0 12px; }
.wb-toc { columns: 2 300px; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.wb-toc li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.wb-toc a { color: var(--ink); text-decoration: none; font-weight: 600; }
.wb-toc a:hover { color: var(--clay); }
.wb-toc .n { display: inline-block; min-width: 26px; color: var(--muted); font-weight: 500; }
.wb-toc [lang="ar"] { font-family: var(--f-ar); color: var(--olive); }
.wb-sibs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wb-sibs a { display: inline-flex; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; font-size: 15px; }
.wb-sibs a:hover { border-color: var(--olive); }
.wb-sibs a[aria-current] { border-color: var(--clay); color: var(--clay); font-weight: 700; }
.wb-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.wb-topics a { display: block; height: 100%; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper-2); color: var(--ink); text-decoration: none; }
.wb-topics a:hover { border-color: var(--olive); }
.wb-topics b { display: block; font-size: 17px; }
.wb-topics [lang="ar"] { font-family: var(--f-ar); color: var(--clay); }
.wb-topics .d { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.wb-cards { display: grid; gap: 22px; margin: 26px 0 0; padding: 0; list-style: none; }
.wb-card { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 18px; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--line); }
.wb-card-art { display: grid; place-items: center; border-radius: 12px; overflow: hidden; }
.wb-card-art img { width: 80%; }
.wb-card .meta { margin: 0; font: 700 13px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--clay); }
.wb-card h2 { margin: 6px 0 8px; font: 700 26px/1.2 var(--f-ui); }
.wb-card h2 a { color: var(--ink); text-decoration: none; }
.wb-card h2 [lang="ar"] { font: 400 .9em var(--f-display); color: var(--clay); }
.wb-card p { margin: 0 0 10px; }
.wb-card ul { margin: 0; padding-inline-start: 18px; }
@media (max-width: 700px) { .wb-card { grid-template-columns: 1fr; } .wb-card-art { height: 140px; } }
@media print { .wb-bar, .wb-nav, .nav, .foot, .start, .wb-more { display: none !important; } .js .wb-slide { visibility: visible !important; position: relative; transform: none; zoom: .55; break-inside: avoid; } .wb-stage { aspect-ratio: auto; overflow: visible; box-shadow: none; } }

/* practice tools: typing mode switch, on-screen Arabic keyboard */
.wb-mode { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.wb-mode button { font: 600 13px var(--f-ui); color: var(--ink); background: none; border: 0; padding: 8px 12px; cursor: pointer; }
.wb-mode button + button { border-inline-start: 1.5px solid var(--line); }
.wb-mode button[aria-pressed="true"] { background: var(--olive); color: var(--paper); }
.wb-kb { position: fixed; inset: auto 0 0 0; z-index: 110; background: #26251f; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -10px rgba(0,0,0,.4); }
.wb-kb[hidden] { display: none; }
.wb-kb-row { display: flex; justify-content: center; gap: 6px; margin: 0 auto 6px; max-width: 760px; direction: rtl; }
.wb-kb button { flex: 1 1 0; min-width: 0; height: 44px; border: 0; border-radius: 8px; background: #3a3930; color: #fff; font: 600 20px "Noto Sans Arabic", sans-serif; cursor: pointer; }
.wb-kb button:active { background: var(--clay); }
.wb-kb button.wide { flex: 3 1 0; font: 600 14px var(--f-ui); }
.wb-kb .wb-kb-x { flex: 0 0 52px; font-size: 16px; background: #55534a; }
body.wb-kb-on { padding-bottom: 290px; }
@media print { .wb-kb { display: none !important; } }

/* marking: Check button */
.wb-in.wb-right, .wb-in.wb-wrong, .wb-in.wb-compare { border-style: solid !important; border-width: 2px !important; }
.wb-in.wb-right { border-color: #4f7a3a !important; background: #eef5e6 !important; }
.wb-in.wb-wrong { border-color: #c0392b !important; background: #fcebe7 !important; }
.wb-in.wb-compare { border-color: #b7791f !important; background: #fdf4e1 !important; }
.wb-in.wb-right::after, .wb-in.wb-wrong::after { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font: 700 15px/1 system-ui, sans-serif; pointer-events: none; }
.wb-in.wb-right::after { content: "✓"; color: #4f7a3a; }
.wb-in.wb-wrong::after { content: "✕"; color: #c0392b; }
.wb-chip.wb-right { outline: 3px solid #4f7a3a; outline-offset: 1px; }
.wb-chip.wb-wrong { outline: 3px solid #c0392b; outline-offset: 1px; }
.wb-check[hidden] { display: none; }
.wb-results { margin-top: 12px; padding: 14px 18px; background: #fff; border: 1px solid var(--line, #d9d0b8); border-radius: 12px; font-size: 15px; }
.wb-results[hidden] { display: none; }
.wb-res-head { margin: 0; font-weight: 700; }
.wb-res-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid #efe8d4; }
.wb-res-labels { margin-top: 8px; padding: 0 0 5px; border-top: 0; font-size: 12.5px; color: var(--muted, #6e6b58); }
.wb-res-q { color: var(--muted, #6e6b58); font-variant-numeric: tabular-nums; }
.wb-res-row bdi { font-family: var(--f-ar, "Noto Sans Arabic", sans-serif); font-size: 18px; font-weight: 500; }
.wb-res-row.wrong .wb-res-you bdi { color: #c0392b; }
.wb-res-row.compare .wb-res-you bdi { color: #b7791f; }
.wb-res-key bdi { color: #4f7a3a; }
@media (max-width: 520px) { .wb-res-row { grid-template-columns: 26px minmax(0, 1fr); } .wb-res-key { grid-column: 2; } .wb-res-labels { display: none; } }
@media print { .wb-results, .wb-check { display: none !important; } }
