/* Ghalina website: the user manual (/manual, built by backend/site/build-manual.mjs). Release 2 (owner 2026-10-21):
   concept 2 "Video-first gallery" of design/manual-concepts/. A plum leather hero with the player and its steps, a sticky
   search with the row chips, rows of video cards, the assistant and "Email us", then every chapter and topic. Topics
   open in a reader sheet (assets/js/manual.js). Loaded after site.css; colours come from theme.css (--g-*), light by
   default, dark on [data-theme="dark"]. Hovers fade in and out (220 ms) and look the same for keyboard focus. */

.page--manual {
  --mg-max: 1840px;
  --mg-gutter: clamp(16px, 3vw, 56px);
  --mg-card: #fff;
  --mg-tint: #f6ead0;
  --mg-tint-2: #efdcb3;
  --mg-rim: rgb(203 166 115 / 0.85);
  --mg-bar-bg: rgb(242 233 214 / 0.94);
  --mg-placeholder: #77677a;
  --mg-ink: var(--g-link);
  --hv-in: 120ms;
  --hv-out: 200ms;
  --mg-hov: var(--hv-out) ease-out;
  --mg-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --mg-leather: linear-gradient(160deg, #4f2549 0%, #3c1c38 55%, #260f23 100%);
  --mg-metal: linear-gradient(135deg, #8c6a44 0%, #eed6aa 22%, #cba673 45%, #f8ead0 68%, #aa8655 100%);
  overflow-x: clip;
}
[data-theme="dark"] .page--manual {
  --mg-card: var(--g-surface-2);
  --mg-tint: #4a2a42;
  --mg-tint-2: #57314d;
  --mg-rim: rgb(212 175 106 / 0.62);
  --mg-bar-bg: rgb(30 15 27 / 0.9);
  --mg-placeholder: #c2ae95;
}
/* --mg-top: where the stuck site top bar ends (the search bar and the reader sheet start below it); --mg-bar: top + the search bar's height.
   manual.js measures both (2026-10-25); these are the values before it runs. */
html:has(.page--manual) { --mg-top: 88px; --mg-bar: 208px; scroll-padding-top: calc(var(--mg-bar) + 16px); }

.mg-wrap { width: 100%; max-width: var(--mg-max); margin-inline: auto; padding-inline: var(--mg-gutter); }
.mg-flip { display: block; }
html[dir="rtl"] .mg-flip, html[dir="rtl"] .mg-arr { transform: scaleX(-1); }
.mg-arr { flex: none; width: 20px; height: 20px; }
.mg-ico { flex: none; width: 24px; height: 24px; }

/* Header: the simple page header, as wide as the page, with a Help pill */
.page--manual .simple-head { width: 100%; max-width: var(--mg-max); padding-inline: var(--mg-gutter); padding-block: 14px; }
.mg-headlink { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; color: var(--g-link); font-size: 1rem; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--g-rim); transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov); }
.mg-headlink:hover, .mg-headlink:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6), 0 10px 20px -14px rgb(var(--g-shadow) / 0.8); transform: translateY(-1px); outline: none; }
@media (max-width: 400px) { .mg-headlink { padding-inline: 14px; } .page--manual .lang-btn { padding-inline: 12px; } }

/* ---------- Hero: the plum leather band with the player and its steps ---------- */
.mg-hero {
  color: #fff6e8;
  background: var(--skin), var(--mg-leather);
  background-blend-mode: var(--skin-bm), normal;
  padding-block: clamp(22px, 3vw, 48px) clamp(26px, 3.4vw, 56px);
  box-shadow: inset 0 1.5px 0 #c9a465, inset 0 -1.5px 0 #c9a465;
}
.mg-hero__logo { flex: 0 0 100%; line-height: 0; } /* the name logo above the title (2026-10-24) */
.mg-hero__logo img { display: block; height: 170px; width: auto; max-width: 100%; }
.mg-hero__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: clamp(16px, 2vw, 28px); }
.mg-h1 { color: #fff6e8; font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.2rem); line-height: 1.15; }
html[lang="ar"] .mg-h1 { line-height: 1.5; }
.mg-lead { flex: 1 1 32rem; color: #eadbe5; font-size: 1.0625rem; max-width: 60rem; }
.mg-stats { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.mg-stats li { padding: 3px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgb(233 207 154 / 0.6); color: #e9cf9a; font-size: 0.9375rem; font-weight: 700; }
.mg-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 56px); align-items: start; }
@media (min-width: 1100px) { .mg-hero__in { grid-template-columns: minmax(0, 1.75fr) minmax(340px, 1fr); } }
.mg-player, .mg-info { min-width: 0; }
.mg-player .mg-vid { box-shadow: 0 0 0 1.5px #c9a465, 0 40px 80px -40px rgb(0 0 0 / 0.9); border-radius: 22px; }
.mg-kicker { color: #e8cf9c; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
html[lang="ar"] .mg-kicker { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.mg-info__t { margin: 8px 0; color: #fff6e8; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem); line-height: 1.12; text-wrap: balance; }
html[lang="ar"] .mg-info__t { line-height: 1.45; }
.mg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.mg-meta span { padding: 4px 12px; border-radius: 999px; font-size: 0.875rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgb(212 175 106 / 0.55); color: #f1dcb0; }
.mg-meta strong { font-weight: inherit; }
.mg-steps__t { margin: 0 0 10px; }
.mg-steps { counter-reset: s; display: grid; gap: 8px; }
.mg-steps li { counter-increment: s; position: relative; padding: 10px 14px; padding-inline-start: 50px; border-radius: 14px; background: rgb(255 246 232 / 0.07); box-shadow: inset 0 0 0 1px rgb(212 175 106 / 0.28); color: #f7ecd9; font-size: 1.03rem; line-height: 1.45; }
.mg-steps li::before { content: counter(s); position: absolute; inset-inline-start: 12px; top: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #e3c27f, #c9a05a); color: #2a1c05; font-size: 0.8125rem; font-weight: 800; }
.mg-steps strong { color: #fff6e8; }
.mg-steps a { color: #ecd29c; }
.mg-steps ul, .mg-steps ol { margin-top: 4px; padding-inline-start: 1.1em; list-style: disc; }
.mg-soon { margin: 10px 2px 0; color: #e8cf9c; font-size: 0.9375rem; }

/* Buttons (inside the hero they sit on leather; elsewhere on ivory) */
.mg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mg-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; max-width: 100%; padding: 10px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--mg-ink); font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.3; text-align: start; text-decoration: none; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--mg-rim); transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov), filter var(--mg-hov); }
.mg-btn svg { flex: none; width: 18px; height: 18px; }
.mg-btn:hover, .mg-btn:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6), 0 10px 20px -14px rgb(var(--g-shadow) / 0.8); transform: translateY(-1px); outline: none; }
.mg-hero .mg-btn { color: #f7ecd9; box-shadow: inset 0 0 0 1.5px rgb(212 175 106 / 0.6); }
.mg-hero .mg-btn:hover, .mg-hero .mg-btn:focus-visible { background: rgb(255 246 232 / 0.12); color: #fff6e8; box-shadow: inset 0 0 0 1.5px #e9cf9a, 0 0 0 4px rgb(233 207 154 / 0.18); }
.mg-btn--gold, .mg-hero .mg-btn--gold { background: var(--mg-metal); color: #2a1c05; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), inset 0 0 0 1px rgb(140 106 68 / 0.35), 0 14px 28px -14px rgb(0 0 0 / 0.6); }
.mg-btn--gold:hover, .mg-btn--gold:focus-visible, .mg-hero .mg-btn--gold:hover, .mg-hero .mg-btn--gold:focus-visible { background: var(--mg-metal); color: #2a1c05; filter: brightness(1.07) saturate(1.08); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), inset 0 0 0 1px rgb(140 106 68 / 0.45), 0 0 0 4px rgb(233 207 154 / 0.35), 0 18px 30px -14px rgb(0 0 0 / 0.65); }

/* ---------- Video blocks and posters ---------- */
.mg-vid { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #2a1426; box-shadow: 0 0 0 1.5px var(--g-rim), 0 24px 50px -28px rgb(var(--g-shadow) / 0.8); }
.mg-vid video, .mg-vid__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mg-vid video { background: #1a0b17; }
.mg-vid__play { position: absolute; inset: 0; display: grid; place-items: center; }
.mg-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #1a0b17; }
.mg-yt__btn { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: transparent; color: #4a2545; cursor: pointer; }
.mg-yt__btn span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgb(255 246 232 / 0.94); box-shadow: 0 0 0 2px #d4af6a, 0 12px 30px -10px rgb(0 0 0 / 0.6); transition: transform var(--hv-out) ease-out, background-color var(--mg-hov); }
.mg-yt__btn:hover span, .mg-yt__btn:focus-visible span { transform: scale(1.08); background: #fff; }
.mg-yt__btn svg { width: 26px; height: 26px; margin-inline-start: 4px; }
.mg-vid__play span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgb(255 246 232 / 0.94); color: #4a2545; box-shadow: 0 0 0 2px #d4af6a, 0 12px 30px -10px rgb(0 0 0 / 0.6); transition: transform var(--hv-out) ease-out, background-color var(--mg-hov); }
.mg-vid__play svg { width: 26px; height: 26px; margin-inline-start: 4px; }
html[dir="rtl"] .mg-vid__play svg { margin-inline-start: 0; margin-left: 4px; }
.mg-badge { position: absolute; inset-inline-start: 12px; top: 12px; display: inline-flex; align-items: center; max-width: calc(100% - 24px); padding: 4px 10px; border-radius: 999px; background: rgb(30 12 27 / 0.72); color: #f7e6c4; font-size: 0.8125rem; font-weight: 700; line-height: 1.4; box-shadow: inset 0 0 0 1px rgb(212 175 106 / 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mg-badge--dur { inset-inline-start: auto; top: auto; inset-inline-end: 12px; bottom: 12px; direction: ltr; }
.mg-poster { position: absolute; inset: 0; overflow: hidden; color: #fff6e8; container-type: size; background: var(--skin), var(--mg-leather); background-blend-mode: var(--skin-bm), normal; }
.mg-poster__t { position: absolute; inset-inline-start: 7%; top: 50%; display: grid; width: 52%; translate: 0 -50%; text-align: start; }
.mg-poster__k { color: #e8cf9c; font-size: max(10px, 3.4cqh); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
html[lang="ar"] .mg-poster__k { letter-spacing: 0; }
.mg-poster__h { margin-top: 0.4em; font-size: max(13px, 8.2cqh); font-weight: 800; line-height: 1.15; text-wrap: balance; }
html[lang="ar"] .mg-poster__h { font-weight: 700; line-height: 1.45; }
.mg-poster__rule { width: 34%; height: 1.5px; margin-top: 4cqh; background: linear-gradient(90deg, #a9824b, #e3c27f, #a9824b); }
.mg-poster__ph { position: absolute; inset-inline-end: 8%; top: 13%; height: 108%; aspect-ratio: 9 / 19.5; padding: 1.6%; border-radius: 9% / 4.2%; background: #160b14; box-shadow: 0 0 0 1.5px #c9a465, 0 20px 40px -14px rgb(0 0 0 / 0.8); rotate: -5deg; }
html[dir="rtl"] .mg-poster__ph { rotate: 5deg; }
.mg-poster__ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 7.5% / 3.5%; }

/* ---------- The sticky search bar with the row chips ---------- */
.mg-sbar { position: sticky; top: var(--mg-top); z-index: 30; padding-block: 12px 10px; background: var(--mg-bar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--g-rim), 0 16px 30px -26px rgb(var(--g-shadow) / 0.7); }
.mg-sbar__in { display: grid; gap: 10px; }
/* While it is stuck, the bar's own tint also fills the strip above it (behind the top bar), so no page content shows through the gap */
.mg-sbar::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: var(--mg-top); background: var(--mg-bar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.mg-sbar.is-stuck::before { opacity: 1; }
.mg-search { position: relative; max-width: 980px; }
.mg-search__field { display: flex; align-items: center; gap: 6px; min-height: 56px; padding-inline: 18px 6px; border-radius: 999px; background: var(--mg-card); box-shadow: inset 0 0 0 1.5px var(--mg-rim), 0 10px 24px -18px rgb(var(--g-shadow) / 0.6); transition: box-shadow var(--mg-hov); }
.mg-search__field:focus-within { box-shadow: inset 0 0 0 2.5px var(--g-gold), 0 0 0 5px rgb(212 175 106 / 0.22), 0 10px 24px -18px rgb(var(--g-shadow) / 0.6); }
.mg-search__field .mg-ico { color: var(--g-gold-text); }
.mg-search__input { flex: 1; min-width: 0; width: 100%; height: 48px; border: 0; background: transparent; color: var(--g-text); font: inherit; font-size: 1.125rem; outline: none; -webkit-appearance: none; appearance: none; }
.mg-search__input::placeholder { color: var(--mg-placeholder); opacity: 1; }
.mg-search__input::-webkit-search-cancel-button { display: none; }
.mg-iconbtn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--mg-ink); cursor: pointer; transition: background-color var(--mg-hov), box-shadow var(--mg-hov), opacity var(--mg-hov); }
.mg-iconbtn svg { width: 22px; height: 22px; }
.mg-iconbtn--clear { opacity: 0; pointer-events: none; }
.mg-iconbtn--clear.is-on { opacity: 1; pointer-events: auto; }
.mg-iconbtn:hover, .mg-iconbtn:focus-visible { background: var(--mg-tint); box-shadow: inset 0 0 0 1.5px var(--g-gold); outline: none; }
.mg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin-inline: -2px; scrollbar-width: none; }
.mg-chips::-webkit-scrollbar { display: none; }
.mg-chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--g-surface); box-shadow: inset 0 0 0 1.5px var(--g-rim); color: var(--mg-ink); font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov); }
.mg-chip.is-on { background: var(--g-plum); color: #fff6e8; box-shadow: inset 0 0 0 1.5px var(--g-gold); }
.mg-chip:hover, .mg-chip:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6), 0 10px 20px -14px rgb(var(--g-shadow) / 0.8); transform: translateY(-1px); outline: none; }

/* The results: one list that rolls down under the box (fade + clip), hidden when the box is empty */
.mg-drop { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 2; opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0 round 20px); transition: opacity 0.22s ease, clip-path 0.26s var(--mg-ease), visibility 0s linear 0.26s; }
.mg-drop.is-on { opacity: 1; visibility: visible; clip-path: inset(0 0 0 0 round 20px); transition: opacity 0.22s ease, clip-path 0.26s var(--mg-ease); }
.mg-drop__in { display: grid; gap: 8px; max-height: min(64vh, 600px); overflow: auto; overscroll-behavior: contain; padding: 12px; border-radius: 20px; background: var(--g-surface); box-shadow: inset 0 0 0 1.5px var(--mg-rim), 0 30px 60px -30px rgb(var(--g-shadow) / 0.75); }
.mg-drop__count, .mg-drop__h { padding: 2px 6px; color: var(--g-muted); font-size: 0.9375rem; font-weight: 600; }
.mg-drop__h { color: var(--g-gold-text); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
html[lang="ar"] .mg-drop__h { letter-spacing: 0; font-size: 0.9375rem; }
.mg-hit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--mg-card); box-shadow: inset 0 0 0 1px var(--g-line); color: var(--g-text); font: inherit; text-align: start; text-decoration: none; cursor: pointer; transition: background-color var(--mg-hov), box-shadow var(--mg-hov), color var(--mg-hov), transform var(--mg-hov); }
.mg-hit__i { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--g-surface-2); box-shadow: inset 0 0 0 1px var(--g-rim); color: var(--g-gold-text); }
.mg-hit__i svg { width: 20px; height: 20px; }
.mg-hit b { font-size: 1.03rem; line-height: 1.35; }
.mg-hit small { color: var(--g-muted); font-size: 0.875rem; line-height: 1.4; display: block; }
.mg-hit:hover, .mg-hit:focus-visible, .mg-hit.is-active { background: var(--mg-tint); box-shadow: inset 0 0 0 1.5px var(--g-gold), 0 10px 22px -16px rgb(var(--g-shadow) / 0.55); color: var(--mg-ink); transform: translateY(-1px); outline: none; }
.mg-none { padding: 10px 12px; color: var(--mg-ink); font-weight: 700; }
.mg-askrow { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 18px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--mg-rim); color: var(--mg-ink); font: inherit; font-size: 1.03rem; font-weight: 700; text-align: start; cursor: pointer; transition: color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov); }
.mg-askrow::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--skin), var(--mg-leather); background-blend-mode: var(--skin-bm), normal; opacity: 0; transition: opacity var(--mg-hov); }
.mg-askrow:hover::before, .mg-askrow:focus-visible::before, .mg-askrow.is-main::before { opacity: 1; }
.mg-askrow:hover, .mg-askrow:focus-visible, .mg-askrow.is-main { color: #fff6e8; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6); outline: none; }
.mg-askrow:hover, .mg-askrow:focus-visible { transform: translateY(-1px); }
.mg-askrow svg { flex: none; width: 20px; height: 20px; }
.mg-askrow span { flex: 1; min-width: 0; }

/* ---------- Rows of video cards ---------- */
.mg-body { padding-bottom: 24px; }
.mg-row { margin-top: clamp(26px, 3vw, 44px); scroll-margin-top: calc(var(--mg-bar) + 12px); }
.mg-row__head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.mg-row__head h2 { color: var(--mg-ink); font-size: clamp(1.4rem, 1.15rem + 0.8vw, 2rem); line-height: 1.2; }
.mg-row__n { color: var(--g-muted); font-size: 0.9375rem; white-space: nowrap; }
.mg-grow { flex: 1; }
.mg-arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--g-surface); color: var(--mg-ink); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--g-rim); transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov); }
.mg-arrow svg { width: 20px; height: 20px; }
.mg-arrow:hover, .mg-arrow:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6); transform: translateY(-1px); outline: none; }
.mg-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 21vw, 420px); gap: clamp(14px, 1.4vw, 24px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--mg-gutter); padding: 6px var(--mg-gutter) 18px; margin-inline: calc(var(--mg-gutter) * -1); scrollbar-width: thin; scrollbar-color: var(--g-rim) transparent; }
.mg-card { display: grid; gap: 10px; align-content: start; padding: 0; border: 0; border-radius: 18px; background: transparent; color: var(--g-text); font: inherit; text-align: start; cursor: pointer; scroll-snap-align: start; }
.mg-card .mg-vid { transition: transform var(--hv-out) ease-out, box-shadow var(--mg-hov); }
.mg-card:hover .mg-vid, .mg-card:focus-visible .mg-vid { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--g-gold), 0 0 0 6px rgb(212 175 106 / 0.22), 0 26px 40px -24px rgb(var(--g-shadow) / 0.9); }
.mg-card:hover .mg-vid__play span, .mg-card:focus-visible .mg-vid__play span { transform: scale(1.08); background: #fff; }
.mg-card:focus-visible { outline: none; }
.mg-card.is-now .mg-vid { box-shadow: 0 0 0 3px var(--g-gold), 0 26px 40px -24px rgb(var(--g-shadow) / 0.9); }
.mg-card__t { padding-inline: 2px; font-size: 1.0625rem; line-height: 1.3; transition: color var(--mg-hov); }
.mg-card:hover .mg-card__t, .mg-card:focus-visible .mg-card__t { color: var(--mg-ink); }
.mg-card__s { padding-inline: 2px; color: var(--g-muted); font-size: 0.875rem; }
.mg-ready { color: #1f7a3a; font-weight: 700; }
[data-theme="dark"] .mg-ready { color: #8fd6a3; }
@media (max-width: 760px) {
  .mg-track { grid-auto-columns: 78%; }
  .mg-row__head .mg-arrow { display: none; }
}

/* ---------- The assistant and "Email us" ---------- */
.mg-helpband { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: clamp(40px, 5vw, 72px); align-items: start; }
@media (min-width: 1100px) { .mg-helpband { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); } }
.mg-askcard { padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: var(--g-surface); box-shadow: inset 0 0 0 1px var(--g-hairline), 0 24px 48px -40px rgb(var(--g-shadow) / 0.7); scroll-margin-top: calc(var(--mg-bar) + 16px); }
.mg-askcard .ask { max-width: none; }
.mg-askcard.is-flash, .mg-ch.is-flash { animation: mg-flash 1.6s ease both; }
@keyframes mg-flash { 0%, 60% { box-shadow: inset 0 0 0 2.5px var(--g-gold), 0 0 0 5px rgb(212 175 106 / 0.3); } 100% { box-shadow: inset 0 0 0 1px var(--g-hairline); } }
.mg-contact { display: grid; gap: 12px; padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: var(--g-surface); box-shadow: inset 0 0 0 1px var(--g-hairline); }
.mg-contact__t { display: flex; align-items: center; gap: 14px; color: var(--mg-ink); font-size: 1.35rem; line-height: 1.3; }
.mg-contact__ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--mg-card); box-shadow: inset 0 0 0 1.5px var(--mg-rim); color: var(--g-gold-text); }
.mg-contact__ico .mg-ico { width: 22px; height: 22px; }
.mg-contact p { color: var(--g-muted); font-size: 1rem; }
.mg-contact .mg-actions { margin-top: 2px; }
.mg-mail { display: inline-block; padding: 2px 6px; margin-inline-start: -6px; border-radius: 8px; color: var(--mg-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--g-rim); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; transition: background-color var(--mg-hov), text-decoration-color var(--mg-hov); }
.mg-mail:hover, .mg-mail:focus-visible { background: var(--mg-tint-2); text-decoration-color: var(--g-gold-text); outline: none; }
[data-theme="dark"] .mg-mail:hover, [data-theme="dark"] .mg-mail:focus-visible { background: var(--mg-tint); }

/* ---------- Everything in the manual: every chapter, many columns ---------- */
.mg-atlas { margin-top: clamp(48px, 6vw, 84px); padding-top: clamp(28px, 3vw, 40px); border-top: 1.5px solid transparent; border-image: var(--g-hairline-line) 1; }
.mg-atlas__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; margin-bottom: 22px; }
.mg-atlas__head h2 { color: var(--mg-ink); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.15; }
html[lang="ar"] .mg-atlas__head h2 { line-height: 1.5; }
.mg-atlas__head p { color: var(--g-muted); }
.mg-atlas__cols { columns: 4 320px; column-gap: 22px; }
.mg-ch { break-inside: avoid; display: grid; gap: 4px; margin: 0 0 22px; padding: 20px 18px 16px; border-radius: 24px; background: var(--g-surface); box-shadow: inset 0 0 0 1px var(--g-hairline); scroll-margin-top: calc(var(--mg-bar) + 16px); }
.mg-ch h3 { display: flex; gap: 12px; align-items: center; margin: 0 0 8px; padding-inline: 4px; color: var(--mg-ink); font-size: 1.2rem; line-height: 1.3; }
html[lang="ar"] .mg-ch h3 { line-height: 1.55; }
.mg-ch__n { flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding-inline: 6px; border-radius: 999px; background: var(--mg-card); box-shadow: inset 0 0 0 1.5px var(--mg-rim); color: var(--g-gold-text); font-size: 0.875rem; font-weight: 800; }
.mg-ch__intro { padding: 0 6px 8px; color: var(--g-muted); font-size: 0.9375rem; }
.mg-ch__intro ul { display: grid; gap: 4px; padding-inline-start: 18px; list-style: disc; }
.mg-topic { border-radius: 14px; scroll-margin-top: calc(var(--mg-bar) + 16px); transition: background-color var(--mg-hov), box-shadow var(--mg-hov); }
.mg-topic > summary { position: relative; display: block; padding: 8px 10px; padding-inline-end: 34px; border-radius: 14px; color: var(--mg-ink); font-size: 0.98rem; font-weight: 600; line-height: 1.4; list-style: none; cursor: pointer; transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov), transform var(--mg-hov); }
.mg-topic > summary::-webkit-details-marker { display: none; }
.mg-topic > summary::after { content: ""; position: absolute; inset-inline-end: 12px; top: 50%; width: 8px; height: 8px; margin-top: -5px; border-block-start: 2px solid var(--g-gold-text); border-inline-end: 2px solid var(--g-gold-text); rotate: 45deg; opacity: 0.7; transition: opacity var(--mg-hov), translate var(--mg-hov); }
html[dir="rtl"] .mg-topic > summary::after { rotate: -45deg; }
.mg-topic > summary:hover, .mg-topic > summary:focus-visible { background: var(--mg-tint); box-shadow: inset 0 0 0 1.5px var(--g-gold); outline: none; }
.mg-topic > summary:hover::after, .mg-topic > summary:focus-visible::after { opacity: 1; translate: 3px 0; }
html[dir="rtl"] .mg-topic > summary:hover::after, html[dir="rtl"] .mg-topic > summary:focus-visible::after { translate: -3px 0; }
.mg-topic[open] { background: var(--mg-card); box-shadow: inset 0 0 0 1px var(--g-rim); }
.mg-topic__body { display: grid; gap: 10px; padding: 4px 12px 14px; color: var(--g-text); font-size: 1rem; }
/* Chapter boxes show their first 3 topics; the rest roll down under "More (N)" (manual.js adds .is-fold; .is-all = expanded) */
.mg-ch__rest { display: grid; grid-template-rows: 1fr; }
.mg-ch__rest-in { display: grid; gap: 4px; min-height: 0; }
.mg-ch.is-fold .mg-ch__rest { grid-template-rows: 0fr; margin-top: -4px; transition: grid-template-rows 0.42s var(--mg-ease), margin-top 0.42s var(--mg-ease); }
.mg-ch.is-fold .mg-ch__rest-in { overflow: hidden; visibility: hidden; transition: visibility 0s linear 0.42s; }
.mg-ch.is-fold.is-all .mg-ch__rest { grid-template-rows: 1fr; margin-top: 0; }
.mg-ch.is-fold.is-all .mg-ch__rest-in { visibility: visible; transition: visibility 0s; }
.mg-ch__more { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin: 6px 0 0 4px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--g-gold-text); font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--g-rim); transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov); }
html[dir="rtl"] .mg-ch__more { margin: 6px 4px 0 0; }
.mg-ch__more[hidden] { display: none; }
.mg-ch__more::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-block-end: 2px solid currentColor; border-inline-end: 2px solid currentColor; rotate: 45deg; transition: rotate 0.3s var(--mg-ease), margin-top 0.3s var(--mg-ease); }
.mg-ch__more[aria-expanded="true"]::after { rotate: 225deg; margin-top: 3px; }
.mg-ch__more:hover, .mg-ch__more:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6); outline: none; }
.mg-fold > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 2px 0 4px; padding: 6px 14px; border-radius: 999px; color: var(--g-gold-text); font-size: 0.9375rem; font-weight: 700; list-style: none; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--g-rim); transition: background-color var(--mg-hov), color var(--mg-hov), box-shadow var(--mg-hov); }
.mg-fold > summary::-webkit-details-marker { display: none; }
.mg-fold > summary::before { content: "+"; font-weight: 800; }
.mg-fold[open] > summary::before { content: "–"; }
.mg-fold > summary:hover, .mg-fold > summary:focus-visible { background: var(--g-plum); color: #e9cf9a; box-shadow: inset 0 0 0 1px rgb(226 196 138 / 0.6); outline: none; }

/* Manual prose (topics in place and in the reader) */
.mg-prose { font-size: 1.0625rem; line-height: 1.65; }
.mg-prose p, .mg-topic__body p { margin: 0; }
.mg-prose > * + * { margin-top: 0.8em; }
.mg-prose ul, .mg-prose ol, .mg-topic__body ul, .mg-topic__body ol { display: grid; gap: 6px; padding-inline-start: 1.3em; list-style: disc; }
.mg-prose ol, .mg-topic__body ol { list-style: decimal; }
.mg-prose ul ul, .mg-topic__body ul ul { margin-top: 6px; list-style: circle; }
.mg-prose li::marker { color: var(--g-gold-text); font-weight: 700; }
.mg-prose strong { color: var(--mg-ink); }

/* ---------- The reader sheet (manual.js) ----------
   A floating panel that starts below the stuck top bar (the bar stays visible and usable; the scrim and the sheet sit under it),
   rounded, with a gap all round. It slides in from the end side (right in English, left in Arabic) and its content fades up after;
   closing reverses; changing topic while open cross-fades (.is-swap). Its background is the home page's safety-section light
   (--bk-pool, glass.css "back A"), laid over the page colour; in light mode a pale pool of the same shape (--mg-pool). */
.mg-scrim { position: fixed; inset: 0; z-index: 37; background: rgb(30 12 27 / 0.42); opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.mg-scrim.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.mg-sheet {
  --mg-pool: radial-gradient(closest-side, color-mix(in srgb, #fff 62%, transparent) 0%, color-mix(in srgb, var(--g-surface) 72%, transparent) 52%, color-mix(in srgb, var(--g-surface) 30%, transparent) 80%, transparent 100%);
  position: fixed; z-index: 38; isolation: isolate; overflow: hidden;
  top: calc(var(--mg-top) + 6px); bottom: 12px; inset-inline-end: 12px;
  display: flex; flex-direction: column; width: min(780px, calc(100vw - 24px));
  border-radius: 26px; background: var(--g-bg); color: var(--g-text);
  box-shadow: 0 0 0 1.5px var(--g-rim), -24px 24px 70px -30px rgb(var(--g-shadow) / 0.6);
  transform: translateX(calc(100% + 40px)); visibility: hidden;
  transition: transform 0.45s var(--mg-ease), visibility 0s linear 0.45s;
}
html.glass[data-theme="dark"] .mg-sheet { --mg-pool: var(--bk-pool); }
.mg-sheet::before { content: ""; position: absolute; z-index: -1; inset: -8% -22%; background: var(--mg-pool); pointer-events: none; }
html[dir="rtl"] .mg-sheet { transform: translateX(calc(-100% - 40px)); }
.mg-sheet.is-open { transform: none !important; visibility: visible; transition: transform 0.45s var(--mg-ease); }
.mg-sheet__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--g-line); background: transparent; }
.mg-sheet__bar, .mg-sheet__body { opacity: 0; translate: 0 14px; transition: opacity 0.18s ease, translate 0.18s ease; }
.mg-sheet.is-open .mg-sheet__bar, .mg-sheet.is-open .mg-sheet__body { opacity: 1; translate: 0 0; transition: opacity 0.38s ease 0.2s, translate 0.45s var(--mg-ease) 0.2s; }
.mg-sheet.is-open .mg-sheet__body.is-swap { opacity: 0; translate: 0 6px; transition: opacity 0.14s ease, translate 0.14s ease; }
.mg-sheet__where { flex: 1; min-width: 0; overflow: hidden; color: var(--g-gold-text); font-size: 0.875rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mg-sheet__body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px clamp(18px, 4vw, 44px) 40px; }
/* the thin gold scroll bar (same gold as the assistant box's) */
.mg-sheet__body::-webkit-scrollbar { width: 9px; }
.mg-sheet__body::-webkit-scrollbar-track { margin-block: 14px; background: transparent; }
.mg-sheet__body::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: linear-gradient(180deg, #e3c27f, #b98f4f) padding-box; }
.mg-sheet__body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f1d79b, #cba673) padding-box; }
@supports (-moz-appearance: none) { .mg-sheet__body { scrollbar-width: thin; scrollbar-color: #c9a465 transparent; } }
.mg-sheet__body h2 { margin: 6px 0 16px; color: var(--mg-ink); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); line-height: 1.2; }
html[lang="ar"] .mg-sheet__body h2 { line-height: 1.5; }
.mg-sheet__kicker { color: var(--g-gold-text); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
html[lang="ar"] .mg-sheet__kicker { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.mg-sheet__videos { display: grid; gap: 14px; margin-bottom: 22px; }
.mg-sheet__videos .mg-vid--sheet { box-shadow: 0 0 0 1.5px var(--g-rim), 0 24px 50px -28px rgb(var(--g-shadow) / 0.8); }
.mg-sheet__vt { margin-top: 6px; color: var(--g-muted); font-size: 0.9375rem; font-weight: 600; }
.mg-sheet__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--g-line); }
.mg-sheet__more { margin-top: 28px; }
.mg-sheet__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mg-sheet__chips .mg-chip { white-space: normal; text-align: start; }
html.mg-lock { overflow: hidden; }
.mg-btn--plum { background: var(--g-plum); color: #fff6e8; box-shadow: inset 0 0 0 1.5px rgb(212 175 106 / 0.6); }
[data-theme="dark"] .mg-btn--plum { background: #5a2d54; }

/* Hover-in is quick (--hv-in); the base transition above is the slower hover-out (owner 2026-10-23). */
:is(.mg-headlink, .mg-btn, .mg-chip, .mg-hit, .mg-askrow, .mg-arrow, .mg-iconbtn, .mg-mail, .mg-fold > summary, .mg-ch__more, .mg-topic > summary):is(:hover, :focus-visible, :active),
.mg-topic:is(:hover, :focus-within), .mg-askrow:is(:hover, :focus-visible, :active)::before, .mg-topic > summary:is(:hover, :focus-visible)::after,
.mg-card:hover .mg-vid, .mg-card:hover .mg-card__t, .mg-card:hover .mg-vid__play span, .mg-card:focus-visible .mg-vid__play span, .mg-search__field:focus-within { transition-duration: var(--hv-in); }
@media (hover: none) { .mg-btn:hover, .mg-chip:hover, .mg-hit:hover, .mg-askrow:hover, .mg-arrow:hover, .mg-headlink:hover, .mg-card:hover .mg-vid { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mg-sheet, .mg-sheet.is-open { transition: visibility 0s, opacity 0.15s ease; }
  .mg-sheet { opacity: 0; transform: none; }
  .mg-sheet.is-open { opacity: 1; }
  .mg-sheet__bar, .mg-sheet__body, .mg-sheet.is-open .mg-sheet__bar, .mg-sheet.is-open .mg-sheet__body { translate: none; transition: opacity 0.15s ease; }
  .mg-ch__rest, .mg-ch__rest-in { transition: none; }
  .mg-drop, .mg-drop.is-on { clip-path: none; transition: opacity 0.15s ease, visibility 0s linear 0.15s; }
  .mg-card .mg-vid, .mg-btn, .mg-chip, .mg-hit { transition-property: background-color, color, box-shadow; }
}

/* The chips scroll sideways on narrow screens: their far edge fades to show there is more */
@media (max-width: 1099px) {
  .mg-chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); padding-inline-end: 28px; }
  html[dir="rtl"] .mg-chips { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
}
/* Phones: the logo alone, so Help, light/dark and the language always fit */
@media (max-width: 480px) {
  .page--manual .simple-head { gap: 8px; }
  .page--manual .simple-head .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Leather offsets (owner 2026-10-23): each plum surface sits on its own spot of the hide. */
.mg-hero { --lx: -1130px; --ly: -520px; }
.mg-poster { --lx: -460px; --ly: -980px; }
.mg-askrow { --lx: -600px; --ly: -1340px; }
