/* خُطى — the component library. The approved language (26-11, «A · duolingo premium», round4 ART-DIRECTION.md):
   white and airy · one centred thing per screen · big confident type (800) · chunky rounded buttons that rest on a soft
   darker bottom edge and sink into it when pressed · static groups get a 1px hairline (or nothing), only pressable things
   keep the 2px edge + lip · banana yellow is a highlighter, not paint · no beige panels, no emoji, no glows.
   Pictures = the glossy 3D family in /a/art/ through Academy.art() (§17).
   Pages are assembled ONLY from these classes (academy/COMPONENTS.md). Colours, sizes and motion come from tokens.css.
   Breakpoints: phone < 700 · tablet 700–1099 · laptop ≥ 1100.
   Old names (paper, notebook, stamp, sticky, ticket, receipt, club, ccard…) still work: they are drawn in this language. */

/* ───────── 1. base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: hidden; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 400; font-size: 1rem; line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: var(--lh-tight); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
.nw { white-space: nowrap; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong { font-weight: 700; }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--banana); color: var(--on-accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 200; background: var(--ink); color: var(--inv); padding: 10px 18px; border-radius: var(--r-sm); font-weight: 600; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* icons: one line set on a 24 grid (the sprite in index.html). Doodles are retired: they only show inside .empty__art */
.ico { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 16px; height: 16px; }
.ico--lg { width: 26px; height: 26px; }
.ico--fill { fill: currentColor; }
.doodle { display: none; }

/* ───────── 2. type ───────── */
/* (round4) the scale: display · h1 · h2 · h3 · lead · text · label · caption. Letter-spacing 0 always (Arabic joining) */
.h1 { font-size: var(--t-h1); font-weight: 800; line-height: 1.25; }
.h2 { font-size: var(--t-h2); font-weight: 800; line-height: 1.32; }
.h3 { font-size: var(--t-h3); font-weight: 700; line-height: 1.45; }
.h4 { font-size: var(--t-h3); font-weight: 700; line-height: 1.45; }
.display { font-size: var(--t-display); font-weight: 800; line-height: 1.18; }
.lead { font-size: var(--t-lead); color: var(--ink-2); max-width: 34em; line-height: 1.75; }
.text { font-size: var(--t-md); color: var(--ink-2); max-width: 38em; line-height: 1.8; }
.cap { font-size: var(--t-cap); font-weight: 500; color: var(--muted); line-height: 1.55; }
@media (min-width: 1100px) { .lead { max-width: 30em; } }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.tiny { font-size: var(--t-xs); }
.strong { font-weight: 600; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; display: inline-block; }
/* the eyebrow above a big heading: a quiet pill with a banana dot */
/* (round4) only on hero pages (home, a course, about, community, the app); task pages start with their title */
.kick { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 14px; border-radius: var(--r-pill); border: var(--hair); background: var(--surface);
  font-weight: 500; font-size: var(--t-cap); color: var(--ink-2); line-height: 1.4; }
.kick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--banana); flex: none; }
.kick--plain { border: 0; padding: 0; min-height: 0; }
.link { font-weight: 600; padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 100% 1.5px; transition: background-size var(--dur-2) var(--ease); cursor: pointer; border: 0; }
button.link { background-color: transparent; padding-inline: 0; }
.link:hover { background-size: 40% 1.5px; }
/* the drawn underline (he loves it): a banana bar under ONE or two words on the LAST line of a title, ONE per screen.
   (round4 §3.6) tilted -1deg like a hand-made stroke (his own site), drawn from the start of the Arabic word (the right),
   650ms ease-in-out, 280ms after the title has risen. Once per page view. --mark-d moves the start if a page needs it */
.mark { position: relative; z-index: 0; white-space: nowrap; }
.mark::after { content: ""; position: absolute; z-index: -1; inset-inline: -.12em; bottom: .04em; height: .26em; border-radius: 4px; background: var(--hl, var(--banana));
  transform: rotate(-1deg) scaleX(0); transform-origin: 100% 50%; animation: hl var(--dur-draw) var(--mark-d, .7s) var(--ease-in-out) forwards; }
[dir="ltr"] .mark::after { transform-origin: 0 50%; }
:root[data-moved] .mark::after { animation-delay: var(--mark-d, .42s); }
/* (round5, item 11) a REAL highlighter in both looks. Day: a marker swipe (his site's own stroke) under the lower half of the
   word, ink letters. Night: the whole word sits on banana and its letters turn dark (white letters on yellow could not be read,
   and the thin bar hid behind them). The shape is set with a stronger selector on purpose: the old per-page sizes
   (p-home/p-about/p-app/p-account/p-community `… .mark::after { height; bottom }`) no longer change it. */
html:root .mark::after { inset-inline: -.16em; top: auto; bottom: .3em; height: .44em; border-radius: 0; rotate: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 12C46 6 122 10 195 4L197 30C140 35 72 31 3 38Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 12C46 6 122 10 195 4L197 30C140 35 72 31 3 38Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
html:root[data-theme="dark"] .mark::after { inset-inline: -.2em; top: -.04em; bottom: -.15em; height: auto;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath d='M7 9C52 3 128 7 194 2L198 88C150 97 70 92 2 98L4 50Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath d='M7 9C52 3 128 7 194 2L198 88C150 97 70 92 2 98L4 50Z'/%3E%3C/svg%3E"); }
/* night: the letters go dark WITH the stroke (same delay, same draw), so the word never disappears on the black page.
   (round5d night-global) the letters' animation lives on .mark in BOTH looks (by day it starts from the word's own colour,
   a no-op), so switching day↔night never restarts it: the letters are dark on the banana from the very first frame.
   (Before, night added the animation, so every switch to night replayed «white letters, then dark» on the full marker.) */
.mark { animation: hl-ink var(--dur-draw) var(--mark-d, .7s) var(--ease-in-out) both; }
:root[data-moved] .mark { animation-delay: var(--mark-d, .42s); }
:root[data-theme="dark"] .mark { color: var(--hl-ink); --mark-from: var(--ink); }
/* a mark inside a section that reveals on scroll waits for it (both the stroke and, at night, the letters) */
.js-reveal [data-reveal]:not(.is-in) .mark, .js-reveal [data-reveal]:not(.is-in) .mark::after { animation-play-state: paused; }
@keyframes hl-ink { from { color: var(--mark-from); } 45% { color: var(--mark-from); } }
:root[data-theme="dark"] .kick::before { box-shadow: none; }   /* no muddy halo at night */
.mark--pink::after, .mark--peach::after, .mark--lilac::after { background: var(--banana); }
/* a side note: quiet, straight */
.hand { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: var(--t-sm); color: var(--muted); }

/* ───────── 3. layout helpers ───────── */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.wrap--text { max-width: calc(560px + 2 * var(--gutter)); }
.wrap--form { max-width: calc(var(--form-w) + 2 * var(--gutter)); }   /* a page that is one form (sign-in, a setting) */
.wrap--read { max-width: calc(var(--read-w) + 2 * var(--gutter)); }   /* a page to read */
.page { padding-block: var(--page-top) var(--page-bottom); }
/* the top of a page: centred, one big heading (use .page-head--start for a left-aligned admin page) */
.page-head { display: grid; gap: var(--s-3); margin-bottom: var(--gap-block); justify-items: center; text-align: center; }
.page-head .lead { margin-inline: auto; }
.page-head > .back { justify-self: start; }
.page-head--start { justify-items: start; text-align: start; }
.page-head--start .lead { margin-inline: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--s-4)); }
.stack--sm { --gap: var(--s-2); } .stack--lg { --gap: var(--s-7); } .stack--xl { --gap: var(--s-9); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s-3)); }
.row--between { justify-content: space-between; } .row--end { justify-content: flex-end; } .row--center { justify-content: center; } .row--top { align-items: flex-start; } .row--nowrap { flex-wrap: nowrap; }
.grow { flex: 1 1 0; min-width: 0; }
.center { text-align: center; justify-items: center; align-items: center; }
.grid { display: grid; gap: var(--gap, var(--s-5)); grid-template-columns: minmax(0, 1fr); }
.split, .l-app, .l-auth { display: grid; gap: var(--s-7); grid-template-columns: minmax(0, 1fr); align-items: start; }
.l-auth { max-width: var(--form-w); margin-inline: auto; }
/* a centred screen: one clear thing in the middle of the viewport (sign-in, a confirmation, an empty page) */
.l-center { min-height: calc(100dvh - var(--bar-h) - var(--tabbar-h) - 40px); display: grid; align-content: center; justify-items: center; text-align: center; gap: var(--s-5); padding-block: var(--s-7); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: var(--t-sm); color: var(--ink-2); background: none; border: 0; padding: 0; }
.back:hover { color: var(--ink); }
.hr { height: 1px; border: 0; background: var(--line); margin: 0; }
.hr--dashed { height: 0; background: none; border: 0; border-top: 1.5px dashed var(--line-2); }
/* a section heading row: title + a quiet link at the end */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.sec__title { font-size: var(--t-h3); font-weight: 800; }
.sec__link { font-size: var(--t-cap); font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.sec__link:hover { color: var(--ink); }
@media (max-width: 699px) {
  .from-tablet, .only-tablet, .only-desk { display: none !important; }
  /* the main action of a page stays in the thumb zone, above the tab bar */
  /* (round3b) plain while it sits in the page; the frosted frame only once it really floats over the content (.is-stuck, the shell) */
  .actionbar { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; align-items: center; gap: var(--s-3); padding: 10px 10px 14px; margin-inline: -6px;
    background: transparent; border-radius: var(--r-card); border: 1px solid transparent; transition: background-color var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2); }
  .actionbar.is-stuck { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--e3-ring); box-shadow: var(--e3); }
  .actionbar > .btn { flex: 1; }
}
@media (min-width: 700px) {
  .only-phone { display: none !important; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .split--aside { grid-template-columns: minmax(0, 1fr) 300px; }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actionbar { display: flex; align-items: center; gap: var(--s-4); }
}
@media (min-width: 700px) and (max-width: 1099px) { .only-phone, .only-desk { display: none !important; } }
@media (min-width: 1100px) {
  .only-tablet, .until-desk { display: none !important; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split--aside { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-9); }
  .l-app { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); }
  .l-app__aside { position: sticky; top: var(--s-6); display: grid; gap: var(--s-5); }
  .l-auth--art { max-width: 980px; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: var(--s-10); align-items: center; }
}

/* a band across the page: only a hairline above and below (never a coloured or beige panel) */
.band { position: relative; border-block: var(--hair); padding-block: var(--gap-section); }
.band--flat-end { border-bottom: 0; }
.band--desk { background: none; }
.wave, .wave--flip { display: none; }

/* ───────── 4. buttons: chunky, rounded, on a soft darker bottom edge ─────────
   <a class="btn btn--primary">ابدأ مجاناً</a> = THE main action (ONE banana button per screen). Others are quiet (white, a 2px
   hairline, a grey lip) or text buttons for anything secondary («لاحقاً», «غيّر صورتك»).
   (round4 §3.4, the signature) pressed: it sinks by its whole edge in 90ms, linear; released: it springs back (pop spring 260ms).
   Hover (mouse only): lifts 1px, the lip grows 1px. */
.btn { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-ring: var(--line); --btn-edge: var(--line-2); --btn-h: var(--edge-q);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: var(--h-ctl); padding: .35em 1.5em; margin-bottom: var(--btn-h);
  border: 0; border-radius: var(--r-ctl); background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: var(--t-label); line-height: 1.35; text-align: center; white-space: nowrap;
  box-shadow: inset 0 0 0 2px var(--btn-ring), 0 var(--btn-h) 0 var(--btn-edge);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform 260ms var(--spring-pop), box-shadow 260ms var(--spring-pop), background-color var(--dur-2), color var(--dur-2), opacity var(--dur-2); }
.btn:active { transform: translateY(var(--btn-h)); box-shadow: inset 0 0 0 2px var(--btn-ring), 0 0 0 var(--btn-edge); transition-duration: var(--dur-press); transition-timing-function: linear; }
.btn--primary { --btn-bg: var(--banana); --btn-fg: var(--on-accent); --btn-ring: transparent; --btn-edge: var(--banana-d); --btn-h: var(--edge); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--inv); --btn-ring: transparent; --btn-edge: var(--edge-ink); --btn-h: var(--edge); }
:root[data-theme="dark"] .btn--dark { --btn-bg: #333333; --btn-fg: var(--ink); --btn-ring: #444444; --btn-edge: #050505; }   /* night: a raised grey, never a silver slab */
.btn--ghost, .btn--paper { --btn-bg: var(--surface); }
.btn--soft { --btn-bg: var(--surface-2); --btn-ring: transparent; --btn-edge: var(--surface-3); }
.btn--danger { --btn-bg: var(--danger-t); --btn-fg: var(--danger); --btn-ring: transparent; --btn-edge: color-mix(in srgb, var(--danger) 22%, var(--danger-t)); }
.btn--text { --btn-bg: transparent; --btn-ring: transparent; --btn-edge: transparent; --btn-h: 0px; padding-inline: .6em; color: var(--muted); }
.btn--text:hover { color: var(--ink); }
.btn--sm { min-height: var(--h-ctl-sm); padding: .3em 1.1em; font-size: var(--t-sm); border-radius: var(--r-sm); --btn-h: 3px; }
.btn--sm.btn--primary, .btn--sm.btn--dark { --btn-h: 4px; }
.btn--lg { min-height: var(--h-ctl-lg); padding: .45em 1.8em; font-size: 1.0625rem; }   /* 54px, label 17/700 */
.btn--block { display: flex; width: 100%; }
.btn .ico { width: 1.15em; height: 1.15em; stroke-width: 2.1; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.2em; height: 1.2em; border-radius: 50%; border: 2.5px solid var(--btn-fg); border-inline-start-color: transparent; animation: spin .7s linear infinite; }
/* a vertical pair (the hero's «ابدأ مجاناً» + «عندي حساب») */
.btn-stack { display: grid; gap: 10px; width: 100%; max-width: 360px; }
.btn-stack > .btn { width: 100%; }
.btn-stack > .btn--lg { min-height: 58px; }   /* the hero pair (round4: 58) */
.iconbtn { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; background: transparent; color: var(--ink); -webkit-tap-highlight-color: transparent;
  transition: transform 260ms var(--spring-pop), background-color var(--dur-2); }
.iconbtn:active { transform: scale(.92); transition-duration: var(--dur-press); }
.iconbtn--paper { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px var(--btn-ring), 0 calc(var(--btn-h) + 1px) 0 var(--btn-edge); transition-duration: 180ms, 180ms, var(--dur-2), var(--dur-2), var(--dur-2); transition-timing-function: var(--ease); }
  .btn:not(.btn--primary):not(.btn--dark):not(.btn--soft):not(.btn--danger):not(.btn--text):hover { --btn-ring: var(--line-2); }
  .btn--text:hover { transform: none; box-shadow: none; }
  .btn:active { transform: translateY(var(--btn-h)); box-shadow: inset 0 0 0 2px var(--btn-ring), 0 0 0 var(--btn-edge); transition-duration: var(--dur-press); transition-timing-function: linear; }
  .iconbtn:hover { background: var(--surface-2); }
}

/* ───────── 5. small things ───────── */
/* the logo: the stair mark + the name (the name comes from brand.js through data-brand="name") */
.tag { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: -.01em; white-space: nowrap; min-height: 40px; }
/* the logo mark itself is brand.js «logo» (var(--logo), set before the first paint) */
.tag::before { content: ""; width: 34px; height: 34px; flex: none; background: var(--logo) center / 100% no-repeat; }
.tag--sm { font-size: 1.05rem; gap: 8px; min-height: 32px; } .tag--sm::before { width: 26px; height: 26px; }
.tag--mark { font-size: 0; gap: 0; }
a.tag { transition: opacity var(--dur-2); } a.tag:active { opacity: .7; }

/* (round4) a chip is for a STATUS only (مؤكّد، مفتوح، مخفي): 26px, a 1px hairline, 13/600, no fill. «مشترك» = soft banana, no ring */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 11px; border-radius: var(--r-pill); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-weight: 600; font-size: .8125rem; line-height: 1.4; white-space: nowrap; }
.chip--line { background: transparent; }
.chip--banana, .chip--peach, .chip--lilac, .chip--mauve, .chip--pink, .chip--accent { background: var(--banana-t); box-shadow: none; color: var(--ink); }
:root[data-theme="dark"] .chip--banana, :root[data-theme="dark"] .chip--accent { box-shadow: inset 0 0 0 1px var(--banana-line); }
.chip--danger { background: var(--danger-t); box-shadow: none; color: var(--danger); }
.chip--ink { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }   /* (round4) a strong status, still no fill */
.chip--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--banana)); flex: none; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--inv); font-weight: 700; font-size: .72rem; line-height: 1; }

/* (round4) a circle with a 1px hairline ring; a letter sits on --surface-2 in ink (a page may still colour it with --c) */
.avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--c, var(--surface-2)); color: var(--ink); font-weight: 800; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.avatar[style*="--c"] { color: var(--on-accent); }
.avatar:has(img) { box-shadow: 0 0 0 1px var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: var(--t-sm); } .avatar--lg { width: 76px; height: 76px; font-size: var(--t-xl); }

/* a small note (was: sticker / sticky note): white, a hairline, a banana dot — never a tinted panel */
.sticker, .sticky { display: inline-block; max-width: 22em; background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: 12px 16px; font-weight: 500; font-size: var(--t-sm); line-height: 1.6; box-shadow: inset 0 0 0 1px var(--line); }
.sticker b, .sticky b { display: block; font-size: 1rem; font-weight: 800; }
.sticky::after { display: none; }
.tilt { transform: none; }

/* a status chip (was: rubber stamp) — «مفتوح» / «قريباً» / «تمّ» */
.stamp { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 11px; border-radius: var(--r-pill); background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: .8125rem; line-height: 1.4; white-space: nowrap; }
.stamp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--banana); flex: none; }
.stamp--soon::before { background: var(--line-2); }
.stamp--done::before { width: 11px; height: 7px; border-radius: 0; background: none; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.stamp--lg { min-height: 34px; padding: 4px 14px; font-size: var(--t-sm); }
.tape { display: none !important; }

/* a card (use rarely: the ONE card of a screen): white + a 1px hairline (E1), radius 24. A static card has NO lip (the lip
   means «you can press me»). As a link it rests on a 4px edge and sinks when pressed (E2). No fills, no shadows. */
.card, .paper { position: relative; background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); padding: var(--s-6); }
.card--tight, .paper--tight { padding: var(--s-4); border-radius: var(--r-lg); } .card--roomy, .paper--roomy { padding: var(--s-7); }
.card--flat, .paper--flat { box-shadow: inset 0 0 0 1px var(--line); }
.card--sunk, .paper--sunk { background: var(--surface-2); box-shadow: none; }
.paper--sheet, .paper--lined, .paper--grid { background-image: none; }
.paper--banana, .paper--peach, .paper--lilac, .paper--pink, .card--accent { background: var(--banana-t); box-shadow: inset 0 0 0 1px var(--banana-line); }
a.card, a.paper, button.card, button.paper, .card--press { display: block; text-align: start; border: 0; width: 100%; margin-bottom: var(--edge-q); box-shadow: inset 0 0 0 2px var(--line), 0 var(--edge-q) 0 var(--line);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
a.card:active, a.paper:active, button.card:active, button.paper:active, .card--press:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
@media (hover: hover) { a.card:hover, a.paper:hover, button.card:hover, button.paper:hover, .card--press:hover { box-shadow: inset 0 0 0 2px var(--line-2), 0 var(--edge-q) 0 var(--line-2); } }
@media (min-width: 700px) { .card--roomy, .paper--roomy { padding: var(--s-8); } }
.paper .paper, .card .card, .card .paper, .paper .card { box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 0; }

/* a photo (was: polaroid) — rounded, a hairline, straight. Never a photo of people on public pages. */
.polaroid { position: relative; width: min(100%, var(--w, 320px)); background: var(--surface); color: var(--ink); padding: 0; border-radius: var(--r-media); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); transform: none; }
.polaroid img, .polaroid__slot { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 22%; background: var(--surface-2); }
.polaroid__slot { display: grid; place-items: center; text-align: center; color: var(--muted); font-weight: 500; font-size: var(--t-sm); padding: var(--s-4); }
.polaroid figcaption { padding: 12px 16px 14px; font-weight: 600; font-size: var(--t-sm); line-height: 1.5; }

/* a number with its label (only real numbers) */
/* a number with its label (only real numbers). (round4) quiet: no frame; put several in a .stats row (one hairline row) */
.stat { position: relative; display: grid; gap: 0; padding: 14px 16px; background: var(--surface); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.stat b { font-size: var(--t-xl); font-weight: 800; line-height: 1.3; direction: ltr; text-align: end; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.stat span { font-weight: 500; font-size: var(--t-cap); color: var(--muted); }
/* (round4) a row of numbers on one hairline: <div class="stats"><div class="stats__i"><b class="num">9</b><span>أعضاء</span></div>…</div> */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-block: var(--hair); }
.stats__i { display: grid; gap: 2px; align-content: center; min-width: 0; padding: 14px 16px; color: inherit; }
.stats__i + .stats__i { border-inline-start: var(--hair); }
.stats__i b { font-size: var(--t-h2); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats__i span { font-size: var(--t-cap); font-weight: 600; color: var(--ink-2); }
.stats__i small { font-size: var(--t-cap); color: var(--muted); line-height: 1.5; }
a.stats__i { transition: background-color var(--dur-1); } a.stats__i:active { background: var(--surface-2); }
@media (hover: hover) { a.stats__i:hover { background: var(--surface-2); } }

.price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: var(--t-xl); line-height: 1.3; }
.price small { font-weight: 500; font-size: var(--t-sm); color: var(--ink-2); }
.price s { font-weight: 400; font-size: var(--t-md); color: var(--muted); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; }
.kv dt { color: var(--muted); font-size: var(--t-sm); } .kv dd { font-weight: 600; text-align: end; overflow-wrap: anywhere; }
/* (round4) a 6px track, banana fill, round caps (the ring of the member home is the same colours, 8px stroke) */
.progress { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--banana)); transform-origin: 100% 50%; transform: scaleX(var(--p, 0)); transition: transform var(--dur-4) var(--ease-in-out); }
.progress--thin { height: 4px; }
[dir="ltr"] .progress > i { transform-origin: 0 50%; }

/* ───────── 6. a course ─────────
   The old «notebook» markup is drawn as a white card: a soft cover area on top (a big word), then the label.
   <article class="notebook">… __cover (the card) › __icon (the cover area) · __stamp · __label · __meta · __foot */
.notebook { --ct: var(--surface-2); position: relative; display: flex; flex-direction: column; min-width: 0; }   /* (round4) never a banana panel */
.notebook--lilac, .notebook--mauve, .notebook--pink, .notebook--peach { --ct: var(--surface-2); }
.notebook__tab, .notebook::before { display: none; }
.notebook__cover { position: relative; flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: var(--s-3); min-width: 0; padding: 0 0 var(--s-5); background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg); box-shadow: inset 0 0 0 2px var(--line), 0 var(--edge-q) 0 var(--line); overflow: hidden; transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.notebook__cover::before, .notebook__cover::after { display: none; }
.notebook__icon { order: -1; height: 128px; display: grid; place-items: center; background: var(--ct); color: var(--ink); margin: 2px 2px var(--s-1); border-radius: calc(var(--r-lg) - 2px) calc(var(--r-lg) - 2px) 0 0; }
.notebook__icon .ico { width: 40px; height: 40px; stroke-width: 1.6; }
.notebook__stamp { position: absolute; z-index: 1; top: 14px; inset-inline-start: 14px; }
.notebook__label { display: grid; gap: 4px; padding-inline: var(--s-5); }
.notebook__title { font-size: var(--t-lg); font-weight: 800; line-height: 1.45; }
.notebook__desc { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.7; }
.notebook__meta { display: flex; flex-wrap: wrap; gap: 6px; padding-inline: var(--s-5); }
.notebook__foot { margin-top: auto; padding: var(--s-2) var(--s-5) 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.notebook--lg .notebook__icon { height: 168px; }
.notebook--lg .notebook__title { font-size: var(--t-xl); }
.notebook--row .notebook__cover { flex-direction: row; align-items: center; gap: var(--s-4); padding: var(--s-3); padding-inline-end: var(--s-4); }
.notebook--row .notebook__icon { order: 0; width: 60px; height: 60px; flex: none; border-radius: var(--r-md); margin: 0; }
.notebook--row .notebook__icon .ico { width: 26px; height: 26px; }
.notebook--row .notebook__label { flex: 1; align-self: center; padding: 0; gap: 2px; }
.notebook--row .notebook__title { font-size: var(--t-md); }
.notebook--row .notebook__stamp { position: static; flex: none; }
.notebook--row .notebook__meta { padding: 0; }
.notebook--row .notebook__foot { margin: 0; padding: 0; align-self: center; flex: none; }
a.notebook:active .notebook__cover { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
@media (hover: hover) { a.notebook:hover .notebook__cover, .notebook:has(a.notebook__go):hover .notebook__cover { box-shadow: inset 0 0 0 2px var(--line-2), 0 var(--edge-q) 0 var(--line-2); } }

/* the course card for pages built from now on:
   <a class="ccard" href="/courses/ID"><span class="cover"><b class="cover__word">30<small>يوم</small></b></span>
     <span class="ccard__body"><span class="ccard__topic">…</span><b class="ccard__title">…</b><span class="ccard__desc">…</span></span>
     <span class="ccard__foot">…</span></a> */
.cover { --ct: var(--surface-2); position: relative; display: grid; place-items: center; overflow: hidden; background: var(--ct); color: var(--ink); aspect-ratio: 16 / 9; isolation: isolate; border-radius: var(--r-md); }
.cover--banana, .cover--mauve, .cover--lilac, .cover--peach, .cover--pink, .cover--sunk { --ct: var(--surface-2); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__word { direction: ltr; unicode-bidi: isolate; font-weight: 800; font-size: clamp(2.4rem, 1.4rem + 3vw, 3.6rem); line-height: 1; letter-spacing: 0; display: inline-flex; align-items: baseline; gap: .12em; }
.cover__word small { font-size: .36em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.cover__dot { position: absolute; top: 16px; inset-inline-end: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--banana)); }
.cover__chip { position: absolute; z-index: 1; top: 12px; inset-inline-start: 12px; }
.ccard { position: relative; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: 8px 8px 0; margin-bottom: var(--edge-q); background: var(--surface); border-radius: var(--r-lg); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line), 0 var(--edge-q) 0 var(--line); transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.ccard__body { display: grid; gap: 4px; padding: 0 var(--s-3); }
.ccard__topic { font-size: var(--t-cap); font-weight: 600; color: var(--muted); }
.ccard__title { font-size: var(--t-h3); font-weight: 800; line-height: 1.45; }
.ccard__desc { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.7; }
.ccard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-4); }
a.ccard:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
@media (hover: hover) { a.ccard:hover { box-shadow: inset 0 0 0 2px var(--line-2), 0 var(--edge-q) 0 var(--line-2); } }

/* «كمّل» — the person's current course: a white card, big title, the 30 days, ONE banana button.
   <section class="club"><div class="club__head">…</div><div class="club__lesson"><small>…</small><b>…</b></div>
     <div class="dots"><i class="d"></i>… (30)</div><div class="club__cta"><a class="btn btn--primary">كمّل</a>…</div></section> */
.club { position: relative; background: var(--surface); color: var(--ink); border-radius: var(--r-card); padding: var(--s-6); box-shadow: inset 0 0 0 1px var(--line); }
.club__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
.club__lesson { margin: var(--s-3) 0 var(--s-5); }
.club__lesson small { display: block; font-size: var(--t-sm); color: var(--muted); font-weight: 500; }
.club__lesson b { display: block; margin-top: 4px; font-size: var(--t-h2); font-weight: 800; line-height: 1.3; }
.club__cta { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-6); }
.club__cta .btn { flex: 1; }
.club__t { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
.club__t b { display: block; color: var(--ink); font-size: 1.1rem; font-weight: 800; direction: ltr; text-align: end; }
.club__foot { display: flex; align-items: center; gap: 12px; margin-top: var(--s-5); padding-top: var(--s-4); border-top: var(--hair); font-size: var(--t-sm); }
.club__foot small { display: block; color: var(--muted); font-size: var(--t-xs); line-height: 1.3; }
/* the 30 days: done = banana, today = a banana ring, the rest = a soft track */
.dots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.dots i { aspect-ratio: 1; border-radius: 8px; background: var(--surface-3); }
.dots i.d { background: var(--banana); }
.dots i.t { background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--banana); }
@media (min-width: 700px) { .dots { grid-template-columns: repeat(15, minmax(0, 1fr)); } }

/* a chat / list row with an unread count, a post card */
.unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--inv); font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.post { background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); padding: var(--s-5); }
.post__by { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-3); font-size: var(--t-sm); }
.post__by b { display: block; line-height: 1.3; }
.post__title { font-size: var(--t-lg); font-weight: 800; margin-bottom: 6px; }
.post__text { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.8; }
/* (round4) an icon's place in a row: the naked line icon, no bordered square (icon tiles in boxes = «معجّق») */
.tile { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 0; background: none; box-shadow: none; color: var(--ink-2); }
.tile .ico { width: 24px; height: 24px; stroke-width: 1.8; }
.tile--banana, .tile--peach, .tile--pink, .tile--mauve { color: var(--ink); }

/* ───────── 7. ticket (coupon) + receipt (order) ───────── */
.ticket { --stub: 128px; position: relative; display: flex; min-height: 100px; background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ticket::before { display: none; }
.ticket__main { flex: 1; min-width: 0; display: grid; align-content: center; gap: 2px; padding: 16px 20px; }
.ticket__main small { font-weight: 600; font-size: var(--t-xs); color: var(--muted); }
.ticket__main b { font-size: var(--t-h2); font-weight: 800; line-height: 1.25; }
.ticket__main span { font-size: var(--t-sm); color: var(--ink-2); }
.ticket__stub { width: var(--stub); flex: none; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px; border-inline-start: 1.5px dashed var(--line-2); text-align: center; }
.ticket__stub code { font-family: var(--font); font-weight: 800; font-size: var(--t-sm); direction: ltr; letter-spacing: .04em; overflow-wrap: anywhere; }   /* Latin code: tracking is fine */
.ticket--peach, .ticket--lilac, .ticket--pink { background: var(--surface); }
.ticket--paper { background: var(--surface); }

.receipt { position: relative; width: min(100%, var(--w, 420px)); margin-inline: auto; }
.receipt__paper { background: var(--surface); padding: var(--s-6) var(--s-5); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: var(--s-3); }
.receipt__head { display: grid; justify-items: center; gap: 6px; text-align: center; padding-bottom: var(--s-3); border-bottom: 1.5px dashed var(--line-2); }
.receipt__head small { color: var(--muted); font-size: var(--t-xs); }
.receipt__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--t-sm); }
.receipt__row > :first-child { color: var(--ink-2); }
.receipt__row > :last-child { font-weight: 600; text-align: end; }
.receipt__row--off > :last-child { color: var(--danger); }
.receipt__total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: var(--s-3); border-top: 1.5px dashed var(--line-2); font-weight: 800; font-size: var(--t-lg); }
.receipt__note { text-align: center; font-size: var(--t-xs); color: var(--muted); }
.receipt--print .receipt__paper > * { opacity: 0; transform: translateY(-6px); animation: print .36s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
.receipt--print .receipt__paper > :nth-child(2) { --i: 1; } .receipt--print .receipt__paper > :nth-child(3) { --i: 2; } .receipt--print .receipt__paper > :nth-child(4) { --i: 3; }
.receipt--print .receipt__paper > :nth-child(5) { --i: 4; } .receipt--print .receipt__paper > :nth-child(6) { --i: 5; } .receipt--print .receipt__paper > :nth-child(7) { --i: 6; }
.receipt--print .receipt__paper > :nth-child(8) { --i: 7; } .receipt--print .receipt__paper > :nth-child(9) { --i: 8; } .receipt--print .receipt__paper > :nth-child(n+10) { --i: 9; }

/* the QR of a transfer: always on white, first and big */
.qr { width: min(100%, var(--w, 320px)); margin-inline: auto; background: #FFFFFF; color: #1C1A17; padding: 16px 16px 12px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px #EBEBE8; display: grid; gap: 8px; justify-items: center; text-align: center; font-weight: 600; font-size: var(--t-sm); }
.qr img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; }
.copy { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px; padding-inline-start: 16px; background: var(--surface-2); border-radius: var(--r-ctl); box-shadow: none; }
.copy code { flex: 1; min-width: 0; font-family: var(--font); font-weight: 600; direction: ltr; text-align: start; overflow-wrap: anywhere; }
.copy .btn { margin-bottom: 3px; }

/* ───────── 8. forms ───────── */
.form { display: grid; gap: var(--s-4); }
.form__actions { display: grid; gap: var(--s-3); margin-top: var(--s-2); }
.field { display: grid; gap: 8px; min-width: 0; }
.field__label { font-weight: 600; font-size: .9375rem; }   /* 15/600, above the field */
.field__label i { font-style: normal; font-weight: 400; color: var(--muted); }
.field__hint { font-size: var(--t-cap); color: var(--muted); }
/* (round3b) one error look on every form: a small «!» disc + the words (was only on the sign-in pages) */
.field__error { display: none; align-items: flex-start; gap: 6px; font-weight: 600; font-size: var(--t-sm); line-height: 1.6; color: var(--danger); }
.field--error .field__error:not(:empty) { display: flex; }
.field--error .field__error:not(:empty)::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--danger); color: var(--surface); font-size: 12px; font-weight: 800; line-height: 1; }
.field--error .field__hint { display: none; }
.field__box { position: relative; display: block; }
.field__peek { position: absolute; inset-block: 5px; inset-inline-end: 5px; height: auto; }
.field__box .input { padding-inline-end: 52px; }
/* (round4) an input: 52px, a soft --surface-2 fill and NO border at rest; focus = white + a 2px ink edge + a soft 4px ring */
.input, .select, .textarea { display: block; width: 100%; min-height: var(--h-input); padding: .6em 1em; border: 2px solid transparent; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink);
  font-weight: 400; font-size: 1rem; line-height: 1.5; transition: border-color var(--dur-2), box-shadow var(--dur-2), background-color var(--dur-2); appearance: none; -webkit-appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line); }
.input:focus, .select:focus, .textarea:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 4px var(--banana-t); }
:root[data-theme="dark"] .input:focus, :root[data-theme="dark"] .select:focus, :root[data-theme="dark"] .textarea:focus { box-shadow: 0 0 0 4px #3A3A3A; }
.input--ltr { direction: ltr; text-align: left; }
.input--code { direction: ltr; text-align: center; letter-spacing: .5em; font-weight: 800; font-size: var(--t-xl); padding-inline-start: 1.5em; }
.textarea { min-height: 120px; resize: vertical; }
.select { padding-inline-end: 2.6em; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: 18px 55%, 24px 55%; }
[dir="ltr"] .select { background-position: calc(100% - 24px) 55%, calc(100% - 18px) 55%; }
.field--error .input, .field--error .select, .field--error .textarea, .input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-t); }
.input[disabled], .select[disabled], .textarea[disabled] { opacity: .55; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group > .input { flex: 1; min-width: 0; }
.input-group > .btn { min-height: var(--h-input); }
.search { position: relative; display: block; }
.search .ico { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-inline-start: 48px; }
.check, .radio { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 8px; cursor: pointer; font-size: var(--t-sm); line-height: 1.6; }
.check input, .radio input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--line-2); border-radius: 8px; background: var(--surface); display: grid; place-items: center; transition: background-color var(--dur-1), border-color var(--dur-1), transform 260ms var(--spring-pop); cursor: pointer; }
.radio input { border-radius: 50%; }
.check input::after { content: ""; width: 11px; height: 6px; border: 2.4px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1.5px) rotate(-45deg) scale(0); transition: transform 300ms var(--spring-pop); }
.radio input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--on-accent); transform: scale(0); transition: transform 300ms var(--spring-pop); }
.check input:checked, .radio input:checked { background: var(--banana); border-color: var(--banana-d); }
.check input:checked::after { transform: translateY(-1.5px) rotate(-45deg) scale(1); }
.radio input:checked::after { transform: scale(1); }
.check input:active, .radio input:active { transform: scale(.9); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 30px; margin: 0; border-radius: 30px; background: var(--surface-3); transition: background-color var(--dur-2); cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform 300ms var(--spring); }
.switch input:checked { background: var(--banana); }
.switch input:checked::after { transform: translateX(-22px); }
/* a choice as a card (payment method, plan): white + hairline + edge; chosen = soft banana with a banana edge */
.choice { position: relative; display: block; cursor: pointer; margin-bottom: var(--edge-q); }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__body { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: 12px 16px; background: var(--surface); border-radius: var(--r-ctl); box-shadow: inset 0 0 0 2px var(--line), 0 var(--edge-q) 0 var(--line-2);
  transition: box-shadow 260ms var(--spring-pop), transform 260ms var(--spring-pop), background-color var(--dur-2); }
.choice__body b { display: block; font-weight: 700; } .choice__body small { color: var(--muted); font-size: var(--t-cap); }
.choice input:checked + .choice__body { background: var(--banana-t); box-shadow: inset 0 0 0 2px var(--banana-line), 0 var(--edge-q) 0 var(--banana-line); }
.choice input:focus-visible + .choice__body { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.choice:active .choice__body { transform: translateY(var(--edge-q)); box-shadow: inset 0 0 0 2px var(--line), 0 0 0 var(--line-2); transition-duration: var(--dur-press); transition-timing-function: linear; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 500; font-size: var(--t-sm); line-height: 1.6; }
.alert .ico { margin-top: .15em; }
.alert--error { background: var(--danger-t); box-shadow: none; color: var(--danger); }
.alert--ok { background: var(--surface); }
.alert--ok::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--banana); }
.alert--ok:has(.ico)::before { display: none; }
.alert--info { background: var(--surface); }

/* ───────── 9. tabs · lists · tables · folds ───────── */
/* tabs / a segmented control (round4): a soft grey track; the chosen one is a white raised segment with ink text — calm,
   no yellow (banana is a highlighter, not paint). Night: the chosen one is a lighter grey */
.tabs, .seg { display: inline-flex; gap: 2px; padding: 3px; max-width: 100%; background: var(--surface-2); border-radius: var(--r-ctl); box-shadow: none; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab, .seg > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 4px 16px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-weight: 600; font-size: var(--t-sm); white-space: nowrap;
  transition: background-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform 260ms var(--spring-pop); }
.tabs__tab:hover, .seg > button:hover { color: var(--ink); }
.tabs__tab:active, .seg > button:active { transform: scale(.96); transition-duration: var(--dur-press); }
.tabs__tab[aria-selected="true"], .tabs__tab[aria-current="page"], .seg > button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgba(28, 26, 23, .14); }
:root[data-theme="dark"] .tabs__tab[aria-selected="true"], :root[data-theme="dark"] .tabs__tab[aria-current="page"], :root[data-theme="dark"] .seg > button[aria-pressed="true"] { background: var(--surface-3); box-shadow: inset 0 0 0 1px #3A3A3A; }
.tabs--block { display: flex; } .tabs--block .tabs__tab { flex: 1; justify-content: center; }
/* filter pills that wrap (categories) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.pills--scroll::-webkit-scrollbar { display: none; }
/* a filter pill: white + a hairline; the chosen one is ink (night: a light pill with dark text). (round4) no yellow */
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 16px; border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: var(--t-sm); white-space: nowrap;
  transition: background-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform 260ms var(--spring-pop); }
.pill:hover { color: var(--ink); }
.pill:active { transform: scale(.96); transition-duration: var(--dur-press); }
.pill[aria-pressed="true"], .pill[aria-current="page"] { background: var(--ink); color: var(--inv); box-shadow: none; }
/* a scrolling row never cuts a pill in half without saying so: it fades at the end it scrolls toward */
.pills--scroll { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
[dir="ltr"] .pills--scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }

/* a list group (round4, «lists over cards»): ONE 1px hairline around the group, radius 24, rows 64px. The icon is the naked
   line icon (22px, --ink-2), never a bordered tile. Dividers are inset: they start after the icon. .list--plain = no frame */
.list { --li-pad: var(--s-5); list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.list__item { --li-inset: var(--li-pad); position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: 12px var(--li-pad); border: 0; width: 100%; background: none; text-align: start; color: inherit; }
.list__item:has(> .list__icon) { --li-inset: calc(var(--li-pad) + 28px + var(--s-3)); }
.list > * + * > .list__item::after, .list > .list__item + .list__item::after { content: ""; position: absolute; top: 0; inset-inline: var(--li-inset) 0; height: 1px; background: var(--line); pointer-events: none; }
.list__icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 0; background: none; box-shadow: none; color: var(--ink-2); }
.list__icon .ico { width: 22px; height: 22px; }
.list__body { flex: 1; min-width: 0; display: grid; }
.list__title { font-weight: 600; overflow-wrap: anywhere; }
.list__sub { font-size: var(--t-sm); color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.list__end { flex: none; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--t-sm); }
a.list__item, button.list__item { transition: background-color var(--dur-2); -webkit-tap-highlight-color: transparent; }
a.list__item:active, button.list__item:active { background: var(--surface-2); transition-duration: 100ms; }
@media (hover: hover) { a.list__item:hover, button.list__item:hover { background: var(--surface-2); } }
.list--plain { --li-pad: 0px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.list__item--done .list__icon { width: 26px; height: 26px; margin-inline: 1px; border-radius: 50%; background: var(--banana); color: var(--on-accent); }
.list__item--done .list__icon .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.list__item--locked { color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.toolbar .input, .toolbar .select { min-height: 46px; width: auto; flex: 1 1 200px; }
/* (round4) a table: one hairline group, hairline rows of 56px */
.table-wrap { background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { position: sticky; top: 0; background: var(--surface); text-align: start; font-weight: 600; font-size: var(--t-cap); color: var(--muted); padding: 14px 16px; border-bottom: var(--hair); white-space: nowrap; }
.table td { height: 56px; padding: 10px 16px; border-top: var(--hair); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table td.num, .table th.num { text-align: end; display: table-cell; }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
.table__actions .btn { margin-bottom: 3px; }
@media (hover: hover) { .table tbody tr:hover td { background: var(--surface-2); } }
@media (max-width: 699px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: 10px 0; border-top: var(--hair); }
  .table--cards td { height: auto; }
  .table--cards tbody tr:first-child { border-top: 0; }
  .table--cards td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 16px; border: 0; text-align: end; }
  .table--cards td::before { content: attr(data-label); color: var(--muted); text-align: start; flex: none; }
  .table--cards td.num { display: flex; }
  .table--cards .table__actions { padding-top: 8px; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-top: var(--s-5); font-size: var(--t-sm); color: var(--muted); }
/* a question that opens: rows divided by hairlines, no boxes */
.fold { border-bottom: var(--hair); }
.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 2px; font-weight: 700; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 9px; height: 9px; flex: none; border: 2px solid var(--muted); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(2px, -2px); transition: transform var(--dur-3) var(--spring); }
.fold[open] > summary::after { transform: rotate(135deg) translate(-2px, 2px); }
.fold__body { padding: 0 2px var(--s-5); color: var(--ink-2); }
.steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { flex: 1; display: grid; gap: 6px; font-size: var(--t-cap); font-weight: 600; color: var(--muted); counter-increment: step; }
.steps > li::before { content: ""; height: 6px; border-radius: 6px; background: var(--surface-3); }
.steps > li[aria-current="step"] { color: var(--ink); } .steps > li[aria-current="step"]::before { background: var(--banana); }
.steps > li.is-done::before { background: var(--banana); }

/* ───────── 10. states ───────── */
/* an empty / small page: (round4) ONE object of the art family on white — <div class="empty__art">${A.art('empty-box', 96)}</div> —
   or a naked line icon. Never a bordered tile */
.empty { display: grid; justify-items: center; gap: var(--s-3); text-align: center; max-width: 30em; margin-inline: auto; padding: var(--s-9) var(--s-4); }
.empty__art { position: relative; min-width: 56px; min-height: 56px; display: grid; place-items: center; margin-bottom: var(--s-2); border-radius: 0; background: none; box-shadow: none; color: var(--ink-2); }
.empty__art .ico { width: 40px; height: 40px; stroke-width: 1.6; }
.empty__art .art { width: clamp(96px, 70px + 8vw, 140px); height: auto; }
.empty__art--obj .art { width: clamp(150px, 120px + 8vw, 200px); }
.empty__art .doodle { display: block; width: 30px !important; height: 30px; aspect-ratio: 1; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.empty__art .stamp { box-shadow: none; }
.empty__art > * { position: relative; }
.empty__title { font-size: var(--t-h1); font-weight: 800; line-height: var(--lh-tight); }
.empty__text { color: var(--ink-2); font-size: var(--t-lead); line-height: 1.75; }
.empty .btn { margin-top: var(--s-3); }
/* a skeleton: the shape of what is coming, in the soft grey, breathing slowly (no shimmer sweep) */
.skel { position: relative; overflow: hidden; display: block; min-height: 1em; background: var(--surface-2); border-radius: var(--r-sm); animation: skel 1.6s var(--ease-in-out) infinite; }
.skel::after { content: none; }
.skel--title { height: 2.4em; width: min(60%, 420px); margin-bottom: var(--s-4); }
.skel--text { height: .95em; margin-bottom: var(--s-3); }
.skel--btn { height: var(--h-ctl); width: 180px; border-radius: var(--r-ctl); }
.skel--thumb { width: 56px; height: 56px; border-radius: 16px; }
.skel--card { height: 240px; border-radius: var(--r-card); }
.skel--row { height: 64px; border-radius: var(--r-ctl); margin-bottom: var(--s-2); }
.skel--art { width: 160px; height: 160px; border-radius: 50%; margin-inline: auto; }
.boot { padding-top: var(--s-9); }

/* ───────── 11. the shell: top bar · tablet tabs · side bar · phone tab bar · footer ─────────
   phone: a white top bar (logo · «عندي حساب» · menu) for visitors; signed in, a white bottom tab bar with the lit tab soft banana.
   tablet: the top bar; visitors get the public links, signed-in people the four tabs (a grey track, lit = a white segment).
   laptop: the top bar of the approved hero on public pages; signed in, a white side bar (hairline edge, lit = ink text + a
   3px banana bar at the start edge). (round4 §5) solid white everywhere; hairlines are 1px; no boxed tab, no yellow text. */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; outline: none; overflow-x: clip; }
.main.is-entering { animation: vt-fade .2s ease both, page-in var(--dur-3) var(--spring) both; }
.topbar { position: sticky; top: 0; z-index: 50; height: var(--bar-h); background: var(--bg);
  box-shadow: 0 1px 0 transparent; transition: box-shadow var(--dur-2); }
:root[data-scrolled] .topbar { box-shadow: 0 1px 0 var(--line); }
.topbar__in { position: relative; height: 100%; width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: var(--s-4); }
.topbar__end { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }
.topbar__end .btn { margin-bottom: 0; }
.topbar__login { margin-bottom: 0 !important; }
.topnav, .pubnav { display: none; }
.userchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px; padding-inline-end: 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: var(--t-sm); max-width: 190px; transition: box-shadow var(--dur-2), transform 260ms var(--spring-pop); }
.userchip:active { transform: scale(.96); transition-duration: var(--dur-press); }
.userchip > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip--wide { max-width: none; width: 100%; }
.ico--sun { display: none; }
:root[data-theme="dark"] .ico--sun { display: block; } :root[data-theme="dark"] .ico--moon { display: none; }
.sidebar { display: none; }
.menubtn { display: none; }

/* phone tab bar (signed in only) */
.tabbar { display: none; }
@media (max-width: 699px) {
  :root[data-signed] .tabbar { position: fixed; z-index: 60; inset-inline: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    padding: 6px 10px env(safe-area-inset-bottom, 0px); background: var(--surface); box-shadow: 0 -1px 0 var(--line); animation: fade-in var(--dur-2) ease both; }
  /* (round4) icon 24 + caption 12/600. Lit = the icon on a 44×28 soft banana pill, the label ink; the others muted */
  .tabbar a { position: relative; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 14px; font-weight: 600; font-size: .75rem; line-height: 1.35; color: var(--muted);
    -webkit-tap-highlight-color: transparent; transition: transform 260ms var(--spring-pop), color var(--dur-2); }
  .tabbar a .ico { width: 48px; height: 28px; padding: 2px 12px; border-radius: 14px; stroke-width: 1.8; transition: background-color var(--dur-2); }
  .tabbar a:active { transform: scale(.92); transition-duration: var(--dur-press); }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tabbar a[aria-current="page"] .ico { background: var(--banana-t); box-shadow: none; stroke-width: 2; }
  .topbar__start, .topbar .userchip > :last-child { display: none; }
  .topbar .userchip { padding: 3px; box-shadow: none; }
  .topbar [data-theme-toggle] { display: none; }
  .menubtn { display: grid; }   /* visitors: links + the two doors; signed in: courses, «مين ورا خُطى», the look */
  .topbar__login { min-height: 40px; }
  .topbar .tag { font-size: 1.2rem; } .topbar .tag::before { width: 30px; height: 30px; }
  :root[data-nav="bare"] .tabbar { display: none; }
}

.foot { border-top: var(--hair); padding-block: var(--s-7) calc(var(--s-7) + var(--tabbar-h)); font-size: var(--t-sm); color: var(--ink-2); }
.foot__in { display: grid; gap: var(--s-4); justify-items: center; text-align: center; }
.foot__brand { display: grid; gap: var(--s-1); justify-items: center; }
.foot__brand p { color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-5); font-weight: 600; color: var(--ink-2); }
.foot__links a { min-height: 40px; display: inline-flex; align-items: center; gap: .3em; }
.foot__links a:hover { color: var(--ink); }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px var(--s-5); color: var(--muted); font-size: var(--t-cap); }

@media (min-width: 700px) {
  .tabbar { display: none !important; }
  .foot { padding-block: var(--s-7); }
  .foot__in { grid-template-columns: auto 1fr auto; align-items: center; justify-items: stretch; text-align: start; gap: var(--s-5); }
  .foot__brand { justify-items: start; }
  .foot__brand p { display: none; }
  .foot__links { justify-content: center; }
  .foot__legal { justify-content: end; }
  .pubnav { display: flex; gap: var(--s-1); position: absolute; left: 50%; transform: translateX(-50%); }
  .pubnav a { position: relative; min-height: 42px; display: inline-flex; align-items: center; padding: 2px 14px; border-radius: 12px; font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: background-color var(--dur-2), color var(--dur-2); white-space: nowrap; }
  .pubnav a:hover { color: var(--ink); }
  /* lit: ink text + a small banana dot under it (no box, no yellow text) */
  .pubnav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .pubnav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--banana); animation: dot-pop .4s var(--spring-pop) both; }
  .topbar__start { min-height: 44px; }
  /* signed in on a tablet: the four tabs instead of the public links */
  :root[data-signed] .pubnav { display: none; }
  :root[data-signed] .topnav { display: flex; gap: 2px; position: absolute; left: 50%; transform: translateX(-50%); padding: 3px; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: none; }
  .topnav a { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 2px 14px; border-radius: 13px; font-weight: 600; font-size: var(--t-sm); color: var(--muted); white-space: nowrap; transition: background-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform 260ms var(--spring-pop); }
  .topnav a .ico { width: 19px; height: 19px; stroke-width: 1.9; }
  .topnav a:hover { color: var(--ink); }
  .topnav a:active { transform: scale(.95); transition-duration: var(--dur-press); }
  .topnav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgba(28, 26, 23, .14); }
  :root[data-theme="dark"] .topnav a[aria-current="page"] { background: var(--surface-3); box-shadow: inset 0 0 0 1px #3A3A3A; }
  .topbar .iconbtn { background: var(--surface); }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .topbar__login { display: none; }
  :root[data-signed] .topbar .tag > span, :root[data-signed] .topbar .userchip > :last-child { display: none; }
  :root[data-signed] .topbar .userchip { padding: 3px; box-shadow: none; }
  .pubnav a { padding-inline: 10px; font-size: var(--t-sm); }
}
/* a wide tablet (iPad 820+) has room for the visitor's «تسجيل الدخول» and for the name beside the mark when signed in */
@media (min-width: 800px) and (max-width: 1099px) {
  .topbar__login { display: inline-flex; }
  :root[data-signed] .topbar .tag > span { display: inline; }
}
/* laptop: signed in → the white side bar (the top bar and footer step aside) */
@media (min-width: 1100px) {
  :root[data-signed] .topnav { display: none; }
  :root[data-signed] .pubnav { display: flex; }
  :root[data-area="app"] { --side-w: 264px; }
  :root[data-area="app"] .topbar, :root[data-area="app"] .foot { display: none; }
  :root[data-area="app"] .main { margin-inline-start: var(--side-w); }
  /* (26-11 speed) /community's own wide layout (p-community.css has the full set), here too so it holds from the first
     paint, before the page's stylesheet arrives: no sideways jump of the page */
  :root[data-cm][data-area="app"] { --side-w: 0px; }
  :root[data-cm][data-area="app"] .sidebar { display: none; }
  :root[data-cm][data-area="app"] .topbar { display: block; }
  :root[data-cm][data-area="app"] .main { margin-inline-start: 0; }
  :root[data-area="app"] .sidebar { position: fixed; z-index: 50; inset-block: 0; inset-inline-start: 0; width: var(--side-w); display: flex; flex-direction: column; padding: var(--s-6) var(--s-4) var(--s-5);
    background: var(--surface); border-inline-end: var(--hair); overflow-y: auto; scrollbar-width: none; }
  .sidebar > .tag { align-self: flex-start; padding: 0 10px; margin-bottom: var(--s-7); }
  .sidenav { display: grid; gap: 2px; }
  /* (round4) items 44px; lit = ink text + a 3px banana bar at the start edge (not a filled box) */
  .sidenav a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 4px 14px; border-radius: 12px; font-weight: 600; font-size: 1rem; color: var(--ink-2); transition: background-color var(--dur-2), color var(--dur-2), transform 260ms var(--spring-pop); }
  .sidenav a .ico { width: 22px; height: 22px; stroke-width: 1.8; color: var(--muted); transition: color var(--dur-2); }
  .sidenav a:hover { background: var(--surface-2); color: var(--ink); }
  .sidenav a:active { transform: scale(.97); transition-duration: var(--dur-press); }
  .sidenav a[aria-current="page"] { background: none; color: var(--ink); font-weight: 700; box-shadow: none; }
  .sidenav a[aria-current="page"] .ico { color: var(--ink); stroke-width: 2; }
  .sidenav a[aria-current="page"]::before { content: none; }   /* 27-11 Mulham: no side bar on the active link */
  .sidebar__label { margin: var(--s-6) 14px var(--s-2); font-size: var(--t-cap); font-weight: 600; color: var(--muted); }
  .sidenav--more a { min-height: 44px; font-size: var(--t-sm); font-weight: 600; }
  .sidenav--more a .ico { width: 20px; height: 20px; }
  .sidebar__foot { margin-top: auto; padding-top: var(--s-5); display: grid; gap: var(--s-3); }
  .sidebar .seg { display: flex; }
  .sidebar .seg > button { flex: 1; justify-content: center; padding-inline: 6px; min-height: 36px; font-size: var(--t-xs); }
  .sidebar .seg .ico { width: 15px; height: 15px; }
  .sidebar .userchip { box-shadow: none; border-top: var(--hair); border-radius: 0; padding-top: 14px; min-height: 60px; }
  .sidebar .userchip .avatar { width: 36px; height: 36px; }
}

/* the phone menu (visitors): a sheet with the links */
.menu { display: grid; gap: var(--s-5); }
.menu .list__item { min-height: 56px; }

/* ───────── 12. sheet / window · toast ─────────
   (round4 §3.8) phone: the sheet rises with the soft spring (420ms), the scrim fades (200ms), it can be dragged down to
   close (the shell), it leaves in 200ms. Laptop: a window that scales .97 → 1 and fades in 220ms. Both float (E3). */
.sheet-root { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; justify-items: center; grid-template-rows: minmax(0, 1fr); }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 200ms ease; }
.sheet { position: relative; width: 100%; max-height: min(88dvh, 100% - 40px); display: flex; flex-direction: column; align-self: end; background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--e3), 0 0 0 1px var(--e3-ring); transform: translateY(105%); transition: transform 200ms var(--ease-in); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet::before { content: ""; align-self: center; flex: none; width: 40px; height: 5px; margin-top: 10px; border-radius: 5px; background: var(--line-2); }
.sheet__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 8px 10px 4px var(--s-5); padding-inline: var(--s-5) 10px; touch-action: none; }
.sheet__title { font-size: var(--t-h2); font-weight: 800; }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-2) var(--s-5) var(--s-6); }
.sheet-root.is-open .sheet-scrim { opacity: 1; }
.sheet-root.is-open .sheet { transform: none; transition: transform var(--dur-3) var(--spring); }
.sheet.is-drag { transition: none !important; }
@media (min-width: 700px) {
  .sheet-root { align-items: center; padding: var(--s-6); }
  .sheet { align-self: center; width: min(100%, var(--sheet-w, 520px)); max-height: min(86dvh, 760px); border-radius: var(--r-sheet); opacity: 0; transform: scale(.97); transition: transform 160ms var(--ease-in), opacity 160ms ease; padding-bottom: 0; }
  .sheet::before { display: none; }
  .sheet__head { padding-top: var(--s-5); padding-inline: var(--s-6) var(--s-4); touch-action: auto; }
  .sheet__body { padding: var(--s-2) var(--s-6) var(--s-6); }
  .sheet-root.is-open .sheet { opacity: 1; transform: none; transition: transform 220ms var(--ease), opacity 220ms var(--ease); }
}
/* a toast (E3): a white pill with ink words and a small dot that pops; it comes from 12px below. Night: a raised grey pill */
.toasts { position: fixed; z-index: 120; inset-inline: 0; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; max-width: min(100%, 460px); padding: 10px 22px 10px 20px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--t-sm); line-height: 1.5;
  box-shadow: var(--e3), 0 0 0 1px var(--line); animation: toast-in var(--dur-3) var(--spring) both; }
:root[data-theme="dark"] .toast { background: #222222; color: var(--ink); box-shadow: var(--e3), 0 0 0 1px #333333; }
.toast.is-out { animation: toast-out 200ms var(--ease-in) both; }
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--banana); }
.toast--error::before { background: var(--danger); }
@media (min-width: 700px) { .toasts { bottom: 28px; } }

/* ───────── 13. motion (round4 §3) ─────────
   REVEAL (content BELOW the first screen only; the first screen uses .rise once, never hidden):
     <section data-reveal>…        rises 16px + fades in when 15% of it is visible (once)
     data-reveal="pop" | "art"      scales .92 → 1 with the pop spring (an object of the art family arriving)
     data-reveal="fade"             opacity only
     <ul data-stagger>…</ul>        its children reveal one after another (70ms apart, the first 4; the rest together)
     style="--d:.14s"               a delay of your own
   Never on prices, form fields, errors, or anything the person needs to read at once. Reduced motion: all shown. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-2) ease var(--d, 0s), transform var(--dur-spring) var(--spring) var(--d, 0s); }
.js-reveal [data-reveal="fade"], .js-reveal [data-reveal="tape"], .js-reveal [data-reveal="draw"] { transform: none; }
.js-reveal [data-reveal="pop"], .js-reveal [data-reveal="art"] { transform: scale(.92); transition: opacity var(--dur-2) ease var(--d, 0s), transform var(--dur-spring) var(--spring-pop) var(--d, 0s); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.js-reveal .mark[data-reveal="mark"] { opacity: 1; transform: none; }
.js-reveal .doodle[data-reveal] { opacity: 1; transform: none; }
.pressable { transition: transform 260ms var(--spring-pop); -webkit-tap-highlight-color: transparent; } .pressable:active { transform: scale(.97); transition-duration: var(--dur-press); }
/* an entrance for the first screen of a page (no waiting for a scroll): class="rise" (+ style="--d:.12s").
   It fades in (240ms) and rises 12px on the soft spring (600ms); after an in-app page change, 8px in 420ms, nearly together */
.rise { animation: rise-o var(--dur-2) ease var(--d, 0s) both, rise-y var(--dur-spring) var(--spring) var(--d, 0s) both; }
:root[data-moved] .rise { --rise: 8px; animation-duration: .2s, var(--dur-3); animation-delay: calc(var(--d, 0s) * .3); }
/* a number that counts up once when it is seen (stats and the progress ring only, never money): <b class="num" data-count="91">91</b> */
[data-count] { font-variant-numeric: tabular-nums; }

/* PAGE CHANGES (§3.2): the bars (top bar, side bar, tab bar) have their own still pictures in the view transition; the
   page under them changes. Default: the old page fades out in 120ms, the new one fades in (200ms) and rises 8px on the soft
   spring (420ms). Phone drill-in (a list → its item): the new page comes 24px from the left (forward in RTL), «back» from the
   right (320ms). Tabs at the same level: a 140ms fade only. The shell sets data-vt-dir="fwd|back|tab" for the transition. */
.topbar { view-transition-name: ac-topbar; } .sidebar { view-transition-name: ac-sidebar; } .tabbar { view-transition-name: ac-tabbar; }
:root[data-vt="look"] :is(.topbar, .sidebar, .tabbar) { view-transition-name: none; }
::view-transition-group(ac-topbar), ::view-transition-group(ac-sidebar), ::view-transition-group(ac-tabbar),
::view-transition-new(ac-topbar), ::view-transition-new(ac-sidebar), ::view-transition-new(ac-tabbar) { animation: none; }
::view-transition-old(ac-topbar), ::view-transition-old(ac-sidebar), ::view-transition-old(ac-tabbar) { animation: none; opacity: 0; }
::view-transition-old(root) { animation: vt-out 120ms ease both; }
::view-transition-new(root) { animation: vt-fade 200ms ease both, vt-rise var(--dur-3) var(--spring) both; }
:root[data-vt-dir="tab"]::view-transition-old(root) { animation: vt-out 140ms ease both; }
:root[data-vt-dir="tab"]::view-transition-new(root) { animation: vt-fade 140ms ease both; }
@media (max-width: 699px) {
  :root[data-vt-dir="fwd"]::view-transition-new(root) { animation: vt-fade 200ms ease both, vt-from-l 320ms var(--spring) both; }
  :root[data-vt-dir="back"]::view-transition-new(root) { animation: vt-fade 200ms ease both, vt-from-r 320ms var(--spring) both; }
}
::view-transition-group(*) { animation-duration: .36s; animation-timing-function: var(--ease); }
/* (round3b) a named picture (a course's tablet) that has no partner on the next page never ghosts over it */
::view-transition-old(*):only-child { animation: vt-gone .1s ease both; }
@keyframes vt-gone { to { opacity: 0; } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(-100%); } }
@keyframes skel { 50% { opacity: .5; } }
@keyframes print { to { opacity: 1; transform: none; } }
@keyframes hl { to { transform: rotate(-1deg) scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise-o { from { opacity: 0; } }
@keyframes rise-y { from { transform: translateY(var(--rise, 12px)); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes page-in { from { transform: translateY(8px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-fade { from { opacity: 0; } }
@keyframes vt-rise { from { transform: translateY(8px); } }
@keyframes vt-from-l { from { transform: translateX(-24px); } }
@keyframes vt-from-r { from { transform: translateX(24px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes bar-in { from { transform: scaleY(0); } }

/* ───────── 14. night: neutral greys, banana only as the accent (26-11 round3) ─────────
   A lit thing at night = a raised neutral grey (--banana-t) + a neutral ring (--banana-line). What makes it «lit» is
   banana in ONE small place: the icon of the lit nav item, the ring of a chosen choice. Never a mustard ring or fill. */
:root[data-theme="dark"] .tabbar a[aria-current="page"] .ico { color: var(--banana); }
:root[data-theme="dark"] .choice input:checked + .choice__body { box-shadow: inset 0 0 0 2px var(--banana), 0 var(--edge-q) 0 var(--banana-d); }
:root[data-theme="dark"] .alert--error { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }

/* ───────── 14b. nav colours (27-11 round5e, «خلّي السايد بار أحلى») ─────────
   Every nav item has its own pastel: الرئيسية + تصفّح الكورسات banana · المجتمع pink · كورساتي + تعرّف على د. مُلهَم peach ·
   حسابي + نزّل التطبيق lilac. Hover/focus = a soft pill of that tint; the lit page = a filled pill, its icon in the deeper
   shade; 150 ms. Same pill on the phone tab bar and the tablet top tabs. Night: a dark neutral pill, the icon in the
   bright colour + a thin coloured edge. Vars: --nv-t (hover) --nv-f (lit fill) --nv-i (icon, day) --nv-c (colour, night) */
:is(.sidenav, .topnav, .tabbar, .pubnav) a { --nv-t: #FFF8D6; --nv-f: #FFEFA6; --nv-i: #C99A00; --nv-c: var(--banana); }
:is(.sidenav, .topnav, .tabbar, .pubnav) a:is([data-tab="community"], [href="/community"]) { --nv-t: #FFF0F6; --nv-f: #FFDCEA; --nv-i: #E5508A; --nv-c: #FF9CC2; }
:is(.sidenav, .topnav, .tabbar, .pubnav) a:is([data-tab="mine"], [href="/about"]) { --nv-t: #FFF2EB; --nv-f: #FFE5D8; --nv-i: #EE6E36; --nv-c: #FFA27A; }
:is(.sidenav, .topnav, .tabbar, .pubnav) a:is([data-tab="me"], [href="/app"]) { --nv-t: #F8F1FF; --nv-f: #EEDFFE; --nv-i: #A855F7; --nv-c: #C9A6F0; }
.sidenav a, .topnav a, .pubnav a { transition: background-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease), transform 260ms var(--spring-pop); }
.sidenav a .ico, .topnav a .ico, .tabbar a .ico { transition: background-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease); }
/* laptop side bar: a full pill; the lit page is the filled pill (the old 3px banana bar steps aside) */
.sidenav a { border-radius: 999px; }
.sidenav a:is(:hover, :focus-visible) { background: var(--nv-t); color: var(--ink); }
.sidenav a:is(:hover, :focus-visible) .ico { color: var(--nv-i); }
.sidenav a[aria-current="page"] { background: var(--nv-f); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.sidenav a[aria-current="page"] .ico { color: var(--nv-i); }
.sidenav a[aria-current="page"]::before { content: none; }
/* /about, /courses, /app light their own link in the second list: الرئيسية (their tab) steps back, one pill only */
.sidebar:has(.sidenav--more a[aria-current="page"]) .sidenav:not(.sidenav--more) a[aria-current="page"]:not(:hover, :focus-visible) { background: none; box-shadow: none; font-weight: 600; }
.sidebar:has(.sidenav--more a[aria-current="page"]) .sidenav:not(.sidenav--more) a[aria-current="page"]:not(:hover, :focus-visible) .ico { color: var(--muted); }
/* tablet top tabs */
.topnav a:is(:hover, :focus-visible) { background: var(--nv-t); color: var(--ink); }
.topnav a:is(:hover, :focus-visible) .ico { color: var(--nv-i); }
.topnav a[aria-current="page"] { background: var(--nv-f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.topnav a[aria-current="page"] .ico { color: var(--nv-i); }
/* visitors' public links: the soft pill on hover, the lit dot in the item's own colour */
.pubnav a:is(:hover, :focus-visible) { background: var(--nv-t); }
.pubnav a[aria-current="page"]::after { background: var(--nv-i); }
/* phone tab bar: the lit icon sits on its own colour pill */
.tabbar a[aria-current="page"] .ico { background: var(--nv-f); color: var(--nv-i); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
/* night: neutral pill, colour only in the icon + a thin edge */
:root[data-theme="dark"] :is(.sidenav, .topnav, .pubnav) a:is(:hover, :focus-visible) { background: #222222; }
:root[data-theme="dark"] :is(.sidenav, .topnav) a:is(:hover, :focus-visible) .ico { color: var(--nv-c); }
:root[data-theme="dark"] :is(.sidenav, .topnav) a[aria-current="page"],
:root[data-theme="dark"] .tabbar a[aria-current="page"] .ico { background: #262626; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nv-c) 45%, transparent); }
:root[data-theme="dark"] :is(.sidenav, .topnav, .tabbar) a[aria-current="page"] .ico { color: var(--nv-c); }
:root[data-theme="dark"] :is(.sidenav, .topnav) a[aria-current="page"] .ico { background: none; box-shadow: none; }
:root[data-theme="dark"] .pubnav a[aria-current="page"]::after { background: var(--nv-c); }

/* ───────── 15. motion polish (26-11 round3: «ضيف شوي حركات») — fast, small, transform/opacity only ─────────
   cards that are links lift a little under the pointer (the edge grows with them, like a button) · a list row's arrow
   leans toward where it goes · the lit tab's icon pops once · a field that is wrong shakes once · content that replaces a
   skeleton fades up (.fresh, set by the shell) · the toast's dot pops · the look changes with a soft cross-fade. */
@media (hover: hover) {
  a.card:hover, a.paper:hover, button.card:hover, button.paper:hover, .card--press:hover, a.ccard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--line-2), 0 calc(var(--edge-q) + 2px) 0 var(--line-2); }
  a.notebook:hover .notebook__cover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--line-2), 0 calc(var(--edge-q) + 2px) 0 var(--line-2); }
  .choice:hover .choice__body { transform: translateY(-1px); }
  a.list__item .list__end .ico, button.list__item .list__end .ico { transition: transform var(--dur-2) var(--ease); }
  a.list__item:hover .list__end .ico, button.list__item:hover .list__end .ico { transform: translateX(-3px); }
  [dir="ltr"] a.list__item:hover .list__end .ico { transform: translateX(3px); }
  /* pressed still wins over the lift */
  a.card:active, a.paper:active, button.card:active, button.paper:active, .card--press:active, a.ccard:active,
  a.notebook:active .notebook__cover { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
  .choice:active .choice__body { transform: translateY(var(--edge-q)); }
}
a.card:active, a.ccard:active, button.card:active { transition-duration: .08s; }
.tabbar a[aria-current="page"] .ico, .topnav a[aria-current="page"] .ico { animation: nav-pop .45s var(--ease) both; }
.field--error .input, .field--error .select, .field--error .textarea, .input[aria-invalid="true"] { animation: nudge .32s var(--ease) both; }
/* .fresh lives in a low cascade layer: any entrance of the node itself (.rise, a page's own animation) wins over it (shell.js) */
@layer fresh { .fresh { animation: fresh-in .32s var(--ease) both; } }
.toast::before { animation: dot-pop .5s .12s var(--spring-pop) both; }
.input:focus, .select:focus, .textarea:focus { transition-duration: var(--dur-1); }
[data-theme-toggle] .ico--sun, [data-theme-toggle] .ico--moon { animation: look-in .5s var(--spring-pop) both; }
:root[data-vt="look"]::view-transition-old(root) { animation: none; }
:root[data-vt="look"]::view-transition-new(root) { animation: look-fade .3s ease both; }
@keyframes nav-pop { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: none; } }
@keyframes nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes fresh-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes dot-pop { from { transform: scale(0); } }
@keyframes look-in { from { opacity: 0; transform: rotate(-60deg) scale(.6); } }
@keyframes look-fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  .mark::after { transform: rotate(-1deg); animation: none; }
  .rise { animation: rise-o .15s ease both !important; }
  .art--float, .skel { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root), ::view-transition-old(*), ::view-transition-new(*), ::view-transition-group(*) { animation: none !important; }
}

/* the footer never shows under the loading skeleton and jumps down (CLS) */
.main { min-height: 100dvh; }
/* keyboard focus never hides under the sticky top bar or the phone's tab bar */
html { scroll-padding-top: calc(var(--bar-h) + 16px); scroll-padding-bottom: calc(var(--tabbar-h) + 24px); }

/* ── scrollbars in the house style (page, sheets, the table, any long panel). Mouse devices only: phones keep their own
   overlay bars. Thin, rounded, a neutral hairline colour that turns banana under the pointer; no track, no arrows.
   Chromium/Edge/Safari use ::-webkit-scrollbar; Firefox gets scrollbar-width/scrollbar-color. Bars hidden on purpose stay hidden. */
:root { --sb-thumb: var(--line-2); --sb-thumb-h: var(--banana); }
:root[data-theme="dark"] { --sb-thumb: #3D3D3D; --sb-thumb-h: var(--banana-d); }
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-gutter: stable; }
  .sheet__body { scrollbar-gutter: stable; }
  @supports selector(::-webkit-scrollbar) {
    ::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
    ::-webkit-scrollbar-track { background: transparent; border-radius: 999px; }
    ::-webkit-scrollbar-corner { background: transparent; }
    ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
    ::-webkit-scrollbar-thumb { min-height: 40px; border: 2.5px solid transparent; border-radius: 999px; background: var(--sb-thumb) padding-box; }
    ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { border-width: 1.5px; background-color: var(--sb-thumb-h); }
    .sheet__body::-webkit-scrollbar-track { margin-block: 10px; }
    .table-wrap::-webkit-scrollbar-track { margin-inline: 14px; }
  }
  @supports not selector(::-webkit-scrollbar) {
    :root { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; }
    :where(.sheet__body, .table-wrap) { scrollbar-width: thin; }
  }
}

/* critic-fix 26-11 (CRITIQUE §14): the top bar is near-opaque, so yellow content passing under it never smears into a glow;
   signed-in phones end at the tab bar (the footer's links are in the ☰ menu), as /community already did */
/* round3b: fully the page colour, no blur (ui.css §11) */
@media (max-width: 699px) { :root[data-signed] .foot { display: none; } }

/* ───────── 16. round3b (fix-shared) ─────────
   Tap targets: every small control answers a finger on 44px, without looking bigger (an invisible hit area). */
.tag, .tag--sm { min-height: 44px; }
.foot__links a, .sec__link, .pubnav a { min-height: 44px; }
.field__peek { inset-block: 3px; }
.btn--sm::before, .seg > button::before, .tabs__tab::before, .pill::before { content: ""; position: absolute; inset: -2px 0; }
.btn--sm::before { bottom: calc(-2px - var(--btn-h)); }
.seg > button, .tabs__tab, .pill { position: relative; }
/* an inline link (a form's «سجّل دخولك», «معي كوبون»): a taller hit area, the line and its underline stay where they were */
.link { padding-block: 13px; margin-block: -13px; background-position: 100% calc(100% - 11px); }
/* headings and leads break into even lines (no lone word on the last line) */
.h1, .h2, .display, .lead, .empty__title, .page-head .lead { text-wrap: balance; }

/* (round5c) the brand's seal (Academy.seal() / the old Academy.stair(), shell.js): the picture of every small page (404, «قريباً»,
   an error, a door). «ما عاد في درج»: no stair and no ball any more; the seal is an <img> of /a/art/seal.svg (night twin: seal-dark). */
.empty__art--stair { width: auto; height: clamp(96px, 64px + 6vw, 150px); border-radius: 0; background: none; box-shadow: none; margin-bottom: var(--s-1); }
.empty__art--stair .art { width: auto; height: 100%; }
.ac-seal { display: inline-block; overflow: visible; }

/* «تابع طلبك» in the phone menu (drawn by the shell; order-status.css has the same look) */
.ob-menu { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-sm); }
.ob-menu .link { font-weight: 700; color: var(--ink); }

/* ───────── 17. the art family (round4 §4): glossy 3D yellow objects in /a/art/, drawn by Academy.art() (shell.js) ─────────
   <img class="art" src="/a/art/book.svg?v=N" width="160" height="160" alt="" decoding="async">. Square, with its size, so
   nothing jumps. Never in a coloured box or circle, never tinted. The seal has a night twin (seal-dark): both images are
   written, CSS shows the one of the look. Motion is on the WHOLE image: only the hero object floats (.art--float); the others
   arrive (data-reveal="art") and may do ONE reaction on a real event (Academy.art.react(img, 'hop'|'turn'|'lift'|'pop'|'bounce')).
   Laptop: .art--tilt lifts 3px on hover, once (round5g calm-hover). */
.art { display: inline-block; flex: none; max-width: 100%; height: auto; aspect-ratio: 1; vertical-align: middle; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.art--night { display: none; }
:root[data-theme="dark"] .art--day { display: none; }
:root[data-theme="dark"] .art--night { display: inline-block; }
.art--float { animation: art-float var(--dur-float) ease-in-out infinite; }
.art--tilt { pointer-events: auto; transition: transform 200ms var(--ease); }   /* round5g calm-hover: no pointer-follow tilt, one calm lift */
@media (hover: hover) { .art--tilt:hover { transform: translateY(-3px); } }
.art--pop { animation: art-pop var(--dur-spring) var(--spring-pop) var(--d, 0s) both; }
.art.is-hop { animation: art-hop .62s var(--ease) both; }
.art.is-turn { animation: art-turn .3s var(--spring-pop) both; }
.art.is-lift { animation: art-lift .7s var(--spring) both; }
.art.is-pop { animation: art-pop-r .5s var(--spring-pop) both; }
.art.is-bounce { animation: art-bounce .6s var(--spring-pop) both; }
@keyframes art-float { 50% { translate: 0 -5px; } }
@keyframes art-pop { from { opacity: 0; scale: .92; } }
@keyframes art-hop { 0%, 100% { translate: 0 0; } 40% { translate: 0 -14px; } 70% { translate: 0 0; } 82% { translate: 0 -3px; } }
@keyframes art-turn { to { rotate: -90deg; } }
@keyframes art-lift { 0% { translate: 0 0; } 45% { translate: 0 -10px; } 100% { translate: 0 0; } }
@keyframes art-pop-r { 0% { scale: 1; } 40% { scale: 1.12; } 100% { scale: 1; } }
@keyframes art-bounce { 0% { translate: 0 0; } 30% { translate: 0 -8px; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .art, .art--float, .art--pop { animation: none !important; } .art--tilt { transform: none; } }
/* 404: the seal rolls in from the start edge and stops (shell.js lostPage; round5c: the seal took the ball's place) */
.empty__art--ball, .empty__art--seal { overflow: visible; }
.empty__art--ball .art, .empty__art--seal .art { width: 120px; animation: ball-in 1.1s var(--ease) .1s both; }
@keyframes ball-in { from { translate: 42vw 0; rotate: 300deg; } }
[dir="ltr"] .empty__art--ball .art, [dir="ltr"] .empty__art--seal .art { animation-name: ball-in-ltr; }
@keyframes ball-in-ltr { from { translate: -42vw 0; rotate: -300deg; } }
/* (round4) the top bar's «ابدأ مجاناً» is ink, so a page's own banana button stays the ONE banana button of the screen */
.topbar .topbar__start { --btn-bg: var(--ink); --btn-fg: var(--inv); --btn-ring: transparent; --btn-edge: var(--edge-ink); }
:root[data-theme="dark"] .topbar .topbar__start { --btn-bg: #333333; --btn-fg: var(--ink); --btn-ring: #444444; --btn-edge: #050505; }

/* ───────── 18. round5 sections (27-11, Mulham: «too plain: every page all white, all black at night, and static») ─────────
   A SMALL shared vocabulary so a page can have rooms of its own, like his own site: soft washes, a quiet pattern, a hand-drawn
   doodle, a sticker card, gentle motion. Full guide + copy-paste HTML: COMPONENTS.md «round5 sections».
   Taste rules: one wash per section (never two tints touching: put a white section between) · at most 2 doodles per section ·
   at most 3 stickers in a row · a pattern only on a wash or a sticker, never behind long text · banana is still a highlighter.
   NO glow, NO blurred blobs, NO coloured circles in the background. Everything works at night (tokens.css «round5»). */

/* 18.1 the wash: a section with its own soft colour. <section class="wash wash--pink"><div class="wrap">…</div></section> */
.wash { --wash-c: var(--wash-paper); --wash-c2: var(--wash-paper-2); --wash-a: var(--banana);
  position: relative; isolation: isolate; background-color: var(--wash-c); padding-block: var(--gap-section); overflow-x: clip;
  box-shadow: inset 0 1px 0 var(--wash-edge), inset 0 -1px 0 var(--wash-edge); }
.wash--banana { --wash-c: var(--wash-banana); --wash-c2: var(--wash-banana-2); --wash-a: var(--banana); }
.wash--pink   { --wash-c: var(--wash-pink);   --wash-c2: var(--wash-pink-2);   --wash-a: var(--pink); }
.wash--peach  { --wash-c: var(--wash-peach);  --wash-c2: var(--wash-peach-2);  --wash-a: var(--peach); }
.wash--mauve  { --wash-c: var(--wash-mauve);  --wash-c2: var(--wash-mauve-2);  --wash-a: var(--mauve); }
.wash--paper  { --wash-c: var(--wash-paper);  --wash-c2: var(--wash-paper-2);  --wash-a: var(--banana); }
.wash--tight  { padding-block: var(--gap-block); }
/* a rounded room that floats inside the page margins (laptop and phone), instead of a full-width band */
.wash--inset { width: min(calc(100% - 2 * min(var(--gutter), 16px)), calc(var(--wrap) + 2 * var(--gutter))); margin-inline: auto; border-radius: var(--r-sheet);
  box-shadow: inset 0 0 0 1px var(--wash-edge); }
/* soft hand-made edges (his site's panel): a gentle wave at the bottom, at the top, or both */
:root { --wave-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 27' preserveAspectRatio='none'%3E%3Cpath d='M0 0H640V10C580 24 520 2 452 14S330 27 262 12 140 2 76 16 18 18 0 10Z'/%3E%3C/svg%3E");
        --wave-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 27' preserveAspectRatio='none'%3E%3Cpath d='M0 27H640V17C580 3 520 25 452 13S330 0 262 15 140 25 76 11 18 9 0 17Z'/%3E%3C/svg%3E"); }
.wash--wave-b { padding-bottom: calc(var(--gap-section) + 24px);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 26px) no-repeat, var(--wave-b) bottom / 640px 27px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 26px) no-repeat, var(--wave-b) bottom / 640px 27px repeat-x; }
.wash--wave-t { padding-top: calc(var(--gap-section) + 24px);
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - 26px) no-repeat, var(--wave-t) top / 640px 27px repeat-x;
          mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - 26px) no-repeat, var(--wave-t) top / 640px 27px repeat-x; }
.wash--wave { padding-block: calc(var(--gap-section) + 24px);
  -webkit-mask: linear-gradient(#000 0 0) center / 100% calc(100% - 52px) no-repeat, var(--wave-t) top / 640px 27px repeat-x, var(--wave-b) bottom / 640px 27px repeat-x;
          mask: linear-gradient(#000 0 0) center / 100% calc(100% - 52px) no-repeat, var(--wave-t) top / 640px 27px repeat-x, var(--wave-b) bottom / 640px 27px repeat-x; }
.wash--wave-b, .wash--wave-t, .wash--wave { box-shadow: none; }
/* (round5d night-global) at night every room is a NEUTRAL raised grey (tokens.css); its colour is only a thin accent:
   a floating room (.wash--inset) gets a soft tint of its own colour + a full hairline in it (27-11 Mulham: no one-sided top edges) */
:root[data-theme="dark"] .wash--inset { background-color: color-mix(in srgb, var(--wash-a, var(--banana)) 10%, var(--wash-c, #1E1E1E)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wash-a, var(--banana)) 28%, transparent); }
/* the heading of a room: a small line in the wash's colour above the title (his site's «eyebrow-line») */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-cap); font-weight: 700; color: var(--muted); margin-bottom: var(--s-3); }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--wash-a, var(--pink)); flex: none; }

/* 18.2 patterns (CSS only, low contrast): on a wash or a sticker, never under long text. One per element.
   On a wash, put the pattern on its own layer so it can fade towards the content: <div class="wash__pat pat-dots pat-fade"></div> */
.pat-dots  { background-image: radial-gradient(var(--pat-ink) 1.15px, transparent 1.7px); background-size: 22px 22px; background-position: 11px 11px; }
.pat-grid  { background-image: linear-gradient(var(--pat-ink) 1px, transparent 1px), linear-gradient(90deg, var(--pat-ink) 1px, transparent 1px); background-size: 28px 28px; background-position: -1px -1px; }
.pat-lines { background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--pat-ink) 31px 32px); }
.pat-paper { background-image: var(--grain); background-size: 180px 180px; }
.wash__pat { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* 27-11 Mulham: the hard empty hole in the middle looked odd → the pattern covers the whole card, only a touch softer behind the text */
.pat-fade { -webkit-mask-image: radial-gradient(80% 75% at 50% 50%, rgba(0, 0, 0, .5) 30%, #000 100%); mask-image: radial-gradient(80% 75% at 50% 50%, rgba(0, 0, 0, .5) 30%, #000 100%); }

/* 18.3 doodles: hand-drawn strokes, CSS only. <span class="doo doo--spark doo--pink" aria-hidden="true"></span>
   Shapes: spark · sparkle · squiggle · arrow · swash · loop · heart · lines · star. Colours: --banana --pink --peach --mauve --muted (ink by default).
   Size: style="--s:56px" (40px by default). Place: .doo--ts / --te / --bs / --be (top/bottom × start/end) inside a position:relative parent. */
.doo { --s: 40px; display: inline-block; width: var(--s); height: var(--s); flex: none; color: var(--doo-c, var(--doo-ink)); background: currentColor; pointer-events: none;
  -webkit-mask: var(--doo) center / contain no-repeat; mask: var(--doo) center / contain no-repeat; rotate: var(--doo-r, 0deg); }
.doo--banana { --doo-c: var(--banana); } .doo--pink { --doo-c: var(--pink); } .doo--peach { --doo-c: var(--peach); } .doo--mauve { --doo-c: var(--mauve); } .doo--muted { --doo-c: var(--muted); }
.doo--ts, .doo--te, .doo--bs, .doo--be { position: absolute; z-index: 1; }
.doo--ts { top: calc(var(--s) * -.35); inset-inline-start: calc(var(--s) * -.25); } .doo--te { top: calc(var(--s) * -.35); inset-inline-end: calc(var(--s) * -.25); }
.doo--bs { bottom: calc(var(--s) * -.3); inset-inline-start: calc(var(--s) * -.25); } .doo--be { bottom: calc(var(--s) * -.3); inset-inline-end: calc(var(--s) * -.25); }
.doo--spark    { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round'%3E%3Cpath d='M24 7v11M9.5 15.5l7 6.5M38.5 15.5l-7 6.5'/%3E%3C/svg%3E"); }
.doo--sparkle  { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.2' stroke-linejoin='round'%3E%3Cpath d='M22 6c1.6 9.6 5 13 14 14.6-9 1.6-12.4 5-14 14.6-1.6-9.6-5-13-14-14.6 9-1.6 12.4-5 14-14.6z'/%3E%3Cpath d='M38 33v8M34 37h8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.doo--squiggle { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 15c5-9 9-9 12 0s7 9 12 0 7-9 12 0 7 9 12 0 6-8 10-2'/%3E%3C/svg%3E"); height: calc(var(--s) * .375); }
.doo--arrow    { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M41 6C40 22 29 34 9 38'/%3E%3Cpath d='M17 30l-8 8 11 3'/%3E%3C/svg%3E"); }
.doo--swash    { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M4 11C36 4 82 3 116 8'/%3E%3Cpath d='M24 16c22-4 46-5 68-3' stroke-width='3'/%3E%3C/svg%3E"); height: calc(var(--s) * .17); }
.doo--loop     { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 30c10 2 20-2 25-10 4-7 1-14-5-12-7 2-5 16 6 19 10 3 22-3 32-13'/%3E%3C/svg%3E"); height: calc(var(--s) * .625); }
.doo--heart    { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.2' stroke-linejoin='round'%3E%3Cpath d='M24 39C12 31 7 25 7 18c0-5 4-9 9-9 3.6 0 6.4 2 8 5 1.6-3 4.4-5 8-5 5 0 9 4 9 9 0 7-5 13-17 21z'/%3E%3C/svg%3E"); }
.doo--lines    { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M30 14h12M22 24h20M30 34h12'/%3E%3C/svg%3E"); }
.doo--star     { --doo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M24 7l4.6 10 10.9 1.3-8 7.4 2.1 10.8L24 31.2l-9.6 5.3 2.1-10.8-8-7.4 10.9-1.3z'/%3E%3C/svg%3E"); }
[dir="ltr"] .doo--arrow, [dir="ltr"] .doo--lines { scale: -1 1; }
/* a doodle that draws itself in when it is seen (RTL: from the right) */
/* (a colour sweep, not a clip-path: a fully clipped element never counts as «seen») */
.js-reveal .doo[data-reveal="draw"] { opacity: 1; transform: none; background: linear-gradient(to left, currentColor 50%, transparent 50%) 0 0 / 200% 100% no-repeat;
  transition: background-position .75s var(--ease-in-out) var(--d, .15s); }
[dir="ltr"] .js-reveal .doo[data-reveal="draw"], .js-reveal[dir="ltr"] .doo[data-reveal="draw"] { background-image: linear-gradient(to right, currentColor 50%, transparent 50%); background-position: 100% 0; }
.js-reveal .doo[data-reveal="draw"].is-in { background-position: 100% 0; }
[dir="ltr"] .js-reveal .doo[data-reveal="draw"].is-in, .js-reveal[dir="ltr"] .doo[data-reveal="draw"].is-in { background-position: 0 0; }

/* 18.4 sticker cards: a slightly tilted card with a soft shadow, optional washi tape. Straightens up under the pointer.
   <article class="stk stk--tape">…</article> · tilt: .stk--r (the other way), .stk--flat, or style="--tilt:-2deg" ·
   colours: .stk--banana / --pink / --peach / --mauve (its deeper wash; at night a white card with a thin top line in the colour)
   a row: <div class="stk-row">… (alternating tilts) */
.stk { --tilt: -1.2deg; position: relative; display: block; background: var(--stk-c, var(--stk-bg)); color: var(--ink); border-radius: var(--r-card); padding: clamp(18px, 3vw, 26px);
  box-shadow: var(--stk-sh); rotate: var(--tilt); transition: rotate 200ms var(--ease), translate 200ms var(--ease), box-shadow 200ms var(--ease); }   /* round5g calm-hover: one calm lift, no spring */
.stk--r { --tilt: 1.3deg; } .stk--flat { --tilt: 0deg; }
.stk--banana { --stk-c: var(--wash-banana-2); } .stk--pink { --stk-c: var(--wash-pink-2); } .stk--peach { --stk-c: var(--wash-peach-2); } .stk--mauve { --stk-c: var(--wash-mauve-2); }
:root[data-theme="dark"] :is(.stk--banana, .stk--pink, .stk--peach, .stk--mauve) { --stk-c: var(--stk-bg); }
:root[data-theme="dark"] .stk--banana { --sc: var(--banana); } :root[data-theme="dark"] .stk--pink { --sc: var(--pink); }
:root[data-theme="dark"] .stk--peach { --sc: var(--peach); } :root[data-theme="dark"] .stk--mauve { --sc: var(--mauve); }
/* 27-11 Mulham (the one-sided top line looked bad): a night sticker = a soft tint of its colour + a full hairline in it */
:root[data-theme="dark"] :is(.stk--banana, .stk--pink, .stk--peach, .stk--mauve) { --stk-c: color-mix(in srgb, var(--sc) 12%, var(--stk-bg)); box-shadow: var(--stk-sh), inset 0 0 0 1px color-mix(in srgb, var(--sc) 30%, transparent); }
a.stk, button.stk { cursor: pointer; text-align: start; border: 0; font: inherit; text-decoration: none; }
@media (hover: hover) { .stk:hover { translate: 0 -3px; box-shadow: var(--stk-sh-hover); } }
a.stk:active, button.stk:active { translate: 0 1px; transition-duration: var(--dur-press); }
.stk--tape::before { content: ""; position: absolute; top: -11px; inset-inline-start: 50%; width: clamp(64px, 30%, 96px); height: 24px; translate: 50% 0; rotate: -4deg;
  background: var(--tape-c, var(--tape)); border-radius: 2px; pointer-events: none;
  -webkit-mask: conic-gradient(from -45deg at left, #0000 25%, #000 0) left / 51% 6px repeat-y, conic-gradient(from 135deg at right, #0000 25%, #000 0) right / 51% 6px repeat-y;
          mask: conic-gradient(from -45deg at left, #0000 25%, #000 0) left / 51% 6px repeat-y, conic-gradient(from 135deg at right, #0000 25%, #000 0) right / 51% 6px repeat-y; }
[dir="ltr"] .stk--tape::before { translate: -50% 0; }
.stk--tape-pink { --tape-c: var(--tape-pink); }
.stk-row { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); align-items: start; }
.stk-row > .stk:nth-child(3n+1) { --tilt: -1.2deg; } .stk-row > .stk:nth-child(3n+2) { --tilt: 1.1deg; } .stk-row > .stk:nth-child(3n) { --tilt: -.6deg; }
.stk__t { display: block; font-size: var(--t-h3); font-weight: 800; line-height: 1.4; margin-bottom: 6px; }
.stk__p { display: block; color: var(--ink-2); font-size: var(--t-md); line-height: 1.75; }

/* 18.5 the highlighter inside a sentence (not a title): <mark class="marker">كلمتين</mark>. Never animated. */
.marker { color: inherit; background: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 94%, transparent 94%); padding-inline: .12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 2px; }
:root[data-theme="dark"] .marker { color: var(--hl-ink); background: var(--hl); border-radius: .2em; padding: .02em .16em; }

/* 18.6 motion: gentle, opt-in, transform/opacity only. All of it stops under «reduce motion».
   .m-float   bobs up and down slowly (an object, a sticker; ≤ 2 per screen)
   .m-wiggle  (round5g calm-hover) no longer animates: hover = the one calm lift of .stk, nothing wiggles
   data-reveal="tilt"   a sticker lands into its tilt when it is seen · data-reveal="slide" comes in from the start side
   data-reveal="draw"   a doodle draws itself (above) */
.m-float { animation: m-float var(--dur-float) ease-in-out infinite; }
.m-float--slow { animation-duration: 8s; } .m-float--late { animation-delay: -3s; }
.js-reveal [data-reveal="tilt"] { transform: translateY(22px) rotate(4deg) scale(.96); transition: opacity var(--dur-2) ease var(--d, 0s), transform .75s var(--spring-pop) var(--d, 0s); }
.js-reveal [data-reveal="slide"] { transform: translateX(28px); }
[dir="ltr"] .js-reveal [data-reveal="slide"], .js-reveal[dir="ltr"] [data-reveal="slide"] { transform: translateX(-28px); }
.js-reveal [data-reveal="tilt"].is-in, .js-reveal [data-reveal="slide"].is-in { transform: none; }
@keyframes m-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@media (prefers-reduced-motion: reduce) {
  .m-float { animation: none !important; }
  .js-reveal .doo[data-reveal="draw"] { background: currentColor; }
  .js-reveal [data-reveal="tilt"], .js-reveal [data-reveal="slide"] { transform: none; }
  .stk { transition: none; }
  .mark { animation: none; }
}

/* 18.7 (item 14) an avatar without a picture = the person's FIRST LETTER on their own light tint (avatar.js AcademyAvatar.tint):
   banana · pink · peach · mauve, warm dark letter, in both looks. A bare .avatar (no tint class yet) takes the banana one. */
.avatar { --av-c: var(--av-1); }
.avatar--t1 { --av-c: var(--av-1); } .avatar--t2 { --av-c: var(--av-2); } .avatar--t3 { --av-c: var(--av-3); } .avatar--t4 { --av-c: var(--av-4); }
.avatar:where(:not(.avatar--pic):not(:has(img, .tag)):not([style*="--c"])) { background: var(--av-c); color: var(--av-ink); box-shadow: none; }

/* ───────── (round5e less-white, 27-11) (27-11: NIGHT ONLY — Mulham loved it at night, day reverted to white) the page tone, the side bar panel, the corner doodles — tokens.css «less-white».
   Mulham: «كتير أبيض لدرجة مو طبيعية، بتوجع العين، كأنه ما حدا عطاها اهتمام». The canvas is painted ONCE on <html> (a
   document-tall gradient + a two-colour dot grain: plain CSS gradients, no images, nothing fixed, so nothing repaints on
   scroll); the body is see-through so white stickers and the coloured washes sit on it. The doodles are two fixed, composited
   layers behind the content (z-index -1) that float on transform only; laptop only, reduced motion = still. ───────── */
:root[data-theme="dark"] { background-color: var(--canvas);
  background-image: radial-gradient(var(--canvas-dot-a) 1.1px, transparent 1.6px), radial-gradient(var(--canvas-dot-b) 1.1px, transparent 1.6px),
    linear-gradient(180deg, var(--canvas-1) 0, var(--canvas-2) 45%, var(--canvas-3) 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%; background-position: 0 0, 16px 16px, 0 0; }   /* 27-11: dots further apart */
:root[data-theme="dark"] body { background: transparent; }
:root[data-theme="dark"] .topbar { background: var(--canvas-1); }
/* «كورساتي»: the lessons floor under the header (p-courses.css .cr-floor, its dot pattern kept) lets this page tone show through
   by day, instead of a second near-white layer (at night it is already see-through) */
/* night: a coloured pattern inside each room (its own accent at a low dose) instead of a grey one */
:root[data-theme="dark"] .wash > .wash__pat { --pat-ink: color-mix(in srgb, var(--wash-a) 22%, transparent); }   /* 27-11 Mulham: lines/dots were too strong at night */
@media (min-width: 1100px) {
  /* the side bar: its own soft panel (day: banana-white → pink-white with a warm hairline; night: one step up from the page
     with a thin banana → peach → pink → mauve rim on its inner edge instead of the grey hairline) */
  :root[data-theme="dark"][data-area="app"] .sidebar { border-inline-end: 0;
    background: linear-gradient(180deg, rgba(255, 208, 0, .75), rgba(255, 170, 112, .7) 35%, rgba(255, 143, 192, .65) 70%, rgba(195, 139, 250, .6)) left / 2px 100% no-repeat, #151515; }
  :root[dir="ltr"][data-theme="dark"][data-area="app"] .sidebar { background-position: right, 0 0; }
  /* the doodles: two layers over the main area (beside the side bar when there is one), each a few small marks in its corners */
  :root[data-theme="dark"] body::before, :root[data-theme="dark"] body::after { content: ""; position: absolute; z-index: -1; inset-block: 0; inset-inline-start: var(--side-w, 0px); inset-inline-end: 0;
    pointer-events: none; background-repeat: no-repeat; will-change: transform; }
  :root[data-theme="dark"] body::before { background-image: var(--dd-sparkle), var(--dd-star), var(--dd-spark);
    background-size: 24px 24px, 18px 18px, 18px 18px; background-position: left 16px top 33%, right 18px top 70%, right 22px top 13%; }
  :root[data-theme="dark"] body::after { background-image: var(--dd-squiggle), var(--dd-star), var(--dd-sparkle-2);
    background-size: 36px 14px, 16px 16px, 14px 14px; background-position: left 12px top 93%, left 22px top 57%, right 26px top 42%; }
  /* the user row at the foot of the side bar sits on the panel (no white box of its own) */
  :root[data-theme="dark"][data-area="app"] .sidebar .userchip { background: transparent; }
  :root[data-cm] body::before, :root[data-cm] body::after, :root[data-nav="bare"] body::before, :root[data-nav="bare"] body::after { content: none; }
  @media (prefers-reduced-motion: no-preference) {
    body::before { animation: lw-float 9s ease-in-out infinite; }
    body::after { animation: lw-float 11s ease-in-out -4s infinite reverse; }
    @keyframes lw-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -7px, 0); } }
  }
}

/* ───────── (round5f day-colour, 27-11) DAY ONLY: the page stays plain white, but one or two chosen windows per screen get
   their own clear pastel (Mulham: «النهاري بيضل أبيض، بس بعض النوافذ تتلوّن فيها شوي أكتر، لحتى يكون فيه حياة»).
   Each coloured window = a saturated-enough pastel fill + a deeper hairline of the same hue + a crisp lip and a short shadow,
   so it reads as a card on white (never a page tint, never two coloured windows touching, the rest stays white).
   Night is untouched: every rule here sits under :root:not([data-theme="dark"]). ───────── */
:root:not([data-theme="dark"]) {
  --dc-banana: #FFF3B8;  --dc-banana-e: #F2D45C;  --dc-banana-l: #E9C63A;
  --dc-pink:   #FFE1EC;  --dc-pink-e:   #F6B3CB;  --dc-pink-l:   #EE9DBB;
  --dc-peach:  #FFE6D6;  --dc-peach-e:  #F5BF9F;  --dc-peach-l:  #EDAB86;
  --dc-lilac:  #F1E4FF;  --dc-lilac-e:  #D8B8F7;  --dc-lilac-l:  #C9A0F2;
  --dc-drop: 0 18px 30px -22px rgba(90, 50, 30, .45);
}
/* the recipe, per colour (a window picks one with --dc / --dc-e / --dc-l) */
:root:not([data-theme="dark"]) :is(.mine__room, .mine__slot, .cat__grid .cat__item:not(.cat__item--soon), .acc-top.wash, .acc-set__b .acc-list, .ap-room, .ab-close, .wash.hm-start, .ab-num) {
  background-color: var(--dc); box-shadow: inset 0 0 0 1.5px var(--dc-e), 0 4px 0 -1px var(--dc-l), var(--dc-drop); }

/* كورساتي: the floor under the header goes white (the dots stay), the challenge = banana, «تصفّح الكورسات» = pink */
:root:not([data-theme="dark"]) .mine > .cr-floor { --fl: #FFFFFF; }
/* (course-tones 27-11) the challenge's room = lilac, ITS colour everywhere (each other course = its own card, p-courses.css .mine__tcard) */
:root:not([data-theme="dark"]) .mine__room { --dc: var(--dc-lilac); --dc-e: var(--dc-lilac-e); --dc-l: var(--dc-lilac-l); --pat-ink: rgba(150, 90, 220, .12); }
:root:not([data-theme="dark"]) .mine__slot { --dc: var(--dc-pink); --dc-e: var(--dc-pink-e); --dc-l: var(--dc-pink-l); border: 0; padding: calc(var(--s-4) + 2px) calc(var(--s-5) + 2px); }
@media (hover: hover) { :root:not([data-theme="dark"]) .mine__slot:hover { background-color: #FFD6E5; } }
:root:not([data-theme="dark"]) .mine__slot:active { background-color: #FFD6E5; }
:root:not([data-theme="dark"]) .mine__slot > .ico { color: var(--ink-2); }

/* الكورسات: each open course is its own card, the colours take turns (pink first: the header above is banana) */
:root:not([data-theme="dark"]) .cat__grid .cat__item:not(.cat__item--soon) { --dc: var(--dc-pink); --dc-e: var(--dc-pink-e); --dc-l: var(--dc-pink-l);
  padding: var(--s-7) var(--s-6); border-radius: var(--r-sheet, 28px); }
:root:not([data-theme="dark"]) .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+2) { --dc: var(--dc-banana); --dc-e: var(--dc-banana-e); --dc-l: var(--dc-banana-l); }
:root:not([data-theme="dark"]) .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+3) { --dc: var(--dc-peach); --dc-e: var(--dc-peach-e); --dc-l: var(--dc-peach-l); }
:root:not([data-theme="dark"]) .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+4) { --dc: var(--dc-lilac); --dc-e: var(--dc-lilac-e); --dc-l: var(--dc-lilac-l); }
:root:not([data-theme="dark"]) .cat__grid .cat__item + .cat__item { border-top: 0; margin-top: var(--s-5); }
@media (min-width: 700px) { :root:not([data-theme="dark"]) .cat__grid--one .cat__item:not(.cat__item--soon) { padding: var(--s-8) clamp(32px, 5vw, 64px); } }

/* حسابي: the cover room = peach (now with a clear edge), «الإشعارات والتطبيق» = lilac; «حسابك» and the rest stay white */
:root:not([data-theme="dark"]) .acc-top.wash { --dc: var(--dc-peach); --dc-e: var(--dc-peach-e); --dc-l: var(--dc-peach-l); --pat-ink: rgba(200, 110, 60, .12); }
:root:not([data-theme="dark"]) .acc-top .acc-list { box-shadow: inset 0 0 0 1px rgba(237, 171, 134, .55), var(--stk-sh); }
:root:not([data-theme="dark"]) .acc-set__b .acc-list { --dc: var(--dc-lilac); --dc-e: var(--dc-lilac-e); --dc-l: var(--dc-lilac-l); border-color: transparent; }
:root:not([data-theme="dark"]) .acc-set__b .acc-list > li + li > .acc-row::before { background: rgba(168, 85, 247, .2); }
:root:not([data-theme="dark"]) .acc-set__b .acc-row:is(a, button, label):active { background: #E8D6FE; }
@media (hover: hover) { :root:not([data-theme="dark"]) .acc-set__b .acc-row:is(a, button, label):hover { background: #E8D6FE; } }
:root:not([data-theme="dark"]) .acc-set__b .acc-row__ic { background-color: #FFFFFF; }

/* التطبيق: the device path room = peach with a clear edge (the QR card inside stays white) */
:root:not([data-theme="dark"]) .ap-room { --dc: var(--dc-peach); --dc-e: var(--dc-peach-e); --dc-l: var(--dc-peach-l); --pat-ink: rgba(200, 110, 60, .12); }

/* تعرّف على د. ملهم: the four numbers keep their colours but get the clear edge; the closing quote room = pink */
:root:not([data-theme="dark"]) .ab-num.stk--banana { --dc: var(--dc-banana); --dc-e: var(--dc-banana-e); --dc-l: var(--dc-banana-l); }
:root:not([data-theme="dark"]) .ab-num.stk--pink   { --dc: var(--dc-pink);   --dc-e: var(--dc-pink-e);   --dc-l: var(--dc-pink-l); }
:root:not([data-theme="dark"]) .ab-num.stk--peach  { --dc: var(--dc-peach);  --dc-e: var(--dc-peach-e);  --dc-l: var(--dc-peach-l); }
:root:not([data-theme="dark"]) .ab-num.stk--mauve  { --dc: var(--dc-lilac);  --dc-e: var(--dc-lilac-e);  --dc-l: var(--dc-lilac-l); }
:root:not([data-theme="dark"]) .ab-close { --dc: var(--dc-pink); --dc-e: var(--dc-pink-e); --dc-l: var(--dc-pink-l); --pat-ink: rgba(220, 90, 140, .1); }

/* the guest home: the «من وين تبلّش» room = lilac with a clear edge (its own gradient gives way to the flat card colour) */
:root:not([data-theme="dark"]) .wash.hm-start { --dc: var(--dc-lilac); --dc-e: var(--dc-lilac-e); --dc-l: var(--dc-lilac-l); background-image: none; }
/* 27-11 Mulham: the doodles scroll WITH the page (not stuck to the screen), smaller, no pink heart (calmer, not too «cute») */
@media (min-width: 1100px) { :root[data-theme="dark"] body { position: relative; } }

/* ───────── (27-11 night cards) the day's coloured windows get a NIGHT box too (Mulham: «بالليلي ليش ما في مربعات حوالين كل منتج؟»):
   a dark card one step above the black page, tinted with the window's own colour + a full hairline in it (no top edge) ───────── */
:root[data-theme="dark"] :is(.mine__slot, .cat__grid .cat__item:not(.cat__item--soon), .acc-set__b .acc-list, .ap-room, .ab-num) {
  background-color: color-mix(in srgb, var(--nc, var(--banana)) 12%, #1B1B1B); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nc, var(--banana)) 30%, transparent), 0 18px 30px -22px rgba(0, 0, 0, .9); }
:root[data-theme="dark"] .cat__grid .cat__item:not(.cat__item--soon) { --nc: #FF8FC0; padding: var(--s-7) var(--s-6); border-radius: var(--r-sheet, 28px); }
:root[data-theme="dark"] .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+2) { --nc: var(--banana); }
:root[data-theme="dark"] .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+3) { --nc: #FFAA70; }
:root[data-theme="dark"] .cat__grid .cat__item:not(.cat__item--soon):nth-child(4n+4) { --nc: #C38BFA; }
:root[data-theme="dark"] .cat__grid .cat__item + .cat__item { border-top: 0; margin-top: var(--s-5); }
@media (min-width: 700px) { :root[data-theme="dark"] .cat__grid--one .cat__item:not(.cat__item--soon) { padding: var(--s-8) clamp(32px, 5vw, 64px); } }
:root[data-theme="dark"] .mine__slot { --nc: #FF8FC0; border: 0; padding: calc(var(--s-4) + 2px) calc(var(--s-5) + 2px); }
:root[data-theme="dark"] .acc-set__b .acc-list { --nc: #C38BFA; border-color: transparent; }
:root[data-theme="dark"] .ap-room { --nc: #FFAA70; }
/* 27-11 Mulham: fewer side doodles at night (one layer of three small marks is enough) */
:root[data-theme="dark"] body::after { content: none !important; }
/* 27-11 Mulham: at night the section dots further apart (fewer, calmer) */
:root[data-theme="dark"] .pat-dots { background-size: 27px 27px; background-position: 13px 13px; }
/* 27-11 Mulham: the floating side doodles distract on every page → gone (the small sparkles beside titles stay) */
:root[data-theme="dark"] body::before { content: none !important; }

/* ───────── 27-11 «YouTube hover» (Mulham loved it): a plain WHITE row/item takes a soft colour of its own when you hover it
   (each row its own: banana · pink · peach · lilac, taking turns), day and night. Never on windows that are already coloured
   (the lilac settings card, coloured course cards, coloured rooms keep their own look). Laptop/mouse only. ───────── */
@media (hover: hover) {
  :is(a, button).list__item, :is(a, button, label).acc-row, .cm-row { transition: background-color .2s var(--ease, ease); }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):hover { background-color: var(--yh, #FFF3B8); }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+2):hover { --yh: #FFE1EC; }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+3):hover { --yh: #FFE6D6; }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+4):hover { --yh: #F1E4FF; }
  :root:not([data-theme="dark"]) li:nth-child(4n+2) > :is(a, button, label).acc-row:hover { --yh: #FFE1EC; }
  :root:not([data-theme="dark"]) li:nth-child(4n+3) > :is(a, button, label).acc-row:hover { --yh: #FFE6D6; }
  :root:not([data-theme="dark"]) li:nth-child(4n+4) > :is(a, button, label).acc-row:hover { --yh: #F1E4FF; }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):hover { background-color: var(--yhn, rgba(255, 208, 0, .10)); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+2):hover, :root[data-theme="dark"] li:nth-child(4n+2) > :is(a, button, label).acc-row:hover { --yhn: rgba(255, 143, 192, .11); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+3):hover, :root[data-theme="dark"] li:nth-child(4n+3) > :is(a, button, label).acc-row:hover { --yhn: rgba(255, 170, 112, .11); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+4):hover, :root[data-theme="dark"] li:nth-child(4n+4) > :is(a, button, label).acc-row:hover { --yhn: rgba(195, 139, 250, .13); }
  /* already-coloured windows keep their own hover */
  :root:not([data-theme="dark"]) .acc-set__b .acc-row:is(a, button, label):hover { background-color: #E8D6FE; }
}
/* phones: the same soft colour while a row is pressed (no hover on touch) */
@media (hover: none) {
  :is(a, button).list__item, :is(a, button, label).acc-row, .cm-row { transition: background-color .2s var(--ease, ease); }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):active { background-color: var(--yh, #FFF3B8); }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+2):active { --yh: #FFE1EC; }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+3):active { --yh: #FFE6D6; }
  :root:not([data-theme="dark"]) :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+4):active { --yh: #F1E4FF; }
  :root:not([data-theme="dark"]) li:nth-child(4n+2) > :is(a, button, label).acc-row:active { --yh: #FFE1EC; }
  :root:not([data-theme="dark"]) li:nth-child(4n+3) > :is(a, button, label).acc-row:active { --yh: #FFE6D6; }
  :root:not([data-theme="dark"]) li:nth-child(4n+4) > :is(a, button, label).acc-row:active { --yh: #F1E4FF; }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):active { background-color: var(--yhn, rgba(255, 208, 0, .10)); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+2):active, :root[data-theme="dark"] li:nth-child(4n+2) > :is(a, button, label).acc-row:active { --yhn: rgba(255, 143, 192, .11); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+3):active, :root[data-theme="dark"] li:nth-child(4n+3) > :is(a, button, label).acc-row:active { --yhn: rgba(255, 170, 112, .11); }
  :root[data-theme="dark"] :is(:is(a, button).list__item, :is(a, button, label).acc-row, .cm-row:not(.is-on)):nth-child(4n+4):active, :root[data-theme="dark"] li:nth-child(4n+4) > :is(a, button, label).acc-row:active { --yhn: rgba(195, 139, 250, .13); }
  /* already-coloured windows keep their own hover */
}
/* 27-11 Mulham: the long colour rim down the side bar at night → gone; a quiet hairline and the panel one step above the page */
@media (min-width: 1100px) {
  :root[data-theme="dark"][data-area="app"] .sidebar { background: #151515 !important; border-inline-end: 1px solid rgba(255, 255, 255, .06) !important; }
}
/* 27-11 Mulham (phone): the last item of a page hid behind the bottom tab bar → every signed-in page ends with room for it */
@media (max-width: 699px) {
  :root[data-signed] .main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 28px) !important; }
}

/* ───────── 27-11 Mulham: hover on cards = ONE gentle turn in one direction (not a lift, never a wiggle). Odd cards turn
   one way, even cards the other; it eases in once (220ms) and stays until the pointer leaves. Buttons keep their press. ───────── */
@media (hover: hover) {
  :is(.stk, .ab-num, .ab-note, .acc-feat, .mine__room, .mine__tcard, .hm-topic, .hm-cs__item, .cat__item:not(.cat__item--soon), a.card, a.paper, button.card, .card--press, a.ccard, .cm-art, .art--tilt, .ch-hero__tilt, .lp-art__tilt, .acc-avs__opt) {
    transition: transform .22s cubic-bezier(.2, .7, .2, 1), rotate .22s cubic-bezier(.2, .7, .2, 1), translate .22s ease, box-shadow .22s ease; }
  :is(.stk, .ab-num, .ab-note, .acc-feat, .mine__room, .mine__tcard, .hm-topic, .hm-cs__item, .cat__item:not(.cat__item--soon), a.card, a.paper, button.card, .card--press, a.ccard, .cm-art, .art--tilt, .ch-hero__tilt, .lp-art__tilt, .acc-avs__opt):hover {
    translate: none !important; transform: rotate(-1.6deg) !important; }
  :is(.stk, .ab-num, .ab-note, .mine__tcard, .hm-topic, .hm-cs__item, .cat__item:not(.cat__item--soon), .acc-avs__opt):nth-child(even):hover { transform: rotate(1.6deg) !important; }
  .cat__item:not(.cat__item--soon):hover .cat__pic .pic { transform: none !important; }
  .cm-row:hover .cm-av__img { transform: rotate(-4deg) !important; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.stk, .ab-num, .ab-note, .acc-feat, .mine__room, .mine__tcard, .hm-topic, .hm-cs__item, .cat__item, a.card, a.paper, .cm-art, .art--tilt):hover { transform: none !important; }
}
/* 27-11 Mulham (night): the big yellow block behind the marked word ran into the lines above and below → at night the marker
   is a bold yellow underline under the word (white letters stay crisp), like a highlighter stroke, never a block */
html:root[data-theme="dark"] .mark { color: #FFD000 !important; animation: none !important; }
html:root[data-theme="dark"] .mark::after { display: none !important; }
/* the guest home at night: plain deep black behind the hero (the dots read as noise there) */
:root[data-theme="dark"][data-screen="hero"] { background-image: none !important; }

/* (28-11 name «أكاديمية مُلهِم») on a phone the login is a small person icon (Mulham), so the name keeps its room */
.topbar__login-ico { display: none; }
@media (max-width: 699px) {
  .topbar__in { padding-inline: 16px !important; gap: 10px !important; }
  .topbar__end { gap: 6px !important; }
  .topbar .tag { font-size: 1.16rem; gap: 8px; } .topbar .tag::before { width: 30px; height: 30px; }
  .topbar__login { width: 44px; min-width: 44px !important; height: 44px; min-height: 44px; padding: 0 !important; display: inline-grid !important; place-items: center; border-radius: 14px; }
  .topbar__login > span { display: none; }
  .topbar__login-ico { display: block; width: 22px; height: 22px; }
}
@media (max-width: 340px) { .topbar .tag { font-size: 1rem; } }

/* ───────── (round5g hero-v2, 28-11) the VISITOR home hero only (p-home.js guestView): the headline, its marker at night,
   the night tone, the goal stickers at night. Everything here is scoped to :root[data-screen="hero"] (set only for a guest).
   Mulham: the 3-line pyramid «كورسات بتطلع منها / بنتيجة، مو بس / بمعلومات» split the contrast phrase in two.
   Now the headline is two ideas: «كورسات بتطلع منها بنتيجة،» (big, the marker on «بنتيجة») and «مو بس بمعلومات» (a step
   smaller, lighter, softer ink). Laptop: the text block starts on the right (RTL start) with the two buttons side by side, so
   the middle between the words and the goal wall breathes. Phone/tablet portrait: centred, «كورسات بتطلع منها» / «بنتيجة،» /
   «مو بس بمعلومات». Night: white letters on a mauve swipe across the lower-middle of «بنتيجة» (the day swipe's own shape;
   the dots under ب ي ج stay clear below it), a warm near-black page instead of flat #111, clean opaque washi tape (the
   translucent yellow read olive on black), and stickers a step lighter than the page so the wall does not sink. ───────── */
:root[data-screen="hero"] .hm-hero__title { max-width: none; line-height: 1.3; }
:root[data-screen="hero"] .hm-hero__l { display: block; text-wrap: wrap; }
:root[data-screen="hero"] .hm-hero__l + .hm-hero__l { margin-top: 0; }   /* (28-11 Mulham) the three lines one size: «مو بس بمعلومات» is the point */
@media (min-width: 1100px), (min-width: 700px) and (orientation: landscape) {
  :root[data-screen="hero"] .hm-hero__in { grid-template-columns: minmax(0, 640px) auto; column-gap: clamp(72px, 6vw, 100px); }
  :root[data-screen="hero"] .hm-hero__text { max-width: 640px; justify-items: start; text-align: start; }
  :root[data-screen="hero"] .hm-hero__title { margin-inline: 0; font-size: clamp(2.2rem, .4rem + 2.6vw, 2.85rem); }
  :root[data-screen="hero"] .hm-hero__lead { margin: 20px 0 32px; }
  :root[data-screen="hero"] .hm-hero__cta { margin-inline: 0; width: auto; max-width: none; grid-template-columns: repeat(2, auto); gap: 12px; }
  :root[data-screen="hero"] .hm-hero__cta > .btn { width: auto; min-width: 200px; padding-inline: 34px; }
  :root[data-screen="hero"] .hm-wall { --k: .8; }
  @media (max-width: 1199px) { :root[data-screen="hero"] .hm-wall { --k: .72; } }
  @media (max-width: 999px) { :root[data-screen="hero"] .hm-wall { --k: .62; } }
}
/* night: a warm near-black page (the topbar follows --canvas-1), no dots on the hero */
html:root[data-theme="dark"][data-screen="hero"] { --canvas: #111111; --canvas-1: #111111; --canvas-2: #111111; --canvas-3: #111111;   /* (28-11 Mulham) ONE flat colour: the fade read as a lighter band under the top bar */
  background-color: var(--canvas) !important; background-image: linear-gradient(180deg, var(--canvas-1) 0, var(--canvas-2) 45%, var(--canvas-3) 100%) !important; background-size: 100% 100% !important; }
/* night marker (hero only; the site-wide night .mark stays a yellow word): white letters on a mauve swipe */
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark { color: #fff !important; }
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark::after { display: block !important; inset-inline: -.14em; top: auto; bottom: .3em; height: .52em; background: #A855F7;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 12C46 6 122 10 195 4L197 30C140 35 72 31 3 38Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 12C46 6 122 10 195 4L197 30C140 35 72 31 3 38Z'/%3E%3C/svg%3E"); }
/* night stickers: a step lighter than the page with a clear rim; the washi tape opaque and clean */
:root[data-theme="dark"][data-screen="hero"] .hm-stk__f { background: #1E1E1E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .05), 0 22px 40px -18px rgba(0, 0, 0, .95); }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tape { opacity: 1; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .6); }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tape--banana { background: #F2CF4A; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tape--peach { background: #F5A887; }
@media (max-width: 699px) {
  :root[data-theme="dark"][data-screen="hero"] .hm-stk__f { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 12px 22px -12px rgba(0, 0, 0, .9); }
}

/* ───────── (28-11 app-onboard) the ONE app: the bell, the slim strip, the «التطبيق والإشعارات» sheet, the iPhone steps
   (shell.js Academy.onboard). Signed-in members only. The bell = a quiet 44px icon with an 8px banana dot while a step is
   left; the strip = one calm hairline row under the top bar; nothing glows, nothing has a side accent. ───────── */
.onb-bell[hidden] { display: none !important; }
.onb-bell .ico { width: 23px; height: 23px; }
.onb-bell__dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--banana); box-shadow: 0 0 0 2px var(--surface); transform: scale(0); transition: transform 300ms var(--spring-pop); }
.onb-bell.has-dot .onb-bell__dot { transform: scale(1); }
.onb-bell--side { display: none; }
@media (min-width: 1100px) {
  /* the side bar: the bell sits at the end of the person's own row (the name keeps its room) */
  .sidebar__foot { position: relative; }
  :root[data-area="app"] .onb-bell--side { display: grid; position: absolute; bottom: 8px; inset-inline-end: 0; }
  :root[data-area="app"] .sidebar__foot:has(.onb-bell--side:not([hidden])) .userchip { padding-inline-end: 52px; }
}
@media (max-width: 359px) { .topbar .onb-bell { width: 40px; } }

.onb-strip[hidden] { display: none; }
/* the strip: ONE slim full-width row right under the top bar (a whisper of grey, a hairline under it), so whatever room
   colour the page opens with starts cleanly below it */
.onb-strip { margin-inline-start: var(--side-w); padding-inline: var(--gutter); background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line); animation: fade-in var(--dur-2) ease both; }
.onb-strip__in { max-width: var(--wrap); margin-inline: auto; display: flex; align-items: center; gap: 12px; min-height: 68px; padding-block: 12px; }
.onb-strip__ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.onb-strip__ic .ico { width: 19px; height: 19px; }
.onb-strip__t { flex: 1; min-width: 0; margin: 0; font-size: var(--t-sm); font-weight: 600; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.onb-strip__go { flex: none; min-width: 76px; }
.onb-strip__x { flex: none; width: 40px; height: 40px; color: var(--muted); margin-inline-end: -8px; }
.onb-strip__x .ico { width: 18px; height: 18px; }
:root[data-theme="dark"] .onb-strip { background: #161616; box-shadow: inset 0 -1px 0 #262626; }
:root[data-theme="dark"] .onb-strip__ic { background: #222222; color: var(--banana); box-shadow: none; }
@media (max-width: 699px) {
  .onb-strip { padding-inline: 16px; }
  .onb-strip__in { gap: 10px; min-height: 60px; }
  .onb-strip__ic { width: 30px; height: 30px; border-radius: 10px; }
  .onb-strip__t { font-size: .8125rem; }
  .onb-strip__go { min-width: 0; padding-inline: 16px; }
  .onb-strip__x { width: 36px; height: 36px; margin-inline: -6px -8px; }
}

/* the sheet: two numbered rows, each a title + its state + one action */
.onb-sh { display: grid; gap: 12px; padding-bottom: var(--s-2); }
.onb-sh__row { display: grid; gap: 12px; padding: 16px 16px 18px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.onb-sh__h { display: flex; align-items: center; gap: 12px; }
.onb-sh__h h3 { flex: 1; margin: 0; font-size: var(--t-h3); font-weight: 800; }
.onb-sh__n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--banana); color: #1C1A17; font-weight: 800; font-size: 1rem; line-height: 1; box-shadow: 0 2px 0 var(--banana-d); rotate: -4deg; }
.onb-sh__row + .onb-sh__row .onb-sh__n { rotate: 3deg; }
.onb-sh__row.is-done .onb-sh__n { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.onb-sh__p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.75; font-weight: 400; text-wrap: pretty; }
.onb-sh__hint { margin: 0; color: var(--muted); font-size: var(--t-cap); line-height: 1.8; }
.onb-sh__sw { align-items: center; gap: 16px; min-height: 0; }
.onb-sh__sw input:disabled { opacity: .55; cursor: progress; }
.onb-sh__mark { margin-top: 2px; }
.onb-done { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 11px 2px 12px; border-radius: var(--r-pill); background: var(--wash-banana-2); color: var(--ink); font-weight: 700; font-size: .8125rem; }
.onb-done .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.onb-linkbtn { background-color: transparent; color: inherit; font: inherit; padding-inline: 0; }
:root[data-theme="dark"] .onb-sh__row { box-shadow: inset 0 0 0 1px #2C2C2C; }
:root[data-theme="dark"] .onb-sh__n { color: #141414; box-shadow: none; }
:root[data-theme="dark"] .onb-sh__row.is-done .onb-sh__n { background: #2A2A2A; color: var(--muted); }
:root[data-theme="dark"] .onb-done { background: #2A2A2A; color: var(--banana); }

/* the iPhone steps (the /app cards, small): a coloured number, one line, the real iOS control drawn in page ink */
.onb-ios { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onb-ios__s--pink { --k: #FF9CC2; --k-t: #FFEAF2; --k-d: #C2457A; }
.onb-ios__s--lilac { --k: #D9B8FB; --k-t: #F4EAFE; --k-d: #8A3FD9; }
.onb-ios__s--peach { --k: #FFA27A; --k-t: #FFEDE4; --k-d: #B5531F; }
.onb-ios__s { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 8px; padding-inline-start: 10px; border-radius: 16px; background: var(--k-t); }
.onb-ios__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--k); color: #1C1A17; font-weight: 800; font-size: .95rem; line-height: 1; box-shadow: 0 2px 0 var(--k-d); rotate: -4deg; }
.onb-ios__s:nth-child(2) .onb-ios__n { rotate: 3deg; }
.onb-ios__t { color: var(--ink-2); font-size: .8125rem; line-height: 1.6; text-wrap: pretty; }
.onb-ios__t b { color: var(--ink); font-weight: 800; }
.onb-ios__pic { display: grid; }
.onb-i { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.onb-ctl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink); background: var(--surface); box-shadow: 0 1px 0 rgba(28, 26, 23, .08), 0 4px 10px -6px rgba(28, 26, 23, .3); }
.onb-ctl--ic, .onb-ctl--row { width: 38px; height: 38px; border-radius: 11px; }
.onb-ctl--txt { min-height: 32px; padding: 2px 13px; border-radius: 999px; font-weight: 800; font-size: .8125rem; }
:root[data-theme="dark"] .onb-ios__s { background: #1E1E1E; box-shadow: inset 0 0 0 1px #2C2C2C; }
:root[data-theme="dark"] .onb-ios__n { color: #141414; box-shadow: none; }
:root[data-theme="dark"] .onb-ctl { background: var(--surface-3); box-shadow: inset 0 0 0 1px #3A3A3A; }
/* (28-11 app-onboard) the phone's login icon (28-11 «أكاديمية مُلهِم» rule above) forced its display over [hidden], so a
   signed-in member saw it beside the bell: [data-guest] hidden means hidden */
.topbar__login[hidden] { display: none !important; }

/* (28-11 the new logo, Mulham) the lockup reads «أكاديمية» + the yellow tile, and the tile IS «مُلهِم» (never the word twice).
   The tile is big enough that its hand-drawn «مُلهِم» is as tall as the text «أكاديمية» beside it (they read as one name) */
.tag:not(.tag--mark)::before { order: 2; width: 58px; height: 58px; border-radius: 14px; }
.tag:not(.tag--mark) { gap: 6px; font-size: 1.12rem; }
.topbar .tag:not(.tag--mark) { min-height: 58px; }
.tag--sm:not(.tag--mark) { font-size: .95rem; } .tag--sm:not(.tag--mark)::before { width: 46px; height: 46px; border-radius: 11px; }
@media (max-width: 699px) { .topbar .tag:not(.tag--mark) { font-size: 1rem; min-height: 50px; } .topbar .tag:not(.tag--mark)::before { width: 50px; height: 50px; border-radius: 12px; } }

/* (28-11 Mulham: a band under the top bar at night) the page headers (the wavy washes: catalogue, a course, كورساتي, the
   member home) take the page black at night: no lighter band, no grid behind them */
/* (29-11 Mulham: «كانوا أحلى») the coloured room with its faint grid is back at night on every wavy header; the two rules
   that took it away (28-11) are gone */

/* ───────── (28-11 hero-phone, Mulham: «the three cards are crowding, the screen can't hold them» + uneven gaps) the VISITOR
   home hero on a PHONE only (< 700px; tablet/laptop untouched). p-home.js guestView / wall().
   1) A calm DECK instead of three readable cards: the money goal («أول 500$ من مشروعي الجانبي») in front; the content and
      the habits cards fanned out behind it (±6.5° around a point far below, so only their outer top corners and sides peek
      out), blank (their words are hidden, so nothing collides) in soft peach / pink paper, warm tints at night.
   2) An EVEN rhythm: the text block opens up (display: contents) and the hero is one grid column whose spaces are equal
      fractions: top · deck · SPACE · headline + lead · SPACE · buttons · SPACE · topics strip. So cards→headline ≈
      lead→buttons ≈ buttons→strip on every height (each space has a floor; a very short phone simply grows the hero).
   3) The headline grows with the screen height (clamped by width), and the deck a step bigger on tall phones, so tall
      phones are not mostly air. The lead is one line («كل درس بينتهي بخطوة بتطبّقها»).
   Checked 360×740, 375×667, 390×844, 412×915, 430×932 day/night: no overlap, no sideways scroll, the topics strip at the
   bottom of the first screen with a chip cut at both edges. Shots: academy/design/round5g/hero-phone/. ───────── */
@media (max-width: 699px) {
  :root[data-screen="hero"] .hm-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: stretch; gap: 0; padding-block: 0;
    grid-template-rows: minmax(10px, .8fr) auto minmax(16px, 1fr) auto auto minmax(16px, 1fr) auto minmax(4px, .86fr); }
  :root[data-screen="hero"] .hm-hero__text { display: contents; }
  :root[data-screen="hero"] .hm-pic { grid-row: 2; order: 0; }
  :root[data-screen="hero"] .hm-hero__title { grid-row: 4; font-size: clamp(1.7rem, min(3.7svh, 8.6vw), 2.2rem); }
  :root[data-screen="hero"] .hm-hero__lead { grid-row: 5; margin: 12px auto 0; max-width: none; white-space: nowrap; font-size: 1rem; }
  :root[data-screen="hero"] .hm-hero__cta { grid-row: 7; margin: 0 auto; }
  :root[data-screen="hero"] .hm-strip__in { padding-block: 10px 18px; }
  /* the deck: three stickers in ONE grid cell; the fanned ones reach ~16px below/above the box, hence the wall's padding */
  :root[data-screen="hero"] .hm-wall { max-width: 276px; }
  :root[data-screen="hero"] .hm-wall__in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "s"; gap: 0; padding-block: 24px 16px; }
  :root[data-screen="hero"] .hm-stk { grid-area: s; order: 0; width: 100%; justify-self: center; align-self: stretch; }
  :root[data-screen="hero"] .hm-stk--2 { z-index: 3; --r: -1.5deg; }
  :root[data-screen="hero"] .hm-stk--1 { z-index: 2; --r: -6.5deg; transform-origin: 50% 230%; }
  :root[data-screen="hero"] .hm-stk--4 { z-index: 1; --r: 6.5deg; transform-origin: 50% 230%; }
  :root[data-screen="hero"] :is(.hm-stk--1, .hm-stk--4) .hm-stk__f > * { visibility: hidden; }
  :root[data-screen="hero"] .hm-stk--1 .hm-stk__f { background: #FFE6D8; }
  :root[data-screen="hero"] .hm-stk--4 .hm-stk__f { background: #FFE3EE; }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk--1 .hm-stk__f { background: #3A2A22; }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk--4 .hm-stk__f { background: #38252F; }
  :root[data-screen="hero"] .hm-stk--2 .hm-stk__f { padding: 14px 14px 12px; gap: 9px; }
  :root[data-screen="hero"] .hm-stk--2 .hm-stk__top b { font-size: 14px; }
}
@media (max-width: 699px) and (min-height: 800px) {
  :root[data-screen="hero"] .hm-wall { max-width: 300px; }
  :root[data-screen="hero"] .hm-stk--2 .hm-stk__top b { font-size: 15px; }
  :root[data-screen="hero"] .hm-hero__lead { font-size: 1.0625rem; }
}
@media (max-width: 699px) and (min-height: 900px) {
  :root[data-screen="hero"] .hm-wall { max-width: 316px; }
  :root[data-screen="hero"] .hm-stk--2 .hm-stk__f { padding: 16px 16px 14px; gap: 10px; }
  :root[data-screen="hero"] .hm-stk--2 .hm-stk__top b { font-size: 15.5px; }
}
@media (max-width: 359px) { :root[data-screen="hero"] .hm-wall { max-width: 248px; } }   /* the fan stays inside a 320px screen */

/* ───────── (28-11 hero-cards, Mulham) the VISITOR home hero (p-home.js guestView / wall()), three asks:
   1) PHONE (< 700px): the deck becomes STACKED NOTIFICATIONS, so a visitor sees several different goals (the courses cover
      many things): the money card («أول 500$ من مشروعي الجانبي») in front, fully readable; behind it, stacked UPWARD, the
      content goal («هدفي: فيديو كل يوم», 94%) and the habits goal («رياضة 3 مرات بالأسبوع», 88%), each showing only its top
      row (the coloured tile + the goal), the rest tucked behind the card in front. Each card sits --pk lower than the one
      behind it (all top-aligned in one grid cell, scaled from their top centre, so the peeks are exact and nothing collides).
      Tilts ±1° at most, soft shadows, no tape (tape on a stack read as clutter), back cards a whisper of their own colour by
      day and a step darker than the front card at night. The deck floats as ONE piece (cards floating apart changed the
      peeks). Picked over a side-staggered pile (variants-b): its offset cards showed blank tinted edges beside the front one,
      the very thing Mulham disliked in the fanned deck.
   2) LAPTOP (the five-card wall beside the words): ~15% bigger (--k .8 → .92; .72 → .82; .62 → .7), same arrangement.
   3) NIGHT: the hero marker = the plain banana word (#FFD000, no swipe), like every other night .mark on the site (the
      white-on-mauve swipe read odd). The night hero's chips, secondary button and sticker tags follow the warm near-black
      page (#111111) with warm greys instead of the site's neutral #1F1F1F/#262626 (no olive tag washes).
   Checked 360×740, 375×667, 390×844, 412×915, 430×932 (day/night), 1280×800, 1440×900, 1920×1080: no overlap, no sideways
   scroll, the strip at the bottom of the first phone screen with half chips on both edges. Shots: academy/design/round5g/hero-cards/. ───────── */
@media (max-width: 699px) {
  :root[data-screen="hero"] { --pk: 44px; }
  :root[data-screen="hero"] .hm-wall { max-width: 300px; }
  :root[data-screen="hero"] .hm-wall__in { padding-block: 6px 4px; }
  :root[data-screen="hero"] .hm-stk { align-self: start; transform-origin: 50% 0; transform: scale(var(--s, 1)) rotate(var(--r, 0deg)); }
  :root[data-screen="hero"] .hm-stk--4 { z-index: 1; --s: .88; --r: .9deg; --i: 2; margin-top: 0; }
  :root[data-screen="hero"] .hm-stk--1 { z-index: 2; --s: .94; --r: -.8deg; --i: 1; margin-top: var(--pk); }
  :root[data-screen="hero"] .hm-stk--2 { z-index: 3; --s: 1; --r: .4deg; --i: 0; margin-top: calc(2 * var(--pk)); }
  /* the back cards: their top row only (the bar and the foot would peek as a busy stripe under the title) */
  :root[data-screen="hero"] :is(.hm-stk--1, .hm-stk--4) .hm-stk__f > * { visibility: visible; }
  :root[data-screen="hero"] :is(.hm-stk--1, .hm-stk--4) .hm-stk__f > :not(.hm-stk__top) { visibility: hidden; }
  :root[data-screen="hero"] :is(.hm-stk--1, .hm-stk--4) .hm-stk__top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :root[data-screen="hero"] .hm-stk__tape { display: none; }
  :root[data-screen="hero"] .hm-stk__f { padding: 11px 14px 12px; gap: 9px; animation: none; }
  :root[data-screen="hero"] .hm-stk__top { align-items: center; gap: 9px; }
  :root[data-screen="hero"] .hm-stk__top b { font-size: 14.5px; }
  :root[data-screen="hero"] .hm-stk__ic { width: 27px; height: 27px; border-radius: 9px; }
  :root[data-screen="hero"] .hm-stk__ic svg { width: 15px; height: 15px; }
  :root[data-screen="hero"] .hm-stk--1 .hm-stk__f { background: #FFF6F1; }
  :root[data-screen="hero"] .hm-stk--4 .hm-stk__f { background: #FFF3F7; }
  :root[data-screen="hero"] .hm-stk .hm-stk__f { box-shadow: 0 0 0 1px rgba(28, 26, 23, .06), inset 0 1px 0 rgba(255, 255, 255, .8), 0 -8px 18px -14px rgba(28, 26, 23, .35), 0 12px 24px -14px rgba(28, 26, 23, .32); }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk--2 .hm-stk__f { background: #212121; }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk--1 .hm-stk__f { background: #1C1C1C; }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk--4 .hm-stk__f { background: #1A1A1A; }
  :root[data-theme="dark"][data-screen="hero"] .hm-stk .hm-stk__f { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 -8px 18px -12px rgba(0, 0, 0, .9), 0 14px 26px -14px rgba(0, 0, 0, .95); }
}
@media (max-width: 699px) and (prefers-reduced-motion: no-preference) {
  :root[data-screen="hero"] .hm-wall__in { animation: stk-float 8s ease-in-out 1.4s infinite; }
}
@media (max-width: 699px) and (min-height: 800px) { :root[data-screen="hero"] { --pk: 47px; } :root[data-screen="hero"] .hm-wall { max-width: 316px; } }
@media (max-width: 699px) and (min-height: 900px) {
  :root[data-screen="hero"] { --pk: 52px; }
  :root[data-screen="hero"] .hm-wall { max-width: 340px; }
  :root[data-screen="hero"] .hm-stk__f { padding: 13px 16px 14px; }
  :root[data-screen="hero"] .hm-stk__top b { font-size: 15.5px; }
  :root[data-screen="hero"] .hm-stk__ic { width: 29px; height: 29px; }
}
@media (max-width: 699px) and (max-height: 700px) {
  :root[data-screen="hero"] { --pk: 39px; }
  :root[data-screen="hero"] .hm-stk__f { padding: 9px 13px 10px; gap: 7px; }
  :root[data-screen="hero"] .hm-stk__ic { width: 24px; height: 24px; }
  :root[data-screen="hero"] .hm-stk__top b { font-size: 13.5px; }
}
@media (max-width: 359px) {
  :root[data-screen="hero"] { --pk: 36px; }
  :root[data-screen="hero"] .hm-wall { max-width: 270px; }
  :root[data-screen="hero"] .hm-stk__top b { font-size: 13px; }
}
/* 2) the laptop wall, ~15% bigger */
@media (min-width: 1100px), (min-width: 700px) and (orientation: landscape) {
  :root[data-screen="hero"] .hm-wall { --k: .92; }
  @media (max-width: 1199px) { :root[data-screen="hero"] .hm-wall { --k: .82; } }
  @media (max-width: 999px) { :root[data-screen="hero"] .hm-wall { --k: .7; } }
}
/* 3) night: the plain banana word, and the hero's quiet parts in warm greys that belong to the #111111 page */
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark { color: #FFD000 !important; }
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark::after { display: none !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-topic { --tint: #1C1C1C; --rim: #2E2E2E; }
:root[data-theme="dark"][data-screen="hero"] .hm-topic:nth-child(even) { --tint: #202020; }
:root[data-theme="dark"][data-screen="hero"] .hm-hero__cta > .btn:not(.btn--primary) { --btn-bg: #1C1C1C; --btn-ring: #2E2E2E; --btn-edge: #0A0A0A; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tag { background: #2B2B2B; color: color-mix(in srgb, var(--c) 62%, #fff); }

/* (28-11 Mulham: «الصفحة القديمة أحلى») laptop hero back to the calm composition he liked: the text block CENTRED in its
   column (headline, lead, buttons on one axis), the two buttons STACKED full width like before, a slightly smaller title so the
   three lines sit in the column with air around them. The bigger card wall and the 3-line headline stay. */
@media (min-width: 1100px), (min-width: 700px) and (orientation: landscape) {
  :root[data-screen="hero"] .hm-hero__in { grid-template-columns: minmax(0, 560px) auto; }
  :root[data-screen="hero"] .hm-hero__text { max-width: 560px; justify-items: center; text-align: center; }
  :root[data-screen="hero"] .hm-hero__title { margin-inline: auto; font-size: clamp(2.05rem, .35rem + 2.35vw, 2.6rem); }
  :root[data-screen="hero"] .hm-hero__lead { margin: 18px auto 30px; }
  :root[data-screen="hero"] .hm-hero__cta { margin-inline: auto; width: 100%; max-width: 440px; grid-template-columns: 1fr; gap: 14px; }
  :root[data-screen="hero"] .hm-hero__cta > .btn { width: 100%; min-width: 0; padding-inline: 24px; }
}

/* (28-11 Mulham) the home at night is the SAME neutral black as every other page (#111111) and its greys are neutral too:
   the warm near-black read brown/orange next to the rest of the site */

/* (28-11 Mulham: «الأيقونات بالليلي بتضرب عالعصب») the hero at night has ONE loud colour, the yellow headline word.
   Everything around it goes quiet: the goal cards' and the topic chips' icon tiles become dark tiles with the glyph in
   the tone (no bright 3D squares), the progress fills are softer, the tags grey with only their dot in colour, the tapes
   faint. Day stays as it is (the colourful look he likes by day). */
:root[data-theme="dark"][data-screen="hero"] .hm-stk__ic--banana { --g: #FFD000; } :root[data-theme="dark"][data-screen="hero"] .hm-stk__ic--peach { --g: #FF9A6E; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__ic--mauve { --g: #B98AF8; } :root[data-theme="dark"][data-screen="hero"] .hm-stk__ic--pink { --g: #FF95BF; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__ic { background: color-mix(in srgb, var(--g, #FFD000) 14%, #1C1C1C) !important; color: var(--g, #FFD000) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g, #FFD000) 26%, transparent) !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__bar { background: rgba(255, 255, 255, .06) !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__bar i, :root[data-theme="dark"][data-screen="hero"] .hm-stk__dots i.is-on { opacity: .62; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__dots i { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tag { background: #1E1E1E !important; color: #BDBDBD !important; box-shadow: inset 0 0 0 1px #2A2A2A; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tape { opacity: 1; background: #2E2E2E !important; box-shadow: none !important; }   /* a faded colour read olive on black */
:root[data-theme="dark"][data-screen="hero"] .hm-topic__ic { background: color-mix(in srgb, var(--c2) 14%, #1C1C1C) !important; color: var(--c2) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c2) 26%, transparent) !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-topic__ic svg { filter: none; }

/* the link itself, on the checkout and order pages and «تابع طلبك» (p-courses.js / order-status.js draw it; the sheet: support.js + support.css) */
.sp-link { display: flex; justify-content: center; margin: var(--s-2) 0 0; }
.sp-link button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--t-cap); color: var(--muted); }
.sp-link button:hover { color: var(--ink); }
.sp-link button span { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.sp-link .ico { width: 15px; height: 15px; }

/* (28-11 Mulham: a line through «بنتيجة حقيقية» at night, more professional than a coloured word) tried yellow / thin yellow /
   mauve / light mauve side by side (academy/design/logo-v3/mk-board.png): the MAUVE band behind the lower half reads best
   (white letters stay crisp on it; yellow behind white loses the letters). Day keeps its yellow swipe. */
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark { color: #fff !important; animation: none !important;
  background: linear-gradient(180deg, transparent 24%, #A855F7 24%, #A855F7 92%, transparent 92%) !important;   /* (28-11) a real highlighter, inside its own line */
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: .06em; border-radius: 4px; }
html:root[data-theme="dark"][data-screen="hero"] .hm-hero .mark::after { display: none !important; }

/* (28-11 Mulham: «ليش لما بحط الماوس الخط بيقصر؟ ما بحب الخط») text links across the academy: NO underline at all (no drawn
   line that shrinks on hover). A link is bold ink; on hover / focus it gets a soft banana highlight behind it (dark tile at
   night) and its colour deepens. Same for the other underlined links («صار معي مشكلة بالدفع؟», «/app» inline links,
   the order page's «ما عندي صورة»…, «احذف حسابي»). */
.link, a.link, button.link { background: none !important; padding-bottom: 0; text-decoration: none !important; font-weight: 700; color: var(--ink);
  border-radius: 7px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.link { color: var(--ink-2); }
.link:hover, .link:focus-visible { color: var(--ink); }   /* hover = the link darkens (no box, no line) */
:root[data-theme="dark"] .link { color: #BDBDBD; } :root[data-theme="dark"] .link:hover, :root[data-theme="dark"] .link:focus-visible { color: #fff; }
.ap-link, .co__cplink, .co__nosc > summary, .sp-link button span, .acc-del, .acc-del:hover, .co__paycard > .co__help:hover { text-decoration: none !important; }
.ap-link:hover, .co__nosc > summary:hover, .sp-link button:hover span, .co__cplink:hover { color: var(--ink); }
.sp-link button span, .co__nosc > summary { font-weight: 700; }

/* (28-11 Mulham: «بالنهاري شوي تشتيت، بالليلي صار ميت») ONE colour per goal card, and only on the parts that mean something:
   the icon + the progress in the card's colour, the tag and the number plain grey (no coloured pill, no dot). Five cards
   used to carry 15 coloured spots, now 10 calm ones. At night the colour comes BACK (the muted dark tiles read dead) but
   matte: a solid colour tile with no white shine (the shine is what glared on black), the progress at full colour. */
:root[data-screen="hero"] .hm-stk__tag { background: #F3F1EC !important; color: #6E6D68 !important; box-shadow: none !important; }
:root[data-screen="hero"] .hm-stk__tag::before { display: none !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__tag { background: #262626 !important; color: #A8A8A8 !important; box-shadow: none !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__ic { background: var(--g, #FFD000) !important; color: #1C1A17 !important;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2) !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__bar i, :root[data-theme="dark"][data-screen="hero"] .hm-stk__dots i.is-on { opacity: 1; }
:root[data-theme="dark"][data-screen="hero"] .hm-stk__bar, :root[data-theme="dark"][data-screen="hero"] .hm-stk__dots i:not(.is-on) { background: rgba(255, 255, 255, .08) !important; }
:root[data-theme="dark"][data-screen="hero"] .hm-topic__ic { background: var(--c2) !important; color: #1C1A17 !important;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2) !important; }
/* same rule for the topic chips by day: a white chip, the colour only in its icon (the tinted pills doubled the colour) */
:root:not([data-theme="dark"])[data-screen="hero"] .hm-topic { --tint: #fff; --rim: rgba(28, 26, 23, .09); }
