/* The entry pages (2026-10-20): the login (login.html) and the home launcher (index.html with no
   project open). One set of tokens and parts for both, Arabic and English, written with logical
   properties so the same rules mirror themselves. Everything here is prefixed e- (shared),
   lg- (login) or hm- (home) so nothing leaks into the editor's own styles.
   Look: white and light grey, charcoal type, GEC red for the main action and small accents,
   thin borders, 8 px corners, one soft shadow. Pictures: data/art/hero/workshop-*.jpg. */
:root {
  --e-red: #C4161C; --e-red-hi: #D71920; --e-red-lo: #A31217; --e-red-soft: #FCEDEE;
  --e-ink: #17191C; --e-ink-2: #3B4046; --e-muted: #676D74; --e-faint: #8C9198;
  --e-line: #E3E5E8; --e-line-2: #D3D6DA; --e-soft: #F4F5F6; --e-field: #FFFFFF;
  --e-art: #F8F8F6;                                   /* the workshop picture's own background */
  --e-ivory: #F7F6F2;                                 /* the home hero's planning canvas */
  /* <eng-motion-bg> (js/eng-bg.js): colours, timings, parallax depth (1 = 3–8 px) */
  --emb-grid: rgba(23, 25, 28, .07); --emb-edge: rgba(23, 25, 28, .15); --emb-route: rgba(23, 25, 28, .30);
  --emb-red: var(--e-red); --emb-glow: rgba(196, 22, 28, .085); --emb-scan: rgba(196, 22, 28, .20);
  --emb-plane: rgba(255, 255, 255, .72); --emb-plane-edge: rgba(23, 25, 28, .14);
  --emb-cycle: 12s; --emb-pulse: 2.8s; --emb-scan-t: 15s; --emb-drift-t: 20s; --emb-glow-t: 11s; --emb-depth: 1;
  --e-ok: #2F7D4F; --e-ok-soft: #E8F3EC; --e-sel: #2F6FA8; --e-sel-soft: #E9F1F9;
  --e-r: 8px; --e-r-sm: 6px;
  --e-shadow: 0 1px 2px rgba(16, 18, 22, .04), 0 8px 28px rgba(16, 18, 22, .07);
  --e-focus: 0 0 0 3px rgba(196, 22, 28, .18);
  --e-body: 'Readex Pro', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --e-head: 'Alexandria', 'Readex Pro', sans-serif;
}

body.lg, body.lg *, .home, .home *, .hm-nav, .hm-nav * { box-sizing: border-box; }

/* ---------------------------------------------------------------- the logo (js/brand-logo.js) */
gec-logo { display: inline-block; flex: none; height: var(--logo-h, 40px); aspect-ratio: 931 / 274; line-height: 0; }
gec-logo[size="sm"] { --logo-h: 30px; }
gec-logo[size="md"] { --logo-h: 38px; }
gec-logo[size="lg"] { --logo-h: 48px; }
gec-logo img { display: block; width: 100%; height: 100%; }
gec-logo a { display: block; height: 100%; border-radius: 4px; }
gec-logo a:focus-visible { outline: 2px solid var(--e-red); outline-offset: 3px; }

/* ---------------------------------------------------------------- shared parts */
.e-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .e-flip { transform: scaleX(-1); }              /* arrows point the way the reader reads */

.e-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 600 12px/1.4 var(--e-body); letter-spacing: .14em; text-transform: uppercase; color: var(--e-red); direction: ltr; }
.e-eyebrow::after { content: ''; width: 22px; height: 1.5px; background: currentColor; opacity: .6; }

.e-lang { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; font: 500 13px/1 var(--e-body); color: var(--e-ink-2);
  background: #fff; border: 1px solid var(--e-line); border-radius: var(--e-r-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.e-lang:hover { border-color: var(--e-line-2); background: var(--e-soft); }
.e-lang:focus-visible { outline: none; box-shadow: var(--e-focus); border-color: var(--e-red); }
.e-lang .e-ic { width: 16px; height: 16px; color: var(--e-muted); }

.e-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 20px; min-width: 0;
  font: 600 15px/1.2 var(--e-body); color: var(--e-ink); background: #fff; border: 1px solid var(--e-line-2); border-radius: var(--e-r);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, filter .15s; }
.e-btn:hover:not(:disabled) { background: var(--e-soft); border-color: #C2C6CB; }
.e-btn:focus-visible { outline: none; box-shadow: var(--e-focus); border-color: var(--e-red); }
.e-btn:disabled { cursor: progress; opacity: .75; }
.e-btn.primary { color: #fff; background: var(--e-red); border-color: var(--e-red); box-shadow: 0 1px 2px rgba(163, 18, 23, .25); }
.e-btn.primary:hover:not(:disabled) { background: var(--e-red-lo); border-color: var(--e-red-lo); }
.e-btn.primary:focus-visible { box-shadow: 0 0 0 3px rgba(196, 22, 28, .3); }
.e-btn.block { width: 100%; }
.e-btn .e-ic { width: 19px; height: 19px; }

.e-link { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; font: 500 14px/1.5 var(--e-body); color: var(--e-red); background: none; border: 0; border-radius: 3px; cursor: pointer; text-decoration: none; }
.e-link:hover { color: var(--e-red-lo); text-decoration: underline; text-underline-offset: 3px; }
.e-link:focus-visible { outline: 2px solid var(--e-red); outline-offset: 2px; }
.e-link .e-ic { width: 16px; height: 16px; }

.e-field { display: block; margin: 0 0 16px; }
.e-field > label, .e-label { display: block; margin: 0 0 7px; font: 500 14px/1.4 var(--e-body); color: var(--e-ink-2); }
.e-control { position: relative; }
.e-control > .e-ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--e-faint); pointer-events: none; }
.e-input { display: block; width: 100%; height: 50px; margin: 0; padding: 0 14px; font: 400 16px/1.2 var(--e-body); color: var(--e-ink);
  background: var(--e-field); border: 1px solid var(--e-line-2); border-radius: var(--e-r); transition: border-color .15s, box-shadow .15s; }
[dir="rtl"] .e-control > .e-ic ~ .e-input { padding-right: 44px; }      /* physical: a left-to-right input (codes, usernames) */
[dir="ltr"] .e-control > .e-ic ~ .e-input { padding-left: 44px; }       /* still keeps its icon on the page's start side */
.e-input::placeholder { color: #A3A8AE; }
.e-input:hover { border-color: #C2C6CB; }
.e-input:focus { outline: none; border-color: var(--e-red); box-shadow: var(--e-focus); }
.e-input[aria-invalid="true"] { border-color: var(--e-red); }
.e-input.ltr { direction: ltr; text-align: start; }
[dir="rtl"] .e-input.ltr { text-align: right; }
.e-input.ltr::placeholder { direction: inherit; }

.e-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px 15px; border-radius: var(--e-r); background: var(--e-soft); color: var(--e-muted); font: 400 13.5px/1.7 var(--e-body); }
.e-note .e-ic { margin-top: 2px; color: var(--e-red); }

.e-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 11px 14px; border-radius: var(--e-r); background: var(--e-red-soft); border: 1px solid #F3C4C6; color: #8E1015; font: 500 13.5px/1.6 var(--e-body); }
.e-alert .e-ic { margin-top: 1px; }
.e-alert[hidden] { display: none; }

.e-spin { width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: e-spin .8s linear infinite; }
.e-spin[hidden] { display: none; }
@keyframes e-spin { to { transform: rotate(360deg); } }
@keyframes e-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the workshop picture: sits on its own light ground, edges melt into the page */
.e-art { display: block; margin: 0; }
.e-art img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ================================================================ LOGIN (login.html) */
body.lg { margin: 0; min-height: 100vh; min-height: 100dvh; font: 400 16px/1.6 var(--e-body); color: var(--e-ink); background: #fff; -webkit-font-smoothing: antialiased; }
.lg-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: clamp(420px, 36vw, 540px) minmax(0, 1fr); }

.lg-panel { position: relative; z-index: 1; display: flex; background: #fff; padding: clamp(24px, 4.5vh, 48px) clamp(28px, 3.6vw, 56px); border-inline-end: 1px solid var(--e-line); }
.lg-in { width: 100%; max-width: 420px; margin-inline: auto; display: flex; flex-direction: column; animation: e-rise .5s ease both; }
.lg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-main { margin-block: auto; padding-block: 48px 32px; }
.lg-main h1 { margin: 0; font: 700 clamp(30px, 2.6vw, 38px)/1.2 var(--e-head); letter-spacing: -.01em; color: var(--e-ink); }
.lg-lead { margin: 10px 0 32px; font-size: 17px; line-height: 1.6; color: var(--e-muted); }
.lg-eye { position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: var(--e-r-sm); background: transparent; color: var(--e-faint); cursor: pointer; }
.lg-eye:hover { background: var(--e-soft); color: var(--e-ink); }
.lg-eye:focus-visible { outline: 2px solid var(--e-red); outline-offset: -2px; }
.lg-eye .off, .lg-eye[aria-pressed="true"] .on { display: none; }
.lg-eye[aria-pressed="true"] .off { display: block; }
[dir="rtl"] #pw { padding-left: 50px; }
[dir="ltr"] #pw { padding-right: 50px; }
.lg-caps { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 13px; color: #8A5300; }
.lg-caps .e-ic { width: 15px; height: 15px; }
.lg-caps[hidden] { display: none; }
.lg-go { margin-top: 8px; height: 52px; font-size: 16px; }
.lg-main .e-note { margin-top: 24px; }
.lg-foot { display: grid; gap: 2px; padding-top: 18px; border-top: 1px solid var(--e-line); text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--e-faint); }

.lg-art { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--e-art); }
.lg-art .e-eyebrow { padding: clamp(24px, 4.5vh, 44px) clamp(28px, 4vw, 64px) 0; }
.lg-art .e-art { min-height: 0; padding: 8px clamp(16px, 3vw, 48px) 0; animation: e-rise .7s ease .05s both;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); }
.lg-copy { padding: 0 clamp(28px, 4vw, 64px) clamp(28px, 5.5vh, 56px); text-align: center; animation: e-rise .7s ease .15s both; }
.lg-copy h2 { margin: 0 auto; max-width: 18em; font: 700 clamp(26px, 2.5vw, 38px)/1.25 var(--e-head); letter-spacing: -.01em; color: var(--e-ink); text-wrap: balance; }
.lg-copy h2::after { content: ''; display: block; width: 56px; height: 3px; margin: 16px auto 0; background: var(--e-red); border-radius: 2px; }
.lg-copy p { margin: 16px auto 0; max-width: 40em; font-size: 16.5px; line-height: 1.7; color: var(--e-muted); text-wrap: balance; }
.lg-feats { list-style: none; margin: clamp(20px, 3.5vh, 34px) auto 0; padding: 0; max-width: 720px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg-feats li { display: grid; justify-items: center; gap: 10px; padding: 4px 12px; font: 500 15px/1.4 var(--e-body); color: var(--e-ink); }
.lg-feats li + li { border-inline-start: 1px solid var(--e-line-2); }
.lg-feats .e-ic { width: 34px; height: 34px; stroke-width: 1.4; color: var(--e-ink); }
.lg-feats .e-ic .r { stroke: var(--e-red); }

/* tablet: the picture as a band on top, the form under it */
@media (max-width: 1023px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lg-art { order: -1; position: relative; height: auto; grid-template-rows: auto auto; }
  .lg-art .e-art { height: clamp(220px, 34vh, 340px); }
  .lg-copy { display: none; }
  .lg-panel { border: 0; padding-top: 8px; }
  .lg-main { padding-block: 28px 28px; }
}
/* phones: the sign-in first; the picture only as a slim strip */
@media (max-width: 599px) {
  .lg-art .e-eyebrow { display: none; }
  .lg-art .e-art { height: 150px; padding: 8px 8px 0; }
  .lg-panel { padding: 4px 16px 20px; }
  .lg-main { padding-block: 22px 22px; }
  .lg-main h1 { font-size: 28px; }
  .lg-lead { font-size: 16px; margin-bottom: 24px; }
}
@media (max-height: 760px) and (min-width: 1024px) {
  .lg-main { padding-block: 28px 20px; }
  .lg-feats { display: none; }
}

/* ================================================================ HOME (index.html, no project open) */
/* the header: white on the home page (the editor keeps its dark bar once a project is open) */
body.is-home > .bar { background: #fff !important; color: var(--e-ink); border-bottom: 1px solid var(--e-line) !important; box-shadow: none; }
body.is-home > .bar::before { display: none; }
body.is-home > .bar .proj, body.is-home > .bar .menu-wrap, body.is-home > .bar #btn-share { display: none; }
body.is-home > .bar .brand { display: none; }
body.is-home > .bar gec-logo { display: inline-block; }
body:not(.is-home) > .bar gec-logo, body:not(.is-home) > .bar .hm-nav { display: none; }
body.is-home > .bar button, body.is-home > .bar .odoo { color: var(--e-ink-2); background: #fff; border-color: var(--e-line); }
body.is-home > .bar button:hover:not(:disabled) { color: var(--e-ink); background: var(--e-soft); border-color: var(--e-line-2); }
body.is-home > .bar .odoo.ok { color: var(--e-ok); border-color: #CFE5D7; background: #fff; }
body.is-home > .bar .odoo.off { color: #A3141A; border-color: #F0C9CB; background: #fff; }
body.is-home > .bar .me, body.is-home #me-name { color: var(--e-ink-2); }
body.is-home > .bar .acct { border-inline-start-color: var(--e-line); }
.hm-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; margin-inline-start: 18px; padding-inline-start: 18px; border-inline-start: 1px solid var(--e-line); }
.hm-nav a, .hm-nav button { display: inline-flex; align-items: center; gap: 8px; height: auto !important; padding: 0 12px !important; font: 500 14.5px/1 var(--e-body);
  color: var(--e-ink-2) !important; background: none !important; border: 0 !important; border-radius: 0 !important; border-bottom: 2px solid transparent !important; text-decoration: none; cursor: pointer; }
.hm-nav a:hover, .hm-nav button:hover { color: var(--e-ink) !important; }
.hm-nav [aria-current="page"] { color: var(--e-red) !important; border-bottom-color: var(--e-red) !important; }
.hm-nav .e-ic { width: 17px; height: 17px; }
.hm-nav a:focus-visible, .hm-nav button:focus-visible { outline: 2px solid var(--e-red); outline-offset: -4px; }

/* the page */
.stage > .home { position: absolute; inset: 0; z-index: 2; overflow: auto; background: #fff; font: 400 15px/1.6 var(--e-body); color: var(--e-ink); }
.stage > .home[hidden] { display: none; }
.home:not([hidden]) ~ .cui, .home:not([hidden]) ~ .statusbar, .home:not([hidden]) ~ .hint { display: none; }
.layout:has(#empty:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.layout:has(#empty:not([hidden])) .sections { display: none; }
.hm-wrap { max-width: 1440px; margin: 0 auto; }

.hm-hero { position: relative; display: grid; grid-template-columns: minmax(460px, 1fr) minmax(0, 1.3fr); min-height: clamp(540px, calc(100vh - 66px - 150px), 660px);
  background: var(--e-ivory); border-bottom: 1px solid var(--e-line); }
.hm-start { position: relative; z-index: 1; align-self: center; padding: 40px clamp(24px, 3.4vw, 56px); animation: e-rise .5s ease both; }
.hm-start h1 { margin: 14px 0 0; font: 700 clamp(32px, 3vw, 46px)/1.18 var(--e-head); letter-spacing: -.015em; color: var(--e-ink); text-wrap: balance; }
.hm-start h1 .dot { color: var(--e-red); }
[lang="ar"] .hm-start h1 .dot { display: none; }
[lang="ar"] .hm-start h1::after { content: ''; display: block; width: 64px; height: 4px; margin-top: 16px; background: var(--e-red); border-radius: 2px; }
.hm-lead { margin: 14px 0 0; max-width: 34em; font-size: 17px; line-height: 1.65; color: var(--e-muted); }

.hm-card { margin-top: 26px; max-width: 520px; padding: 18px; background: #fff; border: 1px solid var(--e-line); border-radius: 12px; box-shadow: var(--e-shadow); }
.hm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--e-soft); border-radius: var(--e-r); }
.hm-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 10px; font: 500 14.5px/1 var(--e-body);
  color: var(--e-muted); background: transparent; border: 0; border-radius: var(--e-r-sm); cursor: pointer; }
.hm-seg button:hover { color: var(--e-ink); }
.hm-seg button[aria-selected="true"] { color: #fff; background: var(--e-red); box-shadow: 0 1px 2px rgba(163, 18, 23, .3); }
.hm-seg button:focus-visible { outline: 2px solid var(--e-red); outline-offset: 2px; }
.hm-seg .e-ic { width: 17px; height: 17px; }
.hm-panel[hidden] { display: none; }
.hm-panel .e-field { margin-bottom: 14px; }
.hm-dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hm-dims .e-field { margin: 0 0 14px; }
[dir="rtl"] .hm-dims .e-input { padding-left: 34px; }
[dir="ltr"] .hm-dims .e-input { padding-right: 34px; }
.hm-unit { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--e-faint); pointer-events: none; }
.hm-help { margin: -4px 0 14px; font-size: 13px; line-height: 1.6; color: var(--e-faint); }
.hm-acts { display: grid; gap: 10px; }
.hm-acts .e-btn { justify-content: space-between; }
.hm-acts .e-btn > span { margin-inline-end: auto; }
.hm-acts .e-btn .go { opacity: .9; }
.hm-err { margin: 10px 0 0; font-size: 13.5px; color: #A3141A; }
.hm-err:empty { display: none; }
.hm-more { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }

.hm-art { position: relative; min-height: 0; overflow: hidden; isolation: isolate; }
.hm-art .e-art { position: absolute; inset: 0; z-index: 1; animation: e-rise .7s ease .05s both; }
[dir="ltr"] .hm-art .e-art { -webkit-mask-image: linear-gradient(to left, #000 86%, transparent 100%); mask-image: linear-gradient(to left, #000 86%, transparent 100%); }
[dir="rtl"] .hm-art .e-art { -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%); mask-image: linear-gradient(to right, #000 86%, transparent 100%); }
.hm-art .e-art img { object-fit: contain; object-position: 50% 50%; padding: 24px 12px 64px; }
.hm-tags { position: absolute; inset-inline-start: 24px; bottom: 22px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-tags li { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; font: 500 13.5px/1 var(--e-body); color: var(--e-ink);
  background: rgba(255, 255, 255, .94); border: 1px solid var(--e-line); border-radius: 999px; box-shadow: 0 2px 10px rgba(16, 18, 22, .08); }
.hm-tags .e-ic { width: 17px; height: 17px; color: var(--e-red); }

.hm-steps { list-style: none; margin: 0; padding: 22px clamp(24px, 3.4vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; background: #fff; }
.hm-steps li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--e-line); border-radius: 10px; background: #fff; }
.hm-steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--e-red-soft); color: var(--e-red); font: 600 15px/1 var(--e-body); direction: ltr; }
.hm-steps .e-ic { width: 34px; height: 34px; stroke-width: 1.4; color: var(--e-ink); }
.hm-steps b { display: block; font: 600 16px/1.35 var(--e-head); color: var(--e-ink); }
.hm-steps small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.55; color: var(--e-muted); }

.hm-recent { padding: 8px clamp(24px, 3.4vw, 56px) 40px; }
.hm-recent > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 14px; }
.hm-recent h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 22px/1.3 var(--e-head); color: var(--e-ink); }
.hm-recent h2 .e-ic { width: 22px; height: 22px; color: var(--e-ink-2); }
.hm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hm-proj { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; height: auto; padding: 10px; text-align: start;
  font: inherit; color: inherit; background: #fff; border: 1px solid var(--e-line); border-radius: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.hm-proj:hover { border-color: var(--e-line-2); box-shadow: var(--e-shadow); background: #fff; }
.hm-proj:focus-visible { outline: none; border-color: var(--e-red); box-shadow: var(--e-focus); }
.hm-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--e-soft); }
.hm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-thumb .e-ic { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; stroke-width: 1.3; color: #B5BAC0; }
.hm-proj b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/1.4 var(--e-head); color: var(--e-ink); }
.hm-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13.5px; color: var(--e-muted); }
.hm-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hm-meta .e-ic { width: 15px; height: 15px; color: var(--e-faint); }
.hm-meta .mono { direction: ltr; unicode-bidi: isolate; font-family: var(--e-body); }
.hm-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.hm-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hm-chip.shared { color: var(--e-ok); background: var(--e-ok-soft); }
.hm-chip.draft { color: var(--e-sel); background: var(--e-sel-soft); }
.hm-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; border: 1px dashed var(--e-line-2); border-radius: 10px; color: var(--e-muted); }
.hm-empty b { font: 600 16px/1.4 var(--e-head); color: var(--e-ink); }
.hm-skel { height: 132px; border-radius: 10px; background: linear-gradient(90deg, var(--e-soft), #FAFAFB, var(--e-soft)); background-size: 200% 100%; animation: hm-sh 1.4s linear infinite; }
@keyframes hm-sh { to { background-position: -200% 0; } }

/* ---- <eng-motion-bg>: the moving planning canvas behind the workshop (js/eng-bg.js) -------------- */
eng-motion-bg { position: absolute; inset: 0; z-index: 0; display: block; overflow: hidden; pointer-events: none; contain: strict;
  --emb-fade: linear-gradient(to right, transparent 0, #000 24%);
  -webkit-mask-image: radial-gradient(ellipse 64% 70% at var(--emb-cx, 55%) var(--emb-cy, 50%), #000 40%, transparent 100%), var(--emb-fade);
  mask-image: radial-gradient(ellipse 64% 70% at var(--emb-cx, 55%) var(--emb-cy, 50%), #000 40%, transparent 100%), var(--emb-fade);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
[dir="rtl"] eng-motion-bg { --emb-fade: linear-gradient(to left, transparent 0, #000 24%); }
.emb-l { position: absolute; inset: 0; }
.emb-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.emb-minor { fill: none; stroke: var(--emb-grid); stroke-width: 1; }
.emb-edge, .emb-foot { fill: none; stroke: var(--emb-edge); stroke-width: 1; stroke-dasharray: 2 5; }
.emb-route .emb-base { fill: none; stroke: var(--emb-route); stroke-width: 1.1; stroke-linejoin: round; }
.emb-route.red .emb-base { stroke: var(--emb-red); stroke-opacity: .5; }
.emb-node { fill: var(--e-ivory); stroke: var(--emb-route); stroke-width: 1.1; }
.emb-route.red .emb-node { stroke: var(--emb-red); stroke-opacity: .7; }
/* pulses: each route segment is a clipped strip; a short spark crosses it (translate), node lights fade (opacity) */
.emb-sparks { position: absolute; inset: 0; }
.emb-strip { position: absolute; display: block; height: 8px; margin-top: -4px; transform-origin: 0 50%; overflow: hidden; }
.emb-spark { position: absolute; left: 0; top: 0; height: 100%; translate: -100% 0;
  background: linear-gradient(to right, transparent, var(--emb-red) 78%, rgba(196, 22, 28, .4) 100%) center / 100% 1.8px no-repeat,
              linear-gradient(to right, transparent, rgba(196, 22, 28, .13) 80%, transparent) center / 100% 7px no-repeat; }
.emb-hot { position: absolute; display: block; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, var(--emb-red) 0 2.7px, rgba(196, 22, 28, .17) 3.3px, transparent 10px); }
.emb-space { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; transform: var(--emb-m, none); }
.emb-space > i { position: absolute; display: block; }
.emb-glow { background: radial-gradient(closest-side, var(--emb-glow), transparent); animation: emb-breathe var(--emb-glow-t) ease-in-out infinite alternate; }
/* the scan: a box as tall as the swept range with its light at the bottom edge, moved by its own height */
.emb-scan { background: linear-gradient(to bottom, transparent 0, transparent 95.5%, rgba(196, 22, 28, .04) 98.6%, var(--emb-scan) 99.7%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(to right, transparent, #000 28%, #000 72%, transparent);
  opacity: 0; animation: emb-scan var(--emb-scan-t) linear 1.5s infinite; }
.emb-planes { translate: 0 -10px; }                       /* the planes float a little above their dashed footprints */
.emb-plane { background: var(--emb-plane); border: 1px solid var(--emb-plane-edge); animation: emb-drift-a var(--emb-drift-t) ease-in-out infinite; }
.emb-plane.red { border-bottom-color: rgba(196, 22, 28, .45); }
.emb-plane:nth-child(2) { animation-name: emb-drift-b; animation-duration: calc(var(--emb-drift-t) * 1.15); animation-delay: -6s; }
.emb-plane:nth-child(3) { animation-name: emb-drift-c; animation-duration: calc(var(--emb-drift-t) * .85); animation-delay: -11s; }
@keyframes emb-breathe { from { opacity: .6; } to { opacity: 1; } }
@keyframes emb-scan { 0% { translate: 0 -100%; opacity: 0; } 7% { opacity: 1; } 54% { opacity: 1; } 62% { translate: 0 0; opacity: 0; } 100% { translate: 0 0; opacity: 0; } }
@keyframes emb-drift-a { 0%, 100% { translate: 0 0; } 50% { translate: -4px -3px; } }
@keyframes emb-drift-b { 0%, 100% { translate: 0 0; } 50% { translate: 3px -4px; } }
@keyframes emb-drift-c { 0%, 100% { translate: 0 0; } 50% { translate: -3px 3px; } }
eng-motion-bg[data-tier="1"] [data-tier="2"], eng-motion-bg[data-tier="1"] [data-tier="3"], eng-motion-bg[data-tier="2"] [data-tier="3"] { display: none; }
eng-motion-bg.emb-paused *, eng-motion-bg.emb-still * { animation-play-state: paused; }
eng-motion-bg.emb-still .emb-scan { animation: none; opacity: 0; }
eng-motion-bg.emb-still .emb-glow, eng-motion-bg.emb-still .emb-plane { animation: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { eng-motion-bg:not(.emb-still) .emb-l { will-change: transform; } }

@media (max-width: 1199px) {
  .hm-hero { grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr); }
  .hm-steps li { grid-template-columns: auto minmax(0, 1fr); }
  .hm-steps li > .e-ic { display: none; }
}
/* tablet: the start card first, the picture under it, steps stacked */
@media (max-width: 899px) {
  .hm-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hm-start { padding: 28px 20px 8px; }
  .hm-card { max-width: none; }
  .hm-art { height: clamp(300px, 60vw, 500px); }
  .hm-art .e-art img { padding: 4px 8px 52px; }
  [dir] .hm-art .e-art { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%); mask-image: linear-gradient(to bottom, transparent 0, #000 12%); }
  [dir] eng-motion-bg { --emb-fade: linear-gradient(to bottom, transparent 0, #000 22%); }
  .hm-steps { grid-template-columns: minmax(0, 1fr); padding: 18px 20px; gap: 10px; }
  .hm-steps li > .e-ic { display: block; }
  .hm-steps li { grid-template-columns: auto auto minmax(0, 1fr); }
  .hm-recent { padding: 4px 20px 32px; }
  .hm-list { grid-template-columns: minmax(0, 1fr); }
  .hm-nav { margin-inline-start: 10px; padding-inline-start: 10px; }
  .hm-nav .t { display: none; }
  .hm-nav [aria-current="page"] .t { display: inline; }
}
@media (max-width: 599px) {
  .hm-start h1 { font-size: 32px; }
  .hm-lead { font-size: 16px; }
  .hm-card { padding: 14px; }
  .hm-dims { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hm-art { height: 250px; }
  .hm-art .e-art img { padding: 0 4px 46px; }
  .hm-tags { inset-inline-start: 12px; bottom: 12px; }
  .hm-tags li { height: 32px; font-size: 12.5px; padding: 0 11px; }
  .hm-steps li > .e-ic { display: none; }
  .hm-steps li { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; }
  .hm-proj { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .hm-nav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-in, .lg-art .e-art, .lg-copy, .hm-start, .hm-art .e-art { animation: none; }
  .hm-skel { animation: none; }
  .e-spin { animation-duration: 2.4s; }
}

/* «مهامي» on the home page (js/home.js tasks()): the same cards as the recent projects, with the date and the admin's note */
.hm-task { text-decoration: none; color: inherit; grid-template-columns: 56px minmax(0, 1fr); }
.hm-task .hm-thumb { aspect-ratio: 1; display: grid; place-items: center; color: var(--e-ink-2); }
.hm-task .late { color: #A3141A; font-weight: 600; }
.hm-note { display: block; margin-top: 6px; font-size: 13px; color: var(--e-ink-2); white-space: pre-line; }

.hm-nav [hidden] { display: none !important; }   /* «المستخدمين»: only an admin sees it (main.js applyPerms) */

/* the hero film (index.html .hm-video): over the picture and the moving canvas, its light edges faded into the hero's own
   ivory on every side; the picture underneath stays only for a browser that cannot show the film or its poster */
.hm-art .hm-video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: contain; object-position: 50% 45%;
  background: transparent; pointer-events: none; animation: e-rise .7s ease .05s both;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%); mask-composite: intersect; }
.hm-art:has(> .hm-video) > .e-art, .hm-art:has(> .hm-video) > eng-motion-bg { visibility: hidden; }
.hm-art:has(> .hm-video) > .hm-tags { z-index: 3; }
.e-btn[hidden] { display: none; }
a.e-btn { text-decoration: none; color: var(--e-ink); }   /* «ابدأ معاينة جديدة» is a link to the survey app */
