/* Maher | ماهر — arrival guide styles
   Palette and type taken from the ALJUF Company Profile and 2026 New Joiner Orientation decks. */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: local("Poppins"), local("Poppins-Regular"), url("../assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: local("Poppins Medium"), local("Poppins-Medium"), url("../assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: local("Poppins SemiBold"), local("Poppins-SemiBold"), url("../assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: local("Poppins Bold"), local("Poppins-Bold"), url("../assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); }
/* Brand system (owner, 5 Nov 2026): Poppins for English, IBM Plex Sans Arabic for Arabic, on every device. No device-installed faces. */
/* IBM Plex Sans Arabic (SIL OFL), bundled so Arabic looks the same on every phone and matches the onboarding */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../assets/fonts/plex-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("../assets/fonts/plex-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../assets/fonts/plex-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../assets/fonts/plex-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }

:root {
  /* ALJUF brand colours */
  --purple: #3C1053;        /* primary: ALJUF deep purple */
  --purple-2: #4D2A75;      /* gradient light end */
  --purple-deep: #250A33;   /* gradient dark end, page frame */
  --violet: #8C5BA6;        /* pentagon motif, secondary */
  --lavender: #B5ABBD;      /* quiet text on purple */
  --lilac: #E5DAEA;         /* tints and rules */
  --yellow: #FFCB28;        /* single accent */
  --cream: #FFF1C9;         /* accent tint */
  --grey: #586570;          /* secondary text (Company Profile deck grey) */
  --page: #F7F5F9;          /* light background */
  --white: #FFFFFF;

  --ink: var(--purple);
  --on-dark: #FFFFFF;
  --on-dark-quiet: var(--lavender);

  --display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Plex Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;

  --pad: 24px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hero: linear-gradient(150deg, var(--purple-2) 0%, var(--purple) 48%, var(--purple-deep) 100%);
}
:root[lang="ar"] { --display: var(--arabic); --sans: var(--arabic); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--purple-deep);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[lang="ar"] body { font-size: 17px; line-height: 1.85; }
img { max-width: 100%; display: block; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--page);
  display: flex;
  flex-direction: column;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 16px) var(--pad) calc(env(safe-area-inset-bottom) + 24px);
  animation: screen-in .28s var(--ease);
}
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 20px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.brand-name { font: 700 19px/1 var(--sans); font-family: "Poppins", var(--sans); letter-spacing: .01em; }
/* The Meem Key (owner, 11 Nov 2026): the mark, then "Maher". Strokes follow the text colour; the centre stays yellow. */
.brand-key { flex: none; width: 28px; height: 28px; display: block; }
.icon-btn {
  width: 44px; height: 44px; margin-inline-start: -10px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%;
}
.icon-btn svg { width: 22px; height: 22px; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.lang {
  background: none; border: 1px solid currentColor; border-radius: 999px;
  padding: 5px 14px; font-size: 14px; line-height: 1.4;
}
.lang[lang="ar"] { font-family: var(--arabic); }
.lang[lang="en"] { font-family: "Poppins", sans-serif; }

/* ---------- Dark (brand purple) surfaces ---------- */
.screen--welcome, .screen--day1 .hero { background: var(--hero); color: var(--on-dark); }
.screen--welcome .lang, .screen--day1 .hero .lang { color: var(--on-dark); border-color: rgba(255,255,255,.5); }

/* ---------- Photo hero (welcome) ---------- */
.screen--welcome { padding-top: 0; padding-bottom: 0; position: relative; }
.screen--welcome > .topbar { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 14px); inset-inline: var(--pad); margin: 0; }
.screen--welcome > .topbar .lang { background: rgba(37,10,51,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.people-hero { position: relative; display: flex; justify-content: flex-end; margin: 0 calc(-1 * var(--pad)) 14px; direction: ltr; }
.people-hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 96px; pointer-events: none; background: linear-gradient(180deg, rgba(37,10,51,.6), rgba(37,10,51,0)); }
.people-hero::before {
  content: ""; position: absolute; inset: 8% 6% 4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(140, 91, 166, .55), rgba(140, 91, 166, 0));
}
.people-art { position: relative; width: 100%; max-width: 480px; height: auto; filter: drop-shadow(0 28px 36px rgba(20, 4, 30, .5)); animation: hero-in 1.4s var(--ease) both; }
@keyframes hero-in { from { opacity: 0; scale: 1.06; } to { opacity: 1; scale: 1; } }
.topbar--on-photo { position: absolute; z-index: 2; inset-inline: var(--pad); top: calc(env(safe-area-inset-top) + 14px); margin: 0; color: var(--white); }
.topbar--on-photo .lang { color: var(--white); border-color: rgba(255,255,255,.6); background: rgba(37,10,51,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.topbar--on-photo .icon-btn { background: rgba(37,10,51,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); margin-inline-start: 0; }

.welcome-body { flex: 1; display: flex; flex-direction: column; padding: 0 0 calc(env(safe-area-inset-bottom) + 22px); }
.welcome-tagline { margin: 0 0 6px; color: var(--yellow); font-size: 14px; font-weight: 500; }
.welcome-title { margin: 0; font: 600 31px/1.2 var(--display); letter-spacing: -.01em; }
[lang="ar"] .welcome-title { font-size: 29px; line-height: 1.5; letter-spacing: 0; }
.welcome-lede { margin: 12px 0 18px; color: var(--on-dark-quiet); max-width: 36ch; }
.note { display: flex; gap: 12px; align-items: flex-start; margin: auto 0 18px; font-size: 14px; color: var(--on-dark-quiet); }
.note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 20px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; text-align: center;
  transition: background-color .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--yellow); color: var(--purple); box-shadow: inset 0 -2px 0 rgba(60,16,83,.14); }   /* brand: yellow marks the next action */
@media (hover: hover) { .btn--primary:hover { background: #FFD653; } }
.screen--welcome .btn--primary { background: var(--yellow); color: var(--purple); }
@media (hover: hover) { .screen--welcome .btn--primary:hover { background: #FFD653; } }
.btn--outline { background: var(--white); border-color: var(--purple); color: var(--purple); }
@media (hover: hover) { .btn--outline:hover { background: var(--lilac); } }
.btn--quiet { background: none; min-height: 48px; font-weight: 500; color: var(--grey); }
.btn-next-label { font-weight: 400; opacity: .7; }

/* ---------- Mode choice ---------- */
.h2 { margin: 8px 0 8px; font: 600 28px/1.25 var(--display); }
[lang="ar"] .h2 { line-height: 1.5; }
.lede { margin: 0 0 28px; color: var(--grey); }
.choices { display: grid; gap: 14px; }
.choice {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center;
  padding: 20px; text-align: start;
  background: var(--white); border: 1px solid var(--lilac); border-radius: 18px;
  transition: border-color .15s;
}
@media (hover: hover) { .choice:hover { border-color: var(--purple); } }
.choice-icon { position: relative; width: 56px; height: 56px; display: grid; place-items: center; color: var(--purple); }
.choice-icon .penta { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--lilac); }
.choice-icon svg:not(.penta) { position: relative; width: 26px; height: 26px; }
.choice-title { display: block; font: 600 19px/1.35 var(--display); }
.choice-body { display: block; margin-top: 4px; font-size: 14px; color: var(--grey); }

/* ---------- Step ---------- */
.progress { margin-bottom: 20px; }
.progress-track { display: flex; gap: 6px; }
.progress-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--lilac); }
.progress-seg.is-done { background: var(--violet); }
.progress-seg.is-current { background: var(--yellow); }
.progress-label { margin: 10px 0 0; font-size: 13px; color: var(--grey); }

/* ---------- Step: full-bleed media + panel ---------- */
.screen--step { padding: 0; }
.media-wrap { position: relative; }
.media { position: relative; margin: 0; height: clamp(330px, 54vh, 500px); overflow: hidden; background: var(--purple); }
.media::before {
  content: ""; position: absolute; inset: 0 0 auto; z-index: 1; pointer-events: none;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-cap {
  position: absolute; z-index: 2; inset-inline-start: 16px; bottom: 40px;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--white); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.media-toggle {
  position: absolute; z-index: 2; inset-inline-end: 16px; bottom: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 0; color: var(--white);
  background: rgba(37,10,51,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.media-toggle svg { width: 18px; height: 18px; }
.media-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.media-track::-webkit-scrollbar { display: none; }
.media-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.media-dots { position: absolute; z-index: 2; inset-inline-end: 18px; bottom: 50px; display: flex; gap: 6px; }
.media-dot { padding: 0; border: 0; cursor: pointer; transition: width .2s var(--ease), background-color .2s; }
.media-dot::after { position: absolute; inset: -10px -4px; }
.media-dot { position: relative; }
.media-dot.is-on { border-radius: 4px; }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px 18px 44px;
  background: var(--hero); color: var(--on-dark-quiet); font-size: 13px;
}
.photo-placeholder svg { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; color: var(--violet); }
.panel {
  position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column;
  margin-top: -24px; padding: 22px var(--pad) calc(env(safe-area-inset-bottom) + 20px);
  background: var(--page); border-radius: 24px 24px 0 0;
}
.panel .progress { margin-bottom: 16px; }

.step-title { margin: 0 0 10px; font: 600 26px/1.3 var(--display); }
[lang="ar"] .step-title { line-height: 1.55; }
.step-body { margin: 0 0 24px; max-width: 40ch; color: #2B2730; }
.step-action { margin-bottom: 12px; }
.spacer { flex: 1; min-height: 16px; }
.nav { display: grid; gap: 8px; }

/* ---------- Day 1 ---------- */
.screen--day1 { padding: 0; }
.screen--day1 .hero {
  position: relative; overflow: hidden;
  padding: calc(env(safe-area-inset-top) + 16px) var(--pad) 36px;
}
.screen--day1 .hero { min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
.screen--day1 .hero .topbar { position: absolute; top: calc(env(safe-area-inset-top) + 14px); inset-inline: var(--pad); margin: 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.screen--day1 .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, var(--purple) 0%, rgba(60,16,83,.85) 30%, rgba(60,16,83,.15) 70%, rgba(37,10,51,.5) 100%);
}
.screen--day1 .hero > :not(.hero-bg) { position: relative; z-index: 1; }
.screen--day1 .hero > .topbar { position: absolute; z-index: 2; }
.seal { position: relative; width: 60px; height: 60px; margin: 18px 0 16px; display: grid; place-items: center; color: var(--purple); }
.seal .penta { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--yellow); }
.seal svg:not(.penta) { position: relative; width: 26px; height: 26px; }
.day1-title { margin: 0; font: 600 36px/1.2 var(--display); }
[lang="ar"] .day1-title { line-height: 1.45; }
.day1-lede { margin: 12px 0 0; color: var(--on-dark-quiet); max-width: 36ch; }
.day1-body { padding: 30px var(--pad) calc(env(safe-area-inset-bottom) + 24px); flex: 1; display: flex; flex-direction: column; }
.closing { margin: 0 0 20px; font: 600 20px/1.4 var(--display); text-align: center; color: var(--purple); }


/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(37, 10, 51, .6);
  animation: screen-in .2s var(--ease);
}
.sheet {
  width: 100%; max-width: 480px; background: var(--page);
  border-radius: 24px 24px 0 0;
  padding: 12px var(--pad) calc(env(safe-area-inset-bottom) + 20px);
  animation: sheet-up .3s var(--ease);
}
@keyframes sheet-up { from { translate: 0 40px; } to { translate: 0 0; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--lavender); margin: 0 auto 18px; }
.sheet h2 { margin: 0 0 6px; font: 600 22px/1.35 var(--display); }
.sheet p { margin: 0 0 20px; color: var(--grey); }
.sheet .stack { display: grid; gap: 10px; }
.sheet .help-note { margin: 0 0 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--cream); font-size: 14px; }

/* ---------- Offline ---------- */
.offline {
  position: relative; z-index: 30;
  max-width: 480px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  background: var(--yellow); color: var(--purple); font-weight: 500;
}

@media (min-width: 560px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sequence with a video slide: dots sit beside the play/pause button, captions stay on one line */

/* Walk-through animation: poster underneath, animation fades in once loaded */
.anim { position: absolute; inset: 0; }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.anim .anim-play { opacity: 0; transition: opacity .35s var(--ease); }
.anim.is-playing .anim-play { opacity: 1; }

/* ================= Mobile hardening ================= */
html { -webkit-tap-highlight-color: transparent; }
button, a, .choice, .media-track { touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; }
body { overscroll-behavior-y: none; }

/* Language switch: 44px tap target, same look */
.lang { position: relative; min-height: 34px; }
.lang::after { content: ""; position: absolute; inset: -6px 0; }

/* Primary action always in thumb reach: the step's buttons stick to the bottom of the screen */
.panel .nav {
  position: sticky; bottom: 0; z-index: 4;
  margin: 0 calc(-1 * var(--pad)) calc(-1 * (env(safe-area-inset-bottom) + 20px));
  padding: 14px var(--pad) calc(env(safe-area-inset-bottom) + 10px);
  background: linear-gradient(180deg, rgba(247,245,249,0) 0, var(--page) 14px);
  gap: 2px;
}
.panel .nav .btn--quiet { min-height: 44px; font-size: 15px; }

/* Short phones (iPhone SE, mini, small Android): tighter media and type so the step reads in one screen */
@media (max-height: 720px) {
  .media { height: 42vh; min-height: 250px; }
  .panel { padding-top: 18px; }
  .panel .progress { margin-bottom: 12px; }
  .step-title { font-size: 23px; margin-bottom: 8px; }
  .step-body { font-size: 15px; margin-bottom: 16px; }
  .btn { min-height: 50px; }
  .people-art { max-height: 40vh; width: auto; }
  .people-hero { margin-bottom: 6px; }
  .welcome-title { font-size: 27px; }
  [lang="ar"] .welcome-title { font-size: 25px; }
  .welcome-lede { margin: 8px 0 14px; }
  .note { margin-bottom: 14px; }
}

/* Landscape phones: picture on one side, instructions on the other */
@media (orientation: landscape) and (max-height: 520px) {
  body { padding: 0; }
  .app { max-width: none; border-radius: 0; min-height: 100dvh; }
  .screen--step { flex-direction: row; min-height: 100dvh; }
  .screen--step .media-wrap { flex: 0 0 48%; position: sticky; top: 0; height: 100dvh; }
  .screen--step .media { height: 100dvh; min-height: 0; }
  .screen--step .panel { margin-top: 0; border-radius: 0; padding-top: 18px; padding-inline: max(24px, env(safe-area-inset-right)); }
  .screen--welcome { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 24px; padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); }
  .screen--welcome .people-hero { flex: 0 0 44%; order: 2; align-self: flex-start; margin: 0 calc(-1 * max(24px, env(safe-area-inset-right))) 0 0; }
  [dir="rtl"] .screen--welcome .people-hero { order: 0; }
  .screen--welcome .people-hero::after { display: none; }
  .screen--welcome .people-art { max-height: 100dvh; width: auto; margin-inline-start: auto; }
  .screen--welcome .welcome-body { padding-top: 60px; }
  .screen--welcome .note { font-size: 13px; }
  .screen--welcome .welcome-body { flex: 1; padding: 64px 0 20px; }
  .note { margin-top: 0; }
  .screen--day1 { flex-direction: row; }
  .screen--day1 .hero { flex: 0 0 48%; min-height: 100dvh; border-radius: 0; position: sticky; top: 0; height: 100dvh; }
  .screen--day1 .day1-body { flex: 1; }
  .sheet { overflow-y: auto; }
  .screen:not(.screen--step):not(.screen--welcome):not(.screen--day1) { max-width: 760px; margin: 0 auto; width: 100%; padding-top: 12px; }
  .choices { grid-template-columns: 1fr 1fr; }
  .h2 { margin-top: 0; }
  .lede { margin-bottom: 18px; }
}

/* ================= Built-in guide (no-script / error fallback) ================= */
.fallback { padding: calc(env(safe-area-inset-top) + 20px) var(--pad) calc(env(safe-area-inset-bottom) + 28px); background: var(--page); }
.fallback-head { margin: calc(-1 * (env(safe-area-inset-top) + 20px)) calc(-1 * var(--pad)) 18px; padding: calc(env(safe-area-inset-top) + 22px) var(--pad) 22px; background: var(--hero); color: var(--white); border-radius: 0 0 24px 24px; }
.fallback-brand { margin: 0 0 14px; font: 600 18px/1 var(--sans); display: flex; align-items: center; gap: 10px; }
.fallback-brand span[lang="ar"] { color: var(--yellow); font-family: var(--arabic); }
.fallback-sep { width: 1px; height: 18px; background: rgba(255,255,255,.35); }
.fallback h1 { margin: 0 0 10px; font: 600 26px/1.25 var(--display); }
.fallback-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,203,40,.16); color: var(--cream); font-size: 14px; }
.fallback-card { margin: 0 0 16px; padding: 18px 18px 6px; border-radius: 18px; background: var(--white); border: 1px solid var(--lilac); }
.fallback-card[lang="ar"] { font-family: var(--arabic); }
.fallback-card h2 { margin: 0 0 8px; font: 600 18px/1.4 var(--display); color: var(--purple); }
.fallback-card[lang="ar"] h2 { font-family: var(--arabic); }
.fallback-card ol { margin: 0 0 16px; padding-inline-start: 22px; color: #2B2730; font-size: 15px; }
.fallback-card li { margin-bottom: 6px; }
.fallback-tip { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--cream); color: var(--purple); font-size: 14px; }
.fallback-diag { margin: 6px 0 0; font-size: 12px; color: var(--grey); word-break: break-word; }

/* ================= Preferred name ================= */
.screen--name .h2 { margin-top: 4px; }
.name-badge { position: relative; width: 76px; height: 74px; margin: 6px 0 14px; display: grid; place-items: center; color: var(--yellow); }
.name-badge .penta { position: absolute; inset: 0; width: 100%; height: 100%; }
.name-initial { position: relative; padding-top: 4px; font: 600 30px/1 var(--display); color: var(--purple); transition: transform .25s var(--ease); }
.name-initial.is-empty::before { content: ""; display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--purple); opacity: .35; }
.name-form { flex: 1; display: flex; flex-direction: column; }
.name-label { font-size: 14px; font-weight: 600; color: var(--grey); margin-bottom: 8px; }
.name-input {
  width: 100%; min-height: 58px; padding: 14px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--lilac); background: var(--white); color: var(--purple);
  font: 500 20px/1.3 var(--sans); outline: none; transition: border-color .15s, box-shadow .15s;
}
.name-input::placeholder { font-weight: 400; }
.name-input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(140, 91, 166, .18); }
.name-hello { min-height: 26px; margin: 12px 2px 0; color: var(--violet); font-weight: 500; }
.screen--name .nav { position: sticky; bottom: 0; padding: 12px 0 calc(env(safe-area-inset-bottom) + 4px); background: linear-gradient(180deg, rgba(247,245,249,0), var(--page) 12px); gap: 2px; }
.btn:disabled { opacity: .45; cursor: default; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }


/* ================= Review-board fixes ================= */
/* Focus ring: purple on light screens, yellow on purple/photo surfaces (WCAG 1.4.11) */
:focus-visible { outline-color: var(--purple); }
.screen--welcome :focus-visible, .screen--day1 .hero :focus-visible, .topbar--on-photo :focus-visible, .media :focus-visible { outline-color: var(--yellow); }

/* Help sheet always fits and scroll on small screens and in landscape */
.sheet { overflow-y: auto; overscroll-behavior: contain; }

/* Captions readable on every photo (≥ 4.5:1) */
.media-cap { background: rgba(37, 10, 51, .72); }

/* Gallery: 28px dot targets; the walk-through pause button sits above the dots, never under them */
.media-dot { width: 28px; height: 28px; background: none; border-radius: 0; display: grid; place-items: center; }
.media-dot::after { content: none; }
.media-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; transition: width .2s var(--ease), background-color .2s; }
.media-dot.is-on { width: 34px; background: none; }
.media-dot.is-on::before { width: 20px; border-radius: 4px; background: var(--yellow); }
.media--gallery .media-dots { inset-inline-end: 8px; bottom: 44px; gap: 0; }
.media-slide { position: relative; }

/* Step action now lives in the pinned footer with Next */
.panel .nav .step-action { margin-bottom: 4px; }

/* Good to know (before the route) */
.screen--mode .choices { margin-bottom: 0; }

/* Help link on the purple welcome screen */
.btn--on-dark { color: var(--lavender); margin-top: 4px; }

/* Day-1 hero: keep the seal clear of the top bar */
.screen--day1 .hero { padding-top: calc(env(safe-area-inset-top) + 76px); }

/* Built-in guide: wait briefly for the interactive guide before showing the simple version */
.fallback { animation: fb-reveal 0s 4.5s both; }
.fallback--now { animation: none; }
@keyframes fb-reveal { from { visibility: hidden; } to { visibility: visible; } }
.fallback-ar-title { margin: -4px 0 12px; font: 600 20px/1.5 var(--arabic); color: var(--white); }
.fallback-card ul { margin: 0 0 16px; padding-inline-start: 20px; color: #2B2730; font-size: 15px; }
.fallback-note span { display: block; margin-top: 4px; }

@media (max-height: 800px) {
  .media { height: 36vh; min-height: 220px; }
  .panel { padding-top: 16px; }
  .panel .progress { margin-bottom: 10px; }
  .step-title { font-size: 23px; margin-bottom: 6px; }
  .step-body { font-size: 15px; margin-bottom: 10px; }
  .panel .nav .btn { min-height: 48px; }
}
@media (max-height: 620px) {
  .media { height: 28vh; min-height: 160px; }
  .step-title { font-size: 21px; }
  .step-body { font-size: 14.5px; line-height: 1.5; }
  .panel .nav .btn { min-height: 46px; padding-block: 10px; }
  .panel .nav .btn--quiet { min-height: 44px; }
}
.media-toggle { width: 44px; height: 44px; }


/* ================= Round-2 review fixes ================= */
/* Offline notice sits above the guide (in the page flow), so it never covers the back button or language switch */
.offline[hidden] { display: none; }
@media (min-width: 560px) { .offline { border-radius: 14px; margin-bottom: 8px; } }

/* Welcome: the wordmark sits on clean purple above the campaign artwork, not over its pentagon */
.people-hero { padding-top: calc(env(safe-area-inset-top) + 62px); }
.people-hero::after { display: none; }
.screen--welcome { overflow-x: clip; }

/* Captions and controls on photos: solid brand purple, so they never pick up the photo's colour */
.media-cap, .media-toggle { background: rgba(37, 10, 51, .9); -webkit-backdrop-filter: none; backdrop-filter: none; }
.media-toggle { box-shadow: 0 0 0 1.5px rgba(255, 203, 40, .9); }
/* Stronger top shade so the Maher wordmark separates from signage in the walk-through */
.media::before { height: 150px; background: linear-gradient(180deg, rgba(37,10,51,.8) 0, rgba(37,10,51,.45) 55%, rgba(37,10,51,0)); }
/* Gallery dots: visible on bright paving and walls (dark ring) */
.media-dot::before { background: rgba(255,255,255,.9); box-shadow: 0 0 0 1.5px rgba(37,10,51,.75); }
.media-dot.is-on::before { box-shadow: 0 0 0 1.5px rgba(37,10,51,.75); }

/* Walk-through pause button: beside the dots on the bottom row, never near the top bar (any screen height) */
.media--gallery .media-slide .media-toggle { bottom: 36px; inset-inline-end: 80px; }
.media--gallery .media-cap { max-width: calc(100% - 156px); white-space: normal; overflow: hidden; text-overflow: clip;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; border-radius: 14px; line-height: 1.35; }
.media-cap { max-width: min(calc(100% - 96px), 22em); }

/* Photos use the spare height on short screens instead of leaving the panel half empty */
@media (orientation: portrait), (min-height: 521px) {
  .screen--step > .media-wrap { flex: 1 0 auto; display: flex; flex-direction: column; }
  .screen--step > .media-wrap > .media { flex: 1 0 auto; height: 36vh; min-height: 200px; max-height: 64vh; }
  .screen--step > .panel { flex: 0 0 auto; }
}
@media (max-height: 620px) { .media, .screen--step > .media-wrap > .media { height: 32vh; min-height: 180px; } }

/* Name field placeholder: readable (4.5:1) */
.name-input::placeholder { color: #6E6A75; }

/* Help-sheet note keeps its own look */
.sheet .help-note { color: var(--purple); }

/* Good to know: compact, and before the choices on short screens so it is seen before choosing */
@media (max-height: 760px) {
  .screen--mode .lede { margin-bottom: 14px; }
  .screen--mode .choice { padding: 14px 16px; }
}


/* Large text / 200% zoom: top bar wraps instead of pushing the page sideways; the pinned footer
   stops pinning when it would cover most of the screen */
.topbar { flex-wrap: wrap; row-gap: 6px; }
.brand { min-width: 0; }
@media (max-height: 340px) {
  .panel .nav, .screen--name .nav { position: static; margin-bottom: 0; background: none; }
  .media { height: 70vh; min-height: 0; }
}
@media (orientation: landscape) and (max-height: 480px) and (min-height: 341px) {
  .panel .nav { grid-template-columns: 1fr 1fr; column-gap: 8px; }
  .panel .nav > .btn--quiet { grid-column: 1 / -1; }
  .panel .nav > .btn--primary:first-child { grid-column: 1 / -1; }
}

/* Day 1 in landscape: the seal starts below the top bar */
@media (orientation: landscape) and (max-height: 520px) {
  .screen--day1 .hero { justify-content: flex-start; overflow-y: auto; padding-top: calc(env(safe-area-inset-top) + 72px); }
  .seal { width: 48px; height: 48px; margin: 4px 0 10px; }
  .day1-title { font-size: 28px; }
}

/* Good to know now comes before the route choices (read before choosing) */

/* Very short screens (iPhone SE 1st gen): the footer already names Head Office 2 Reception, so the Location row is
   left out, and Close becomes a corner button, so the whole pass shows at once */
/* Welcome: keep "Begin" above the fold on 360x780-class phones */
@media (max-height: 820px) { .people-hero { padding-top: calc(env(safe-area-inset-top) + 56px); } .people-art { max-height: 38vh; width: auto; } }
/* Landscape: Good to know as one compact row of three, so both route choices stay on screen */
@media (orientation: landscape) and (max-height: 520px) {
  .screen--mode .lede { margin-bottom: 10px; }
  .screen--mode .choice { padding: 10px 14px; }
  .screen--mode .h2 { font-size: 24px; margin-bottom: 2px; }
}
/* Landscape: Close sits in the side margin, clear of the pass */

/* ================= Round-3 verifier fixes ================= */
/* CV-1: while the offline notice shows, full-screen layouts shrink by its height */
@media (orientation: portrait), (min-height: 521px) {
  .screen--step { min-height: calc(100vh - var(--offline-h, 0px)); min-height: calc(100dvh - var(--offline-h, 0px)); }
}
/* CV-2: on narrow photo bars (200% zoom, small landscape) the wordmark steps aside so the bar never wraps onto the photo */
@media (max-width: 300px), (orientation: landscape) and (max-height: 520px) and (max-width: 700px) {
  .topbar--on-photo { flex-wrap: nowrap; }
  .topbar--on-photo .brand { display: none; }
  .topbar--on-photo .lang { margin-inline-start: auto; }
}
@media (max-width: 300px) {
  .choice { grid-template-columns: 40px 1fr; gap: 10px; padding: 12px; }
  .choice-icon { width: 40px; height: 40px; }
  .screen { padding-inline: 14px; }
}
/* CV-7: ticket notches on the perforation line */
/* CV-8: both route choices on screen at 320x568 */
@media (max-height: 620px) {
  .screen--mode > .lede { display: none; }
  .screen--mode > .h2 { margin-bottom: 10px; }
  .screen--mode .choice { grid-template-columns: 44px 1fr; gap: 12px; }
  .screen--mode .choice-icon { width: 44px; height: 44px; }
  .screen--mode .choice-body { margin-top: 0; font-size: 13px; }
}
/* CV-9: Begin button above the fold at 320x568 */
@media (max-height: 620px) { .people-hero { padding-top: calc(env(safe-area-inset-top) + 52px); margin-bottom: 4px; } .welcome-lede { font-size: 14px; margin: 6px 0 10px; } }
/* Offline notice: compact, and on short screens the step photo gives up the notice's height */
.offline { font-size: 13px; padding-top: calc(env(safe-area-inset-top) + 7px); padding-bottom: 7px; line-height: 1.4; }
@media (max-height: 620px) {
  .screen--step > .media-wrap > .media { height: calc(32vh - var(--offline-h, 0px)); min-height: calc(180px - var(--offline-h, 0px)); }
}

/* QA-9: older iOS (14.5-15.3) has no dvh: vh fallbacks first */
.app { min-height: calc(100vh - var(--offline-h, 0px)); min-height: calc(100dvh - var(--offline-h, 0px)); }
.sheet { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); }
@media (orientation: landscape) and (max-height: 520px) { .sheet { max-height: 92vh; max-height: 92dvh; } }
/* Forget me: second tap confirms */
.btn--forget.is-armed { color: #8A1C1C; font-weight: 600; background: #FBECEC; }

/* ================= Final screen: continue at your own pace ================= */
.more { margin: 4px 0 26px; }
.more-h { margin: 0 0 12px; font: 600 14px/1.4 var(--sans); color: var(--grey); }
.more-card { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start;
  margin-bottom: 12px; padding: 16px; border-radius: 18px; background: var(--white); border: 1px solid var(--lilac); }
.more-card > .more-cta { grid-column: 1 / -1; margin-top: 2px; }
.more-icon { position: relative; width: 48px; height: 48px; display: grid; place-items: center; color: var(--purple); }
.more-icon .penta { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--lilac); }
.more-icon svg:not(.penta) { position: relative; width: 22px; height: 22px; }
.more-title { margin: 2px 0 4px; font: 600 17px/1.35 var(--display); color: var(--purple); }
.more-body { margin: 0; font-size: 14px; line-height: 1.5; color: var(--grey); }
.more-text .more-cta { margin-top: 12px; }
.more-cta svg { order: 2; }
.more-card--hero { background: var(--hero); border-color: transparent; color: var(--white); }
.more-card--hero .more-title { color: var(--white); }
.more-card--hero .more-body { color: var(--lavender); }
.more-card--hero .more-icon { color: var(--purple); }
.more-card--hero .more-icon .penta { color: var(--yellow); }
.more-card--hero .btn--primary { background: var(--yellow); color: var(--purple); }
@media (hover: hover) { .more-card--hero .btn--primary:hover { background: #FFD653; } }
.more-card--hero :focus-visible { outline-color: var(--yellow); }
.more-progress { display: grid; gap: 6px; margin-top: 12px; }
.more-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.more-bar-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--yellow); }
.more-progress-label { font-size: 13px; color: var(--cream); }
.more-soon { margin: 4px 0 0; font-size: 14px; color: var(--grey); }
.more-badge { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--cream); color: var(--purple); font-size: 12.5px; font-weight: 600; }
.more-card.is-soon .more-icon { opacity: .75; }

/* ================= Useful links sheet ================= */
.sheet--links { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.sheet--links > h2 { margin-bottom: 4px; }
.links-body { flex: 1; overflow-y: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px; overscroll-behavior: contain; }
.sheet--links > .btn { margin-top: 12px; flex: none; }
.links-group { margin-top: 18px; }
.links-group-title { margin: 0 0 4px; font: 600 15px/1.4 var(--sans); color: var(--purple); }
.links-note { margin: 0 0 6px !important; font-size: 13px; line-height: 1.5; color: var(--grey); }
.links-list { list-style: none; margin: 0; padding: 0; border-radius: 14px; background: var(--white); border: 1px solid var(--lilac); }
.links-list li + li { border-top: 1px solid var(--lilac); }
.links-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 14px; color: var(--purple); text-decoration: none; }
.links-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.links-name { font-size: 16px; font-weight: 500; line-height: 1.4; }
.links-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--grey); }
.links-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.links-badge { padding: 1px 8px; border-radius: 999px; background: var(--lilac); color: var(--purple); font-weight: 600; font-size: 12px; }
.links-go svg { width: 18px; height: 18px; color: var(--violet); flex: none; }
.links-value { font: 600 17px/1.2 "Poppins", sans-serif; color: var(--purple); }
@media (hover: hover) { a.links-item:hover { background: var(--page); } }
a.links-item:focus-visible { outline-offset: -3px; }

/* ================= Typography standard (1 Nov 2026) =================
   Primary reading text >= 16px (EN/AR), supporting text >= 14px EN / 15px AR, captions >= 12px EN / 13px AR,
   main buttons >= 15px, secondary controls >= 14px, inputs >= 16px, reading line-height >= 1.4.
   These rules come last so they hold on every screen size. Checked by tools/type_audit.py. */
.welcome-lede { font-size: 16px; line-height: 1.55; }
.step-body { font-size: 16px; line-height: 1.55; }
.lede, .day1-lede { font-size: 16px; line-height: 1.55; }
[lang="ar"] .step-body, [lang="ar"] .welcome-lede, [lang="ar"] .lede, [lang="ar"] .day1-lede { font-size: 16.5px; line-height: 1.7; }
.choice-body, .note, .more-body, .help-note, .links-note, .more-soon { font-size: 14px; line-height: 1.5; }
[lang="ar"] .choice-body, [lang="ar"] .note, [lang="ar"] .more-body, [lang="ar"] .help-note, [lang="ar"] .links-note, [lang="ar"] .more-soon { font-size: 15px; line-height: 1.65; }
[lang="ar"] .media-cap { font-size: 13px; }
.more-badge, .links-badge { font-size: 12px; }
[lang="ar"] .more-badge, [lang="ar"] .links-badge { font-size: 13px; }
/* Short phones keep the larger text: the photo gives up height instead */
@media (max-height: 620px) {
  .screen--mode .choice-body { font-size: 14px; }
  [lang="ar"] .screen--mode .choice-body { font-size: 15px; }
}
.screen--welcome .note { font-size: 14px; }
[lang="ar"] .screen--welcome .note { font-size: 15px; }
/* Typography standard on the smallest screens: same text sizes, tighter spacing */
@media (max-height: 620px) {
  .screen--mode > .topbar { margin-bottom: 4px; }
  .screen--mode > .h2 { font-size: 22px; margin: 0 0 8px; }
  .screen--mode .choices { gap: 6px; }
  .screen--mode .choice { padding: 8px 12px; }
  .screen--mode .choice-title { font-size: 17px; }
  .screen--mode .choice-body { line-height: 1.4; }
  .people-art { max-height: 20vh; }
}
/* 568x320 landscape (iPhone SE 1st gen): readable text wins over no-scroll; the card scrolls, Close stays fixed */

/* ================= Final screen refresh (1 Nov) ================= */
/* Photo runs edge to edge: no rounded bottom corners, no badge */
.screen--day1 .hero { border-radius: 0; }
/* One identity for the three cards: bold titles, one-line benefit, the same yellow action */
.more-title { font-family: "Poppins", var(--sans); font-weight: 700; font-size: 17px; }
[lang="ar"] .more-title { font-family: var(--arabic); font-weight: 700; }
.more-card .more-cta { background: var(--yellow); color: var(--purple); border-color: transparent; }
@media (hover: hover) { .more-card .more-cta:hover { background: #FFD653; } }
.more-card .more-cta:focus-visible { outline-color: var(--purple); }
.more-card--hero .more-cta:focus-visible { outline-color: var(--yellow); }

/* ---- Welcome: ALJUF logo in the joiner's language, centred at the top (1 Nov 2026) ---- */
.brand-mark { margin: 0; line-height: 0; display: flex; justify-content: center; }
/* Both logos render at the same size: equal emblem height and near-equal width (~150 px) */
.brand-logo { display: block; width: auto; filter: drop-shadow(0 2px 8px rgba(20,4,30,.35)); }

/* ---- Welcome hero, rebuilt (1 Nov 2026): logo bar in flow, branded photo fitted edge to edge, no overlays on the people ---- */
.screen--welcome .people-hero { padding-top: 0 !important; justify-content: center; }
.screen--welcome .people-hero::before { inset: 10% 4% 0; background: radial-gradient(closest-side, rgba(255, 203, 40, .16), rgba(255, 203, 40, 0)); }
.brand-logo--en { height: 42px; }
.brand-logo--ar { height: 47px; }
@media (max-width: 360px) { .brand-logo--en { height: 34px; } .brand-logo--ar { height: 38px; } }
@media (max-height: 700px) and (orientation: portrait) { .screen--welcome .people-art { max-height: 38vh; width: auto; } }

/* ---- Arabic type scale (1 Nov 2026, HC's Arabic review). Arabic glyphs read about two sizes smaller than Latin at the same
   pixel size, so Arabic is set ~2 px larger: reading 18, support 16, captions 14, buttons 17, controls 15. ---- */
:root[lang="ar"] .welcome-lede, :root[lang="ar"] .lede, :root[lang="ar"] .step-body, :root[lang="ar"] .day1-lede,
:root[lang="ar"] .sheet > p, :root[lang="ar"] .name-hello { font-size: 18px !important; line-height: 1.75 !important; }
:root[lang="ar"] .choices li > span, :root[lang="ar"] li > span, :root[lang="ar"] .choice-body, :root[lang="ar"] .more-body, :root[lang="ar"] .help-note, :root[lang="ar"] .links-note { font-size: 16px !important; line-height: 1.7 !important; }
:root[lang="ar"] .media-cap, :root[lang="ar"] .progress-label, :root[lang="ar"] .more-badge, :root[lang="ar"] .links-badge,
:root[lang="ar"] .welcome-tagline { font-size: 14px !important; }
:root[lang="ar"] .welcome-tagline { font-size: 15px !important; }
:root[lang="ar"] .btn { font-size: 17px !important; }
.lang[lang="ar"] { font-size: 15px !important; }
/* the photo's top edge melts into the page instead of a hard line under the logo */
/* Short screens: the welcome photo gives way so "Begin arrival guide" stays above the fold */
@media (max-height: 720px) and (orientation: portrait) { .screen--welcome .people-art { width: auto; max-width: 100%; max-height: 33vh; } }
@media (max-height: 620px) and (orientation: portrait) { .screen--welcome .people-art { max-height: 27vh; } .screen--welcome .people-hero { margin-bottom: 10px; } }
/* Phones turned sideways keep the two-column welcome: logo bar over the text column, photo beside it */
@media (max-height: 500px) and (orientation: landscape) {
  .screen--welcome .people-art { width: auto; max-width: none; max-height: 100dvh; -webkit-mask-image: none; mask-image: none; }
}
/* Arabic steps on short phones: slightly shorter photo and tighter leading so the larger Arabic text clears the buttons */
@media (min-height: 540px) and (max-height: 720px) and (orientation: portrait) {
  :root[lang="ar"] .screen--step > .media-wrap > .media { height: 28vh; min-height: 150px; }
  :root[lang="ar"] .step-body { line-height: 1.6 !important; margin-bottom: 12px; }
}
@media (min-height: 540px) and (max-height: 620px) and (orientation: portrait) {
  :root[lang="ar"] .screen--step > .media-wrap > .media { height: 21vh; min-height: 110px; }
}

/* ==== Welcome · Immersive (Concept A, owner choice 1 Nov 2026) ====
   One continuous purple surface. Menu and ALJUF logo have their own bar, clear of the photo (logo in the reading-start
   corner's opposite: right in English, mirrored in Arabic). The photo fills the space above the message, never stretched
   (object-fit: cover), and melts into the purple; the Maher wordmark opens the message. */
.screen--welcome { background: var(--purple) !important; color: var(--on-dark); padding: 0 !important; overflow: hidden; }
.screen--welcome > .topbar.topbar--hero { position: relative; inset: auto; top: auto; z-index: 3; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0; padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px; min-height: 66px; background: var(--purple); }
.menu-btn { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; }
.menu-btn svg { width: 24px; height: 24px; }
@media (hover: hover) { .menu-btn:hover { background: rgba(255,255,255,.16); } }
.topbar--hero .brand-mark { line-height: 0; }
.topbar--hero .brand-logo { filter: none; display: block; width: auto; }
.topbar--hero .brand-logo--en { height: 36px; }
.topbar--hero .brand-logo--ar { height: 41px; }
@media (max-width: 360px) { .topbar--hero .brand-logo--en { height: 31px; } .topbar--hero .brand-logo--ar { height: 35px; } }
.screen--welcome .people-hero { position: relative; flex: 1 1 auto; min-height: 190px; max-height: min(60vh, 560px); margin: 0 !important; padding: 0 !important;
  overflow: hidden; display: block; background: var(--purple); }
.screen--welcome .people-hero::before { display: none !important; }
.screen--welcome .people-hero::after { content: ""; display: block !important; position: absolute; inset: 0; height: auto; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, var(--purple) 0, rgba(60,16,83,0) 8%, rgba(60,16,83,0) 55%, rgba(60,16,83,.75) 82%, var(--purple) 100%); }
.screen--welcome .people-art { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
  object-fit: cover; object-position: 55% 10%; filter: none; -webkit-mask-image: none !important; mask-image: none !important; margin: 0; }
.screen--welcome .welcome-body { position: relative; z-index: 2; flex: 0 0 auto; margin: -64px 0 0; padding: 0 var(--pad) calc(env(safe-area-inset-bottom) + 18px);
  background: none; border-radius: 0; box-shadow: none; }
.brand--hero { margin: 0 0 12px; gap: 10px; }
.brand--hero .brand-name { font-size: 22px; color: #fff; }
.brand--hero .brand-key { width: 30px; height: 30px; }
.screen--welcome .welcome-tagline { margin: 0 0 4px; color: var(--lavender); }
.screen--welcome .welcome-title { margin: 0 0 18px; }  /* 20 Nov 2026 (owner): no description under titles, so the title carries the gap. */
.screen--welcome .welcome-lede { margin: 10px 0 18px; color: rgba(255,255,255,.82); }
@media (max-height: 700px) and (orientation: portrait) {
  .screen--welcome > .topbar.topbar--hero { min-height: 58px; padding-top: calc(env(safe-area-inset-top) + 6px); padding-bottom: 6px; }
  .brand--hero { margin-bottom: 8px; } .brand--hero .brand-name { font-size: 19px; }
  .screen--welcome .welcome-title { font-size: 25px; } [lang="ar"] .screen--welcome .welcome-title { font-size: 24px; line-height: 1.45; }
  .screen--welcome .welcome-lede { margin: 6px 0 12px; }
  .screen--welcome .people-hero { min-height: 150px; }
  .screen--welcome .welcome-body { margin-top: -48px; padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .screen--welcome .btn--on-dark { margin-top: 0; min-height: 44px; }
}
@media (max-height: 600px) and (orientation: portrait) { .screen--welcome .people-hero { min-height: 120px; } .screen--welcome .welcome-tagline { display: none; } }
/* Phones turned sideways: bar across the top, photo on one side, the message on the other */
@media (max-height: 500px) and (orientation: landscape) {
  .screen--welcome { flex-direction: row !important; flex-wrap: wrap !important; align-items: stretch !important; column-gap: 0 !important; padding: 0 !important; }
  .screen--welcome > .topbar.topbar--hero { flex: 0 0 100%; min-height: 56px; padding: calc(env(safe-area-inset-top) + 6px) max(24px, env(safe-area-inset-right)) 6px max(24px, env(safe-area-inset-left)); }
  .screen--welcome .people-hero { order: 0 !important; flex: 0 0 46%; align-self: stretch; height: calc(100dvh - 56px); max-height: none; min-height: 0; }
  .screen--welcome .people-hero::after { background: linear-gradient(90deg, rgba(60,16,83,0) 60%, var(--purple) 100%), linear-gradient(180deg, var(--purple) 0, rgba(60,16,83,0) 10%); }
  [dir="rtl"] .screen--welcome .people-hero::after { background: linear-gradient(270deg, rgba(60,16,83,0) 60%, var(--purple) 100%), linear-gradient(180deg, var(--purple) 0, rgba(60,16,83,0) 10%); }
  .screen--welcome .welcome-body { flex: 1 1 0; margin: 0; padding: 4px max(24px, env(safe-area-inset-right)) 14px 20px; height: calc(100dvh - 56px); overflow-y: auto; }
  [dir="rtl"] .screen--welcome .welcome-body { padding-left: max(24px, env(safe-area-inset-left)); padding-right: 20px; }
  .brand--hero { margin-bottom: 6px; } .brand--hero .brand-name { font-size: 18px; }
  .screen--welcome .welcome-title { font-size: 23px; } .screen--welcome .welcome-lede { margin: 6px 0 10px; }
  .topbar--hero .brand-logo--en { height: 30px; } .topbar--hero .brand-logo--ar { height: 34px; }
}

/* ---- Menu drawer: slides in from the reading-start side ---- */
.overlay--menu { align-items: stretch; justify-content: flex-start; }
.drawer { width: min(340px, 86vw); max-width: 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px;
  background: var(--page); color: var(--ink); padding: calc(env(safe-area-inset-top) + 12px) 20px calc(env(safe-area-inset-bottom) + 20px);
  box-shadow: 0 0 40px rgba(20,4,30,.35); animation: drawer-in .28s var(--ease); }
@keyframes drawer-in { from { translate: -24px 0; opacity: .4; } to { translate: 0 0; opacity: 1; } }
[dir="rtl"] .drawer { animation-name: drawer-in-rtl; }
@keyframes drawer-in-rtl { from { translate: 24px 0; opacity: .4; } to { translate: 0 0; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 4px; }
.brand--menu { margin: 0; }
.brand--menu .brand-name { font-size: 20px; }
.drawer-close { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 50%; color: var(--ink); margin-inline-end: -8px; }
.drawer-close svg { width: 24px; height: 24px; }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-radius: 14px; background: var(--white); border: 1px solid var(--lilac);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.menu-item > svg { width: 22px; height: 22px; flex: 0 0 auto; }
.menu-item > span { flex: 1; }
.menu-item.is-soon { opacity: .75; }
.menu-soon { padding: 2px 10px; border-radius: 999px; background: var(--lilac); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.menu-group { display: flex; flex-direction: column; gap: 8px; }
.menu-label { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--grey); }
.menu-label svg { width: 18px; height: 18px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--white); border: 1px solid var(--lilac); }
.seg-btn { flex: 1 1 0; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.seg-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.seg-btn[lang="ar"] { font-family: var(--arabic); } .seg-btn[lang="en"] { font-family: "Poppins", sans-serif; }
.seg-btn[aria-pressed="true"] { background: var(--purple); color: #fff; box-shadow: 0 2px 8px rgba(60,16,83,.25); }
.menu-note { margin: auto 0 0; padding-top: 12px; font-size: 13px; line-height: 1.5; color: var(--grey); }
:root[lang="ar"] .menu-item, :root[lang="ar"] .seg-btn { font-size: 17px !important; }
:root[lang="ar"] .menu-label, :root[lang="ar"] .menu-soon { font-size: 15px !important; }
:root[lang="ar"] .menu-note { font-size: 14px !important; line-height: 1.7; }
:root[lang="ar"] .seg-btn[lang="en"] { font-size: 15px !important; }

/* ---- Appearance: Dark. The welcome stays brand purple; light surfaces turn deep aubergine; ---- */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] body { background: #0B0510; }
/* The dark palette sits on the document, not on .app: overlays, sheets and the menu drawer are outside .app,
   and when it lived there they kept the light palette and the ink stayed dark purple (owner, 15 Nov 2026). */
:root[data-theme="dark"] {
  --page: #140A1C; --surface: #221733; --lilac: #43305E; --cream: #3A2C14; --ink: #F3EDF9; --grey: #C6BBD2; --violet: #C79BE0;
  --lavender: #CFC4D8; --on-dark-quiet: #DCD2E4; }
:root[data-theme="dark"] :is(.app, .overlay) .btn--outline { border-color: rgba(241,234,246,.5); }
:root[data-theme="dark"] .app .btn--primary:not(.screen--welcome .btn--primary):not(.more-cta) { background: var(--yellow); color: var(--purple); }
:root[data-theme="dark"] .screen--welcome, :root[data-theme="dark"] .screen--welcome .people-hero, :root[data-theme="dark"] .screen--welcome > .topbar.topbar--hero { --purple: #2A0B3B; }
:root[data-theme="dark"] .screen--welcome :is(h1, .welcome-title) { color: #fff; }
:root[data-theme="dark"] :is(.app, .overlay) :is(.btn--outline, .choice, .fallback-card, .name-input, .more-card:not(.more-card--hero), .links-list, .menu-item, .seg) { background: var(--surface); }
:root[data-theme="dark"] .app :is(.step-body, .fallback-card ol, .fallback-card ul) { color: #DCD2E4; }
:root[data-theme="dark"] .name-input::placeholder { color: #9C90A8; }
:root[data-theme="dark"] .overlay .btn--forget.is-armed { color: #FFB4B4; background: #3A1414; }
:root[data-theme="dark"] .app :focus-visible { outline-color: var(--yellow); }

/* ================= Access service: buddy card, signed-in menu ================= */
.buddy-card { margin: 0 0 18px; padding: 18px; border-radius: 18px; background: var(--white); border: 1px solid var(--lilac); box-shadow: 0 6px 22px rgba(60,16,83,.07); }
.buddy-top { display: flex; align-items: center; gap: 14px; }
.buddy-avatar { position: relative; flex: none; width: 58px; height: 56px; display: grid; place-items: center; color: var(--yellow); }
.buddy-avatar .penta { position: absolute; inset: 0; width: 100%; height: 100%; }
.buddy-initials { position: relative; padding-top: 3px; font: 600 19px/1 var(--sans); color: var(--purple); letter-spacing: .02em; }
.buddy-photo { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: cover; clip-path: polygon(50% 2%, 98% 37%, 80% 97%, 20% 97%, 2% 37%); }
.buddy-avatar.has-photo .buddy-initials { visibility: hidden; }
.buddy-text { min-width: 0; }
.buddy-kicker { margin: 0 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet); }
[lang="ar"] .buddy-kicker { letter-spacing: 0; font-size: 15px; }
.buddy-name { margin: 0; font: 600 20px/1.3 var(--display); color: var(--purple); overflow-wrap: anywhere; }
.buddy-role { margin: 2px 0 0; font-size: 14px; color: var(--grey); }
.buddy-body { margin: 12px 0 0; font-size: 15px; color: var(--grey); }
.buddy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.buddy-actions .btn { min-height: 48px; padding: 10px 12px; font-size: 15px; }
.buddy-actions .btn:only-child, .buddy-actions .btn:first-child:nth-last-child(3) { grid-column: 1 / -1; }
.menu-item--account { width: 100%; text-align: start; font: inherit; color: var(--ink); cursor: pointer; }
.menu-account { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.menu-account .menu-soon { white-space: normal; }
:root[data-theme="dark"] .buddy-card { background: var(--surface); border-color: var(--lilac); box-shadow: none; }
:root[data-theme="dark"] :is(.buddy-name, .buddy-initials) { color: var(--ink); }
:root[data-theme="dark"] .buddy-initials { color: #3C1053; }
:root[data-theme="dark"] .buddy-kicker { color: var(--violet); }

/* ================= Menu on every screen ================= */
.topbar:not(.topbar--hero) .menu-btn { color: var(--purple); border-color: var(--lilac); background: var(--white); }
@media (hover: hover) { .topbar:not(.topbar--hero) .menu-btn:hover { background: var(--lilac); } }
.topbar--on-photo .menu-btn, .menu-btn--photo { color: var(--white) !important; border-color: rgba(255,255,255,.6) !important; background: rgba(37,10,51,.35) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
:root[data-theme="dark"] .topbar:not(.topbar--hero):not(.topbar--on-photo) .menu-btn:not(.menu-btn--photo) { color: var(--ink); background: var(--surface); border-color: var(--lilac); }


/* ==== Wordmark at the top (owner, 5 Nov 2026) ====
   "Maher | ماهر" sat above the greeting and read as the joiner's name. Now it sits in the top bar:
   back (or an empty slot) | wordmark centred | menu. Welcome: menu | wordmark | ALJUF logo in the corner, as before (owner comment, 5 Nov).
   Sign-in pages keep their own bar (back | wordmark | language button). */
.topbar:not(.topbar--logo):not(.topbar--hero) { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.topbar:not(.topbar--logo):not(.topbar--hero) > .brand { justify-self: center; margin: 0; min-width: 0; }
.topbar:not(.topbar--logo):not(.topbar--hero) > .icon-btn { margin-inline-start: 0; }
.topbar-slot { display: block; width: 44px; height: 44px; }
.screen--gate > .topbar:not(.topbar--hero) { grid-template-columns: minmax(44px, auto) minmax(0, 1fr) auto; }
.screen--welcome > .topbar.topbar--hero { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 10px; }
.topbar--hero > .brand--hero { justify-self: center; margin: 0; gap: 8px; min-width: 0; }
.topbar--hero > .brand--hero .brand-name { font-size: 18px; }
.topbar--hero > .brand--hero .brand-key { width: 26px; height: 26px; }
.topbar--hero > .brand-mark { justify-self: end; }
@media (max-width: 389px) {
  .topbar--hero > .brand--hero { gap: 6px; } .topbar--hero > .brand--hero .brand-name { font-size: 16px; } .topbar--hero > .brand--hero .brand-key { width: 24px; height: 24px; }
  .topbar--hero .brand-logo--en { height: 30px; } .topbar--hero .brand-logo--ar { height: 34px; }
}
/* 200% text zoom or very narrow phones: the wordmark steps aside so the menu and logo stay tappable and clear (same rule as CV-2) */
@media (max-width: 299px) { .topbar--hero > .brand--hero { display: none; } }
.topbar--hero > .brand--hero { overflow: hidden; }
@media (max-width: 340px) {
  .screen--welcome > .topbar.topbar--hero { column-gap: 6px; }
  .topbar--hero > .brand--hero .brand-name { font-size: 15px; }
  .topbar--hero .brand-logo--en { height: 26px; } .topbar--hero .brand-logo--ar { height: 30px; }
}

/* ================= R5 check-ins (day 1, first month) ================= */
/* Welcome: one quiet notice above the title when a check-in is open */
.checkin-chip { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 10px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,203,40,.14); border: 1px solid rgba(255,203,40,.6); color: var(--yellow); font: 600 14px/1.35 var(--sans); text-align: start; }
.checkin-chip svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) { .checkin-chip:hover { background: rgba(255,203,40,.22); } }
/* Get a head start: the check-in card leads, in the accent tint */
.more-card--checkin { background: var(--cream); border-color: #F3D77E; }
.more-card--checkin .more-icon .penta { color: var(--yellow); }
.more-kicker { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet); }
[lang="ar"] .more-kicker { letter-spacing: 0; font-size: 14px; }
.menu-item--checkin { width: 100%; text-align: start; font: inherit; color: var(--ink); cursor: pointer; border-color: #F3D77E; background: var(--cream); }
/* The sheet */
.sheet--checkin h2 { margin-bottom: 4px; }
.checkin-kicker { margin: 0 0 2px !important; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet) !important; }
[lang="ar"] .checkin-kicker { letter-spacing: 0; font-size: 14px; }
.checkin-intro { font-size: 14px; margin-bottom: 14px !important; }
.checkin-form { display: grid; gap: 12px; }
.checkin-q { margin: 0; padding: 14px; border: 1px solid var(--lilac); border-radius: var(--radius); min-width: 0; }
.checkin-q.is-missing { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E inset; }
.checkin-legend { display: block; float: left; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 600; font-size: 15px; line-height: 1.45; color: var(--ink); }
[dir="rtl"] .checkin-legend { float: right; }
.checkin-legend + * { clear: both; }
.sheet--checkin h2:focus { outline: none; }
.checkin-n { color: var(--violet); }
.checkin-opts { display: grid; gap: 8px; }
.checkin-opts--scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.checkin-opts--yesno { grid-template-columns: 1fr 1fr; }
.checkin-opt { position: relative; display: block; }
.checkin-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.checkin-opt span { display: grid; place-items: center; min-height: 46px; padding: 6px; border-radius: 12px; border: 1px solid var(--lilac); background: var(--white);
  font-weight: 600; color: var(--purple); transition: background .15s, border-color .15s; }
.checkin-opt input:checked + span { background: var(--purple); border-color: var(--purple); color: var(--white); }
.checkin-opt input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.checkin-ends { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0 !important; font-size: 12.5px; color: var(--grey); }
.checkin-q--comment { display: grid; gap: 8px; }
.checkin-q--comment .checkin-legend { float: none; margin: 0; font-weight: 500; }
.checkin-optional { font-weight: 400; color: var(--grey); }
.checkin-comment { width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--lilac); font: inherit; font-size: 15px; color: var(--ink); background: var(--white); resize: vertical; }
.checkin-comment:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.checkin-alert { margin: 0 !important; padding: 10px 12px; border-radius: 12px; background: #FBECEC; color: #8A1C1C !important; font-size: 14px; }
:root[data-theme="dark"] .more-card--checkin { background: #2E2410; border-color: #6B5514; }
:root[data-theme="dark"] .more-card--checkin :is(.more-title, .more-body) { color: var(--ink); }
:root[data-theme="dark"] .menu-item--checkin { background: #2E2410; border-color: #6B5514; }
:root[data-theme="dark"] .overlay :is(.checkin-opt span, .checkin-comment) { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .overlay .checkin-opt input:checked + span { background: var(--yellow); border-color: var(--yellow); color: #3C1053; }
:root[data-theme="dark"] .overlay .checkin-alert { background: #3A1414; color: #FFB4B4 !important; }

/* D-2026-11-14: the arrival time the recruiter set, on the welcome screen */
.welcome-time { display: flex; align-items: center; gap: 8px; margin: -6px 0 18px; font-size: 15px; line-height: 1.45; font-weight: 500; color: var(--on-dark, #fff); }
.welcome-time svg { width: 20px; height: 20px; flex: none; color: var(--yellow, #FFCB28); }
@media (max-height: 620px) { .welcome-time { margin: -4px 0 10px; font-size: 14px; } }

/* ===================== D-2026-11-14-B: response layer (owner, 14 Nov 2026) =====================
   Feedback the moment of touch, finished within 300 ms; light from above; busy, then a drawn tick.
   Reduced-motion phones keep every state change but lose the movement (see the block at the end). */

/* 01 Press feedback: moves the moment you touch (0 ms in), settles back in 120 ms. */
.btn, .choice, .more-card, .seg-btn, .icon-btn, .menu-btn, .menu-item, .media-toggle, .media-dot, .checkin-scale label { -webkit-tap-highlight-color: transparent; }
.btn, .choice, .more-card, .seg-btn, .icon-btn, .menu-btn, .menu-item, .media-toggle {
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .12s var(--ease);
}
.btn:active:not(:disabled), .seg-btn:active, .icon-btn:active, .menu-btn:active, .media-toggle:active { transform: scale(.97); transition-duration: .15s, .15s, .06s, 0s; }
.choice:active, .more-card:active, .menu-item:active { transform: scale(.985); transition-duration: .15s, .15s, .06s, 0s; }

/* 02–04 The yellow action: an edge that holds 3.5:1 on the light page (#A87C00), lit from above, shadow falls down. */
.btn--primary, .screen--welcome .btn--primary {
  border-color: #A87C00;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 0 #A87C00, 0 8px 16px -8px rgba(37,10,51,.45);
}
.btn--primary:active:not(:disabled) {
  background: #F4BE14; transform: translateY(2px) scale(.985);
  box-shadow: inset 0 2px 4px rgba(60,16,83,.22), 0 0 0 #A87C00, 0 2px 6px -4px rgba(37,10,51,.35);
}

/* 06 Busy, then done: a spinner beside the label, then a tick that draws itself in 300 ms. */
.btn.is-busy, .btn.is-done { pointer-events: none; }
.btn.is-busy:disabled, .btn.is-done:disabled { opacity: 1; }
.btn.is-busy::before, .btn.is-done::before { content: ""; flex: none; width: 18px; height: 18px; }
.btn.is-busy::before { border-radius: 50%; border: 2.2px solid currentColor; border-inline-end-color: transparent; animation: mh-spin .7s linear infinite; }
.btn.is-done::before {
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: mh-draw .3s var(--ease) both;
}
@keyframes mh-spin { to { transform: rotate(360deg); } }
@keyframes mh-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Blurred preview: a 24 px copy of the photo, scaled up soft, until the real one arrives. */
img.has-lqip { background-size: cover; background-position: center; background-repeat: no-repeat; }

@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled), .seg-btn:active, .icon-btn:active, .menu-btn:active, .media-toggle:active, .choice:active, .more-card:active, .menu-item:active, .btn--primary:active:not(:disabled) { transform: none; }
  .btn.is-busy::before { animation: none; border-inline-end-color: currentColor; opacity: .5; }
}

/* Important numbers: the whole row calls. The number is underlined so it reads as a link. */
.links-item--call .links-value { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* ================= Grouped rows (menu, help, final screen) — 14 Nov 2026 =================
   One pattern everywhere: small section label, a rounded card of rows, each row = tinted icon tile + label + value + chevron. */
.sgroup { display: block; margin: 0 0 18px; }
.sgroup-label { margin: 0 0 8px; padding: 0 6px; font: 600 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }
[lang="ar"] .sgroup-label, :root[lang="ar"] .sgroup-label { letter-spacing: 0; text-transform: none; font: 600 14px/1.4 var(--arabic); }
.sgroup-card { border-radius: 18px; background: var(--surface, var(--white)); border: 1px solid var(--lilac); overflow: hidden; box-shadow: 0 1px 0 rgba(60,16,83,.03); }
.sgroup-card > * + * { border-top: 1px solid var(--lilac); }
.srow { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; margin: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--ink); text-align: start; text-decoration: none; font: 500 16px/1.35 var(--sans); cursor: default; }
a.srow, button.srow { cursor: pointer; transition: background-color .15s; }
@media (hover: hover) { a.srow:hover, button.srow:hover { background: rgba(140,91,166,.08); } }
a.srow:active, button.srow:active { background: rgba(140,91,166,.14); }
.srow:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; }
.srow-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--lilac); color: var(--purple); }
.srow-tile svg { width: 20px; height: 20px; }
.srow-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.srow-label { font-weight: 600; overflow-wrap: break-word; }
.srow-sub { font-size: 13.5px; font-weight: 400; line-height: 1.45; color: var(--grey); }
/* F-02 (20 Nov 2026): a long value shrinks and wraps; it can never squeeze the label to one letter per line. */
.srow-text { min-width: 40%; }
.srow-value { flex: 0 1 auto; min-width: 0; max-width: 35%; text-align: end; overflow-wrap: break-word; font-size: 15px; font-weight: 400; color: var(--grey); }
.srow-badge { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--cream); color: #6B4E00; font-size: 12px; font-weight: 600; white-space: nowrap; }
.srow-chev { flex: none; display: grid; place-items: center; color: var(--lavender); }
.srow-chev svg { width: 18px; height: 18px; }
.srow.is-soon { opacity: .8; }
.tone-gold { background: var(--cream); color: #7A5A00; }
.tone-green { background: #DFF3E7; color: #1B6B44; }
.tone-blue { background: #E0ECFA; color: #1F4E8C; }
.tone-violet { background: #EDE3F4; color: #6B3E8A; }
.tone-red { background: #FBE6E6; color: #8A1C1C; }
.tone-purple { background: var(--purple); color: var(--yellow); }
.sgroup-item > .srow { min-height: 52px; padding-bottom: 6px; }
.sgroup-item > .seg { margin: 0 14px 14px; }
:root[lang="ar"] .srow { font: 500 17px/1.5 var(--arabic); }
:root[lang="ar"] .srow-sub, :root[lang="ar"] .srow-value { font-size: 15px; line-height: 1.6; }
:root[lang="ar"] .srow-badge { font-size: 13px; }
/* destructive action stays apart, as in the reference */
.srow--danger { justify-content: center; gap: 10px; min-height: 54px; margin: 0 0 14px; border-radius: 16px; border: 1px solid #F0C9C9; background: var(--surface, var(--white)); color: #B3261E; font-weight: 600; }
.srow--danger .srow-label { text-align: center; }
.srow--danger .srow-tile { width: auto; height: auto; background: none; color: inherit; }
.srow--danger .srow-tile svg { width: 20px; height: 20px; }
@media (hover: hover) { a.srow--danger:hover, button.srow--danger:hover { background: #FDF1F1; } }
.srow--danger.is-armed { background: #B3261E; border-color: #B3261E; color: #fff; }
.srow--danger.is-armed .srow-label { color: #fff; }
.drawer .sgroup:first-of-type { margin-top: 2px; }
.drawer .seg { border-radius: 12px; background: var(--page); }
.drawer .seg-btn[aria-pressed="true"] { background: var(--purple); }
.sheet .sgroup-card .srow { font-size: 16px; }
.sheet .sgroup { margin-bottom: 14px; }
.sheet > h2 + p { margin-bottom: 16px; }
:root[data-theme="dark"] :is(.app, .overlay) .sgroup-card, :root[data-theme="dark"] :is(.app, .overlay) .srow--danger { background: var(--surface); }
:root[data-theme="dark"] .tone-gold { background: #3A2E10; color: #FFD866; }
:root[data-theme="dark"] .tone-green { background: #12301F; color: #7FD6A5; }
:root[data-theme="dark"] .tone-blue { background: #14263F; color: #9CC4F2; }
:root[data-theme="dark"] .tone-violet { background: #2C1B3D; color: #D3A8EC; }
:root[data-theme="dark"] .tone-red { background: #3A1414; color: #FFB4B4; }
:root[data-theme="dark"] .srow-tile:not([class*="tone-"]) { background: #2C1B3D; color: #E5DAEA; }
:root[data-theme="dark"] .srow-badge { background: #3A2E10; color: #FFD866; }
:root[data-theme="dark"] .srow--danger { color: #FFB4B4; border-color: #5A2A2A; }
:root[data-theme="dark"] .srow--danger.is-armed { background: #B3261E; color: #fff; }
:root[data-theme="dark"] .srow-sub { color: var(--grey); }

/* ---- Final screen as a hub: ring, chapter pips, quick access, grouped destinations ---- */
.screen--day1 .more-h { margin: 0 0 14px; font: 700 26px/1.25 var(--display); color: var(--purple); }
[lang="ar"] .screen--day1 .more-h { font-family: var(--arabic); font-size: 26px; }
:root[data-theme="dark"] .screen--day1 .more-h { color: var(--ink); }
.hub-hero { grid-template-columns: 76px 1fr; gap: 16px; align-items: center; padding: 20px; border-radius: 22px; box-shadow: 0 14px 34px rgba(60,16,83,.28); }
.hub-ring { position: relative; width: 76px; height: 76px; display: grid; place-items: center; }
.hub-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .hub-ring svg { transform: rotate(-90deg) scaleY(-1); }
.hub-ring .trk { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 6; }
.hub-ring .bar { fill: none; stroke: var(--yellow); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 188.5; stroke-dashoffset: 188.5; transition: stroke-dashoffset 1.1s var(--ease) .25s; }
.hub-ring-num { position: relative; font: 700 19px/1 var(--display); color: #fff; letter-spacing: .01em; }
.hub-ring-num small { font-size: 12px; font-weight: 500; color: var(--lavender); }
.hub-hero .more-text { min-width: 0; }
.hub-hero .more-title { margin: 0 0 4px; font-size: 18px; }
.hub-hero .more-body { font-size: 14px; }
.hub-hero .more-progress { margin-top: 10px; gap: 8px; }
.more-pips { display: flex; gap: 4px; }
.more-pip { flex: 1 1 0; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); transform-origin: left center; }
[dir="rtl"] .more-pip { transform-origin: right center; }
.more-pip.is-done { background: var(--yellow); }
.hub-hero > .more-cta { grid-column: 1 / -1; margin-top: 4px; min-height: 52px; }
.hub-hero > .more-cta svg { transition: translate .2s var(--ease); }
@media (hover: hover) { .hub-hero > .more-cta:hover svg { translate: 4px 0; } [dir="rtl"] .hub-hero > .more-cta:hover svg { translate: -4px 0; } }
.hub-chips { display: flex; gap: 10px; margin: 0 -2px 18px; padding: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.hub-chips::-webkit-scrollbar { display: none; }
.hub-chip { flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface, var(--white)); border: 1px solid var(--lilac);
  color: var(--ink); text-decoration: none; font: 600 14px/1.25 var(--sans); transition: transform .15s var(--ease), background-color .15s; }
[dir="rtl"] .hub-chip { padding: 8px 8px 8px 16px; }
.hub-chip:active { transform: scale(.97); }
@media (hover: hover) { .hub-chip:hover { background: rgba(140,91,166,.1); } }
.hub-chip:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.hub-chip .srow-tile { width: 36px; height: 36px; border-radius: 50%; }
.hub-chip b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.hub-chip span.hc { display: flex; flex-direction: column; }
.hub-chip small { font-size: 12px; font-weight: 500; color: var(--grey); }
:root[lang="ar"] .hub-chip { font-family: var(--arabic); font-size: 15px; }
:root[lang="ar"] .hub-chip small { font-size: 13px; }
.screen--day1 .buddy-card { margin-bottom: 18px; }
.hub-in { opacity: 0; translate: 0 14px; animation: hub-in .5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes hub-in { to { opacity: 1; translate: 0 0; } }
.hub-ready .hub-ring .bar { stroke-dashoffset: var(--off, 188.5); }
.more-pip { opacity: 0; animation: hub-pip .3s var(--ease) forwards; animation-delay: calc(.35s + var(--p, 0) * 60ms); }
@keyframes hub-pip { from { opacity: 0; transform: scaleX(.3); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hub-in, .more-pip { animation: none; opacity: 1; translate: none; }
  .hub-ring .bar { transition: none; }
}
.srow.menu-item:not(.srow--danger) { border: 0; border-radius: 0; background: transparent; min-height: 60px; padding: 10px 16px; font-weight: 500; }
.srow.menu-item--checkin:not(.srow--danger) { background: var(--cream); }
.sgroup-card > .srow.is-soon { opacity: .8; }
.srow > .srow-tile, .srow > .srow-badge, .srow > .srow-chev, .srow > .srow-value { flex: none; }
.srow > .srow-text { flex: 1 1 auto; }
.hub-hero { margin-bottom: 22px; }
.hub-chip .hc { min-width: 0; }
.hub-chip { max-width: 250px; }
.hub-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-quick { margin-bottom: 4px; }
.more-card--hero .more-progress-label { color: #FFF1C9; }
:root[data-theme="dark"] .screen--day1 .closing { color: var(--ink); }
:root[data-theme="dark"] .screen--day1 .day1-body .btn--outline { color: var(--ink); border-color: rgba(241,234,246,.5); }
.srow-sub { font-size: 14px; }
:root[lang="ar"] .srow-sub { font-size: 16px; }
:root[lang="ar"] .srow-badge, :root[lang="ar"] .hub-chip small { font-size: 14px; }
.more-progress-label { font-size: 14px; }
:root[lang="ar"] .more-progress-label { font-size: 16px; }

/* ================= Home: the menu every journey returns to (15 Nov 2026) ================= */
.screen--home { display: flex; flex-direction: column; min-height: 100%; }
.home-body { flex: 1; display: flex; flex-direction: column; }
.home-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); }
[lang="ar"] .home-kicker, :root[lang="ar"] .home-kicker { letter-spacing: 0; text-transform: none; font-size: 15px; }
.home-title { margin: 0 0 20px; font: 700 27px/1.25 var(--display); color: var(--purple); }
:root[lang="ar"] .home-title { font-family: var(--arabic); font-size: 26px; line-height: 1.45; }
:root[data-theme="dark"] .home-title { color: var(--ink); }
.icon-btn--home { margin-inline-start: 0; color: var(--purple); border: 1px solid var(--lilac); background: var(--white); }
.icon-btn--home svg { width: 21px; height: 21px; }
@media (hover: hover) { .icon-btn--home:hover { background: var(--lilac); } }
:root[data-theme="dark"] .icon-btn--home { color: var(--ink); background: var(--surface); border-color: var(--lilac); }
.topbar--on-photo .icon-btn--home, .icon-btn--home.menu-btn--photo { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(37,10,51,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* The arrival guide is the one hero on the menu: it is the reason Maher exists. */
.arrival-card { margin-bottom: 22px; grid-template-columns: 56px 1fr; }
.arrival-icon { width: 56px; height: 56px; }
.arrival-icon svg:not(.penta) { width: 26px; height: 26px; }
.arrival-kicker { color: var(--yellow); margin-bottom: 2px; }
.arrival-card .more-title { font-size: 20px; }
.arrival-card .more-cta { min-height: 52px; }
.arrival-done { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.arrival-done svg { width: 18px; height: 18px; flex: none; color: var(--yellow); }

/* On the menu the onboarding card steps down a level, so one hero leads. */
.more--home .more-h { margin-top: 2px; }
.more--home .more-card--hero:not(.arrival-card) { background: var(--surface, var(--white)); border: 1px solid var(--lilac); color: var(--ink); box-shadow: 0 6px 22px rgba(60,16,83,.07); }
.more--home .more-card--hero:not(.arrival-card) .more-title { color: var(--purple); }
.more--home .more-card--hero:not(.arrival-card) .more-body { color: var(--grey); }
.more--home .more-card--hero:not(.arrival-card) .more-progress-label { color: var(--grey); }
.more--home .more-card--hero:not(.arrival-card) .hub-ring .trk { stroke: var(--lilac); }
.more--home .more-card--hero:not(.arrival-card) .hub-ring .bar { stroke: var(--violet); }
.more--home .more-card--hero:not(.arrival-card) .hub-ring-num { color: var(--purple); }
.more--home .more-card--hero:not(.arrival-card) .hub-ring-num small { color: var(--grey); }
.more--home .more-card--hero:not(.arrival-card) .more-pip { background: var(--lilac); }
.more--home .more-card--hero:not(.arrival-card) .more-pip.is-done { background: var(--violet); }
.more--home .more-card--hero:not(.arrival-card) .more-icon { color: var(--purple); }
.more--home .more-card--hero:not(.arrival-card) .more-icon .penta { color: var(--lilac); }
.more--home .more-card--hero:not(.arrival-card) .btn--primary { background: var(--purple); color: #fff; }
@media (hover: hover) { .more--home .more-card--hero:not(.arrival-card) .btn--primary:hover { background: var(--purple-2); } }
:root[data-theme="dark"] .more--home .more-card--hero:not(.arrival-card) { box-shadow: none; }
:root[data-theme="dark"] .more--home .more-card--hero:not(.arrival-card) :is(.more-title, .hub-ring-num) { color: var(--ink); }
:root[data-theme="dark"] .more--home .more-card--hero:not(.arrival-card) .btn--primary { background: var(--yellow); color: var(--purple); }

/* First-day screen: it ends by handing the joiner back to the menu. */
.screen--day1 .day1-body .btn--primary svg { width: 20px; height: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-inline-start: auto; }
.topbar-actions .icon-btn, .topbar-actions .menu-btn { margin-inline-start: 0; }
.screen--day1 .day1-body .btn--primary { gap: 10px; }
/* The wordmark stays centred with two controls at the end: the start slot matches their width,
   and gives that width back under 360px (200% zoom), where nothing can be both centred and visible. */
.topbar:has(.topbar-actions .icon-btn--home) { grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; }
.topbar .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 360px) {
  .topbar:has(.topbar-actions .icon-btn--home) { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .topbar:has(.topbar-actions .icon-btn--home) > .topbar-slot, .topbar:has(.topbar-actions .icon-btn--home) > .icon-btn:not(.icon-btn--home) { justify-self: start; }
}
.hub-in.is-shown { opacity: 1; translate: none; animation: none; }
.day1-closing { margin: 14px 0 0; font: 600 18px/1.4 var(--display); color: var(--yellow); }
:root[lang="ar"] .day1-closing { font-family: var(--arabic); font-size: 18px; line-height: 1.6; }
/* One row, one treatment: back, home and menu all read as the same control. */
.topbar:not(.topbar--hero):not(.topbar--on-photo) > .icon-btn:not(.icon-btn--home) {
  color: var(--purple); border: 1px solid var(--lilac); background: var(--white); border-radius: 50%; }
@media (hover: hover) { .topbar:not(.topbar--hero):not(.topbar--on-photo) > .icon-btn:not(.icon-btn--home):hover { background: var(--lilac); } }
:root[data-theme="dark"] .topbar:not(.topbar--hero):not(.topbar--on-photo) > .icon-btn:not(.icon-btn--home) { color: var(--ink); background: var(--surface); border-color: var(--lilac); }

/* ================= The menu's tiles (owner, 15 Nov 2026) =================
   One hero, then equal-weight tiles. No section headings: the layout says what the words used to. */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 148px; padding: 16px;
  border-radius: 20px; border: 1px solid var(--lilac); background: var(--surface, var(--white)); color: var(--ink);
  text-align: start; text-decoration: none; font: inherit; cursor: pointer; overflow: hidden;
  box-shadow: 0 6px 20px rgba(60,16,83,.06); transition: transform .15s var(--ease), background-color .15s; }
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { background: rgba(140,91,166,.07); } }
.tile:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.tile--wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.tile-icon { width: 44px; height: 44px; border-radius: 14px; }
.tile-icon svg { width: 24px; height: 24px; }
.tile-text { display: flex; flex-direction: column; gap: 3px; margin-top: auto; min-width: 0; }
.tile--wide .tile-text { margin-top: 0; flex: 1; }
.tile-label { font: 600 16px/1.3 var(--display); color: var(--purple); overflow-wrap: anywhere; }
.tile-sub { font-size: 13.5px; line-height: 1.4; color: var(--grey); }
.tile-badge { position: absolute; top: 14px; inset-inline-end: 14px; padding: 3px 9px; border-radius: 999px;
  background: var(--cream); color: #6B4E00; font: 600 12px/1.4 var(--sans); }
.tile.is-soon { opacity: .85; }
.tile.is-soon .tile-label { color: var(--grey); }
:root[lang="ar"] .tile-label { font-family: var(--arabic); font-size: 17px; line-height: 1.5; }
:root[lang="ar"] .tile-sub { font-size: 15px; line-height: 1.55; }
:root[lang="ar"] .tile-badge { font-size: 13px; }
:root[data-theme="dark"] .tile { background: var(--surface); box-shadow: none; }
:root[data-theme="dark"] .tile-label { color: var(--ink); }
:root[data-theme="dark"] .tile-badge { background: #3A2E10; color: #FFD866; }

/* onboarding ring, sized for a tile */
.tile-ring { position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.tile-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .tile-ring svg { transform: rotate(-90deg) scaleY(-1); }
.tile-ring .trk { fill: none; stroke: var(--lilac); stroke-width: 4; }
.tile-ring .bar { fill: none; stroke: var(--violet); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset 1s var(--ease) .3s; }
.hub-ready .tile-ring .bar { stroke-dashoffset: var(--off, 113.1); }
.tile-ring-num { position: relative; font: 700 14px/1 var(--display); color: var(--purple); }
.tile-ring-num small { font-size: 10px; font-weight: 500; color: var(--grey); }
:root[data-theme="dark"] .tile-ring-num { color: var(--ink); }
.tile--checkin { background: var(--cream); border-color: #F3D77E; }
:root[data-theme="dark"] .tile--checkin { background: #2E2410; border-color: #6B5514; }
.tile--checkin .tile-label { color: var(--purple); }
:root[data-theme="dark"] .tile--checkin .tile-label { color: var(--ink); }
.tile-avatar { width: 46px; height: 44px; flex: none; }
.tile-avatar .buddy-initials { font-size: 16px; }

/* one tap to a voice */
.calls { display: flex; gap: 14px; margin: 0 0 20px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.calls::-webkit-scrollbar { display: none; }
.call { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; text-decoration: none; color: var(--ink); }
.call-dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.call-dot svg { width: 22px; height: 22px; }
.call:active .call-dot { transform: scale(.94); }
.call-label { font: 600 12.5px/1.3 var(--sans); color: var(--grey); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
:root[lang="ar"] .call-label { font-family: var(--arabic); font-size: 13.5px; }

/* strict icon grid, for comparison: three per row, glyph and label only */
.tiles--icons { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
.tiles--icons .tile { min-height: 0; align-items: center; gap: 8px; padding: 0; border: 0; background: none; box-shadow: none; }
.tiles--icons .tile--wide { grid-column: 1 / -1; flex-direction: column; }
.tiles--icons .tile-icon, .tiles--icons .tile-avatar { width: 64px; height: 64px; border-radius: 18px; }
.tiles--icons .tile-icon svg { width: 30px; height: 30px; }
.tiles--icons .tile-text { margin-top: 0; align-items: center; }
.tiles--icons .tile-label { font-size: 12.5px; font-weight: 500; text-align: center; line-height: 1.25; }
:root[lang="ar"] .tiles--icons .tile-label { font-size: 13.5px; }
.tiles--icons .tile-badge { top: -4px; inset-inline-end: 8px; }
@media (hover: hover) { .tiles--icons .tile:hover { background: none; } }
.tiles--icons .tile:hover .tile-icon { filter: brightness(1.06); }
.tile-badge--inline { position: static; align-self: flex-start; margin-top: -2px; }
.tile--tour.is-soon .tile-text { margin-top: auto; }
.call { width: 72px; }
.call-num { font: 500 11.5px/1.2 var(--sans); color: var(--lavender); }
:root[lang="ar"] .call-num { font-family: var(--arabic); font-size: 12.5px; }
:root[data-theme="dark"] .call-num { color: var(--grey); }
.call-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-height: 2.7em; }
:root[lang="ar"] .tile-badge { font-size: 14px; }
:root[lang="ar"] .call-label { font-size: 14px; }
:root[lang="ar"] .call-num { font-size: 13px; }
.tile-sub { font-size: 14px; }
:root[lang="ar"] .tile-sub { font-size: 16px; }
.call-num { font-size: 12px; }
.call { width: 84px; }
.call-label { text-overflow: clip; }

/* ================= Maher as an assistant: header, journey, tabs (owner, 15 Nov 2026) ================= */
.screen--home, .screen--journey { padding: 0; display: flex; flex-direction: column; min-height: 100%; }
.hhead { background: var(--hero); color: #fff; padding: calc(env(safe-area-inset-top) + 14px) var(--pad) 22px;
  /* 18 Nov 2026 (owner): square edge — the header runs the full width of the screen. */
  border-end-start-radius: 0; border-end-end-radius: 0; }
.hhead-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand--assistant { flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; }
.brand--assistant .brand-key { margin-top: 2px; }
.brand--assistant .brand-name { display: block; font-size: 20px; }
.brand-sub { display: block; margin-top: 2px; font: 500 12px/1.3 var(--sans); color: var(--lavender); }
:root[lang="ar"] .brand-sub { font-family: var(--arabic); font-size: 13px; }
.hhead .menu-btn { color: #fff; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); }
@media (hover: hover) { .hhead .menu-btn:hover { background: rgba(255,255,255,.2); } }
.hhead-greet { margin: 0 0 2px; font: 600 15px/1.4 var(--sans); color: var(--cream); }
:root[lang="ar"] .hhead-greet { font-family: var(--arabic); font-size: 16px; }
.hhead-title { margin: 0 0 16px; font: 700 26px/1.25 var(--display); color: #fff; }
:root[lang="ar"] .hhead-title { font-family: var(--arabic); font-size: 26px; line-height: 1.45; }
.askbar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 16px;
  border: 0; border-radius: 999px; background: #fff; color: var(--grey); font: 500 15px/1.3 var(--sans); text-align: start;
  box-shadow: 0 8px 22px rgba(20,4,30,.22); }
:root[lang="ar"] .askbar { font-family: var(--arabic); font-size: 16px; }
.askbar:active { transform: scale(.985); }
.askbar-spark { color: var(--violet); display: grid; place-items: center; flex: none; }
.askbar-spark svg { width: 22px; height: 22px; }
.askbar-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.askbar-go { color: var(--purple); display: grid; place-items: center; flex: none; }
.askbar-go svg { width: 20px; height: 20px; }
.home-body--app { padding: 20px var(--pad) 0; gap: 0; }
.screen--journey .home-body { padding: 0 var(--pad); }
.screen--home .home-body > *, .screen--journey .home-body > * { margin-bottom: 16px; }
.card-plain { padding: 16px; border-radius: 20px; background: var(--surface, var(--white)); border: 1px solid var(--lilac); box-shadow: 0 6px 20px rgba(60,16,83,.06); }
:root[data-theme="dark"] .card-plain { background: var(--surface); box-shadow: none; }
.hsec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hsec-title { margin: 0; font: 700 18px/1.3 var(--display); color: var(--purple); }
:root[lang="ar"] .hsec-title { font-family: var(--arabic); font-size: 19px; }
:root[data-theme="dark"] .hsec-title { color: var(--ink); }
.hsec-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 0; background: none; color: var(--violet); font: 600 14px/1.3 var(--sans); }
:root[lang="ar"] .hsec-link { font-family: var(--arabic); font-size: 15px; }
.hsec-link svg { width: 16px; height: 16px; }

/* the five stages */
.rail { list-style: none; margin: 0; padding: 0; }
.rail--compact { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; }
.rail--compact .rail-step { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; }
.rail--compact .rail-step::before { content: ""; position: absolute; top: 13px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--lilac); }
.rail--compact .rail-step:first-child::before { display: none; }
.rail--compact .rail-step.is-done::before, .rail--compact .rail-step.is-now::before { background: var(--violet); }
.rail-dot { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 2px solid var(--lilac); color: #fff; }
.rail-dot svg { width: 14px; height: 14px; }
.is-done .rail-dot { background: var(--purple); border-color: var(--purple); }
.is-now .rail-dot { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 0 4px rgba(140,91,166,.18); }
.is-now .rail-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.rail-label { font: 500 11.5px/1.25 var(--sans); color: var(--grey); }
.rail--compact .is-now .rail-label { font-weight: 700; color: var(--purple); }
:root[lang="ar"] .rail-label { font-family: var(--arabic); font-size: 13px; }
:root[data-theme="dark"] .rail-dot { background: var(--surface); }
:root[data-theme="dark"] .rail--compact .is-now .rail-label { color: var(--ink); }
/* the full list */
.rail:not(.rail--compact) .rail-step { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 14px; padding-bottom: 20px; }
.rail:not(.rail--compact) .rail-step::before { content: ""; position: absolute; inset-inline-start: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--lilac); }
.rail:not(.rail--compact) .rail-step:last-child::before { display: none; }
.rail:not(.rail--compact) .rail-step.is-done::before { background: var(--purple); }
.rail:not(.rail--compact) .rail-label { grid-column: 2; font: 600 16px/1.35 var(--display); color: var(--purple); }
:root[lang="ar"] .rail:not(.rail--compact) .rail-label { font-family: var(--arabic); font-size: 17px; }
:root[data-theme="dark"] .rail:not(.rail--compact) .rail-label { color: var(--ink); }
.rail-body { grid-column: 2; margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--grey); }
:root[lang="ar"] .rail-body { font-size: 16px; line-height: 1.65; }
.rail-state { grid-column: 3; grid-row: 1; align-self: start; padding: 3px 10px; border-radius: 999px; background: var(--lilac); color: var(--purple); font: 600 12px/1.5 var(--sans); }
:root[lang="ar"] .rail-state { font-family: var(--arabic); font-size: 14px; }
.is-now .rail-state { background: var(--purple); color: #fff; }
.is-done .rail-state { background: #DFF3E7; color: #1B6B44; }
:root[data-theme="dark"] .is-done .rail-state { background: #12301F; color: #7FD6A5; }
:root[data-theme="dark"] .rail-state { background: #2C1B3D; color: var(--ink); }

/* onboarding card with its chapters */
.obcard { display: block; text-decoration: none; }
.obtop { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tile-ring--lg { width: 52px; height: 52px; }
.tile-ring--lg .tile-ring-num { font-size: 16px; }
.obtext { font-size: 14px; color: var(--grey); }
:root[lang="ar"] .obtext { font-size: 16px; }
.chlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chrow { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); }
:root[lang="ar"] .chrow { font-size: 16px; }
.chdot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--lilac); display: grid; place-items: center; color: #fff; }
.chdot svg { width: 12px; height: 12px; }
.chrow.is-done .chdot { background: var(--purple); border-color: var(--purple); }
.chrow.is-done .chname { color: var(--grey); text-decoration: line-through; }

/* quick help */
.hsec-quick { margin-bottom: 8px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qtile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--lilac);
  background: var(--surface, var(--white)); color: var(--ink); text-align: start; font: inherit; }
.qtile:active { transform: scale(.97); }
.qtile .srow-tile { width: 38px; height: 38px; flex: none; }
.qtile-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qtile-label { font: 600 14.5px/1.3 var(--display); color: var(--purple); }
.qtile-sub { font-size: 12.5px; line-height: 1.35; color: var(--grey); }
:root[lang="ar"] .qtile-label { font-family: var(--arabic); font-size: 16px; }
:root[lang="ar"] .qtile-sub { font-size: 14px; }
:root[data-theme="dark"] .qtile { background: var(--surface); }
:root[data-theme="dark"] .qtile-label { color: var(--ink); }
.tiles--pair { margin-bottom: 0; }

/* the tab bar */
.tabbar { position: sticky; bottom: 0; z-index: 3; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  gap: 4px; margin-top: auto; padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px);
  background: color-mix(in srgb, var(--page) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--lilac); }
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .tabbar { background: var(--page); } }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 6px 2px;
  border: 0; background: none; color: var(--grey); font: inherit; }
.tab-icon { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 999px; }
.tab-icon svg { width: 22px; height: 22px; }
.tab-label { font: 500 11px/1.2 var(--sans); }
:root[lang="ar"] .tab-label { font-family: var(--arabic); font-size: 12.5px; }
.tab.is-on { color: var(--purple); }
.tab.is-on .tab-icon { background: var(--lilac); }
.tab.is-on .tab-label { font-weight: 700; }
:root[data-theme="dark"] .tab.is-on { color: var(--ink); }
.tab--ask { margin-top: -22px; }
.tab-ask { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--hero); color: var(--yellow);
  box-shadow: 0 10px 24px rgba(60,16,83,.35); }
.tab-ask svg { width: 26px; height: 26px; }
.tab--ask:active .tab-ask { transform: scale(.94); }
.screen--home .home-body, .screen--journey .home-body { padding-bottom: 8px; }

/* Ask Maher */
.sheet--ask { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.ask-form { position: relative; display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--lilac); background: var(--surface, var(--white)); }
.ask-icon { color: var(--violet); display: grid; place-items: center; }
.ask-icon svg { width: 20px; height: 20px; }
.ask-input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: none; color: var(--ink); font: 500 16px/1.3 var(--sans); }
:root[lang="ar"] .ask-input { font-family: var(--arabic); font-size: 17px; }
.ask-input:focus { outline: none; }
.ask-form:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(60,16,83,.12); }
.ask-results { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.ask-hint, .ask-count { margin: 0 0 10px; font-size: 14px; color: var(--grey); }
:root[lang="ar"] .ask-hint, :root[lang="ar"] .ask-count { font-size: 16px; }
.ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ask-row { border: 1px solid var(--lilac); border-radius: 16px; background: var(--surface, var(--white)); }
.ask-empty { padding: 18px 4px 6px; text-align: center; }
.ask-empty-t { margin: 0 0 6px; font: 600 17px/1.35 var(--display); color: var(--purple); }
.ask-empty-b { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--grey); }
:root[lang="ar"] .ask-empty-t { font-family: var(--arabic); }
:root[lang="ar"] .ask-empty-b { font-size: 16px; }
:root[data-theme="dark"] .ask-empty-t { color: var(--ink); }
:root[data-theme="dark"] :is(.ask-form, .ask-row) { background: var(--surface); }
.screen--home .home-body > *:last-child, .screen--journey .home-body > *:last-child { margin-bottom: 20px; }
.brand--assistant .brand-sub { line-height: 1.25; max-width: 190px; }
/* Short viewports (landscape, 200% zoom): the bar stops floating so it can never cover an action. */
@media (max-height: 520px) { .tabbar { position: static; } }
/* Very narrow (200% zoom on a small phone): the hero stacks and its action wraps, so nothing runs off the side. */
@media (max-width: 340px) {
  .hub-hero, .arrival-card { grid-template-columns: 1fr; }
  .hub-hero .more-icon, .arrival-card .arrival-icon { width: 44px; height: 44px; }
  .hub-hero > .more-cta, .arrival-card > .more-cta { white-space: normal; min-width: 0; }
  .qgrid, .tiles { grid-template-columns: 1fr; }
}
.more-cta { min-width: 0; }
/* Five stages cannot fit a 195px screen: the rail scrolls inside its card instead of pushing the page sideways. */
.rail--compact { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail--compact::-webkit-scrollbar { display: none; }
.rail--compact .rail-step { min-width: 58px; }
.tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { min-width: 0; }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 300px) { .tab-label { display: none; } .tab { min-height: 44px; } }
/* Type floor: the new chrome meets the same minimums as everything else. */
.rail-label { font-size: 12px; }
:root[lang="ar"] .rail-label { font-size: 14px; }
.tab-label { font-size: 12px; }
:root[lang="ar"] .tab-label { font-size: 14px; }
.brand-sub { font-size: 12px; }
:root[lang="ar"] .brand-sub { font-size: 14px; }
.qtile-sub { font-size: 14px; line-height: 1.4; }
:root[lang="ar"] .qtile-sub { font-size: 16px; line-height: 1.5; }
/* Dark mode, second pass (owner, 15 Nov 2026): the assistant header and the ask field keep their contrast. */
.hhead-greet { color: #FFE9A8; }
:root[data-theme="dark"] .askbar { background: var(--surface); border: 1px solid var(--lilac); color: var(--grey); box-shadow: 0 8px 22px rgba(0,0,0,.45); }
:root[data-theme="dark"] .askbar-go { color: var(--ink); }
:root[data-theme="dark"] body { background: #0B0510; }
:root[data-theme="dark"] :is(.links-group-title, .links-value, .links-badge, .links-name, .btn--outline) { color: var(--ink); }
:root[data-theme="dark"] .links-item--call .links-value { color: #FFD866; }

/* Typing with the keyboard up (owner, on an iPhone, 16 Nov 2026): the sheet lives inside the visible area,
   the field stays pinned at the top of the sheet, and the results scroll under it. */
.overlay { height: 100%; }
.sheet { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.sheet--ask { max-height: 100%; }
.sheet--ask > h2, .sheet--ask > .sheet-grip { flex: none; }
.sheet--ask .ask-form { position: sticky; top: 0; z-index: 1; flex: none; background: var(--page); }
.sheet--ask .ask-form::before { content: ""; position: absolute; inset-inline: -4px; top: -10px; height: 10px; background: var(--page); }
.overlay--menu .drawer { height: 100%; }

/* ================= Toolkit: a folder of apps, not a list of links (owner brief, 17 Nov 2026) ================= */
.screen--toolkit { padding: 0; display: flex; flex-direction: column; min-height: 100%; }
.tk-head { position: sticky; top: 0; z-index: 4; background: var(--page); border-bottom: 1px solid var(--lilac);
  padding: calc(env(safe-area-inset-top) + 10px) max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
.tk-head-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.tk-head .brand { margin: 0; flex: none; }
.tk-head .brand-name { font-size: 17px; }
.tk-h1 { flex: 1; margin: 0; font: 700 20px/1.2 var(--display); color: var(--purple); text-align: center; }
:root[lang="ar"] .tk-h1 { font-family: var(--arabic); font-size: 20px; }
:root[data-theme="dark"] .tk-h1 { color: var(--ink); }
.tk-logo { flex: none; height: 26px; width: auto; }
.tk-chips { display: flex; gap: 8px; margin: 10px -16px 0; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tk-chips::-webkit-scrollbar { display: none; }
.tk-chip { flex: 0 0 auto; min-height: 34px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--lilac);
  background: var(--surface, var(--white)); color: var(--grey); font: 600 13px/1.3 var(--sans); white-space: nowrap; }
:root[lang="ar"] .tk-chip { font-family: var(--arabic); font-size: 14px; }
.tk-chip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
:root[data-theme="dark"] .tk-chip { background: var(--surface); }
:root[data-theme="dark"] .tk-chip.is-on { background: var(--violet); border-color: var(--violet); color: #1A1024; }
.tk-body { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left)) 8px max(16px, env(safe-area-inset-right)); }
.tk-group { scroll-margin-top: 118px; margin-bottom: 26px; }
.tk-title { margin: 0 0 14px; font: 700 15px/1.3 var(--sans); letter-spacing: .02em; color: var(--purple); }
:root[lang="ar"] .tk-title { font-family: var(--arabic); font-size: 16px; }
:root[data-theme="dark"] .tk-title { color: var(--ink); }
.tk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; }
@media (max-width: 330px) { .tk-grid { grid-template-columns: repeat(3, 1fr); } }
.bt { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 44px; text-decoration: none; color: var(--ink);
  transition: transform .14s var(--ease); }
.bt:active { transform: scale(.94); }
.bt:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; border-radius: 18px; }
.bt-art { position: relative; width: 60px; height: 60px; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  background: var(--lilac); color: var(--purple); box-shadow: 0 2px 8px rgba(60,16,83,.10); }
.bt-fallback { font: 700 20px/1 var(--display); letter-spacing: .02em; }
.bt-art.has-img .bt-fallback { display: none; }
.bt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bt-name { max-width: 100%; font: 500 11.5px/1.25 var(--sans); color: var(--grey); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[lang="ar"] .bt-name { font-family: var(--arabic); font-size: 13px; }
:root[data-theme="dark"] .bt-art { background: #2C1B3D; color: var(--ink); box-shadow: none; }
.tk-calls { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tk-calls::-webkit-scrollbar { display: none; }
.call--tk .call-dot { width: 58px; height: 58px; }
.call--911 .call-dot { background: #B3261E; color: #fff; }
.call--911 .call-label { color: #B3261E; font-weight: 700; }
:root[data-theme="dark"] .call--911 .call-label { color: #FFB4B4; }
.tk-foot { margin: 6px 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--grey); text-align: center; }
:root[lang="ar"] .tk-foot { font-size: 14px; }
.tk-logo-wrap { flex: none; line-height: 0; }
.tk-logo { height: 24px; width: auto; }
.tk-logo--dark { display: none; }
:root[data-theme="dark"] .tk-logo--light { display: none; }
:root[data-theme="dark"] .tk-logo--dark { display: inline; }
/* two lines are better than an ellipsis that hides which app it is */
.bt-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em; }
/* The brief: the ALJUF mark sits top-right in both languages, so this row keeps one order. */
.tk-head-row { direction: ltr; }
[dir="rtl"] .tk-h1, [dir="rtl"] .tk-chips { direction: rtl; }
.tk-title { line-height: 1.4; }
.bt-name { font-size: 12px; }
:root[lang="ar"] .bt-name { font-size: 14px; }
.call-num { color: var(--grey); }

/* ================= Explore your workplace: the tour inside Maher (owner, 17 Nov 2026) ================= */
.screen--tour { display: flex; flex-direction: column; min-height: 100%; }
.tour-h1 { margin: 0 0 14px; font: 700 24px/1.25 var(--display); color: var(--purple); }
:root[lang="ar"] .tour-h1 { font-family: var(--arabic); font-size: 24px; line-height: 1.45; }
:root[data-theme="dark"] .tour-h1 { color: var(--ink); }
.tour-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tour-frame { width: 100%; flex: 1; min-height: 60vh; min-height: 60dvh; border: 0; border-radius: 16px; background: var(--surface, var(--white)); display: block; }
@media (min-width: 700px) { .tour-frame { min-height: 70vh; min-height: 70dvh; } }
@media (orientation: landscape) and (max-height: 520px) { .tour-frame { min-height: 78vh; min-height: 78dvh; } }
.tour-fallback { display: grid; gap: 14px; place-items: center; padding: 28px 8px; text-align: center; }
.tour-note { margin: 0; font-size: 15px; line-height: 1.5; color: var(--grey); }
:root[lang="ar"] .tour-note { font-size: 16px; }
.tour-hint { margin: 12px 0 calc(env(safe-area-inset-bottom) + 8px); text-align: center; }
.tour-link { font: 600 14px/1.4 var(--sans); color: var(--violet); }
:root[lang="ar"] .tour-link { font-family: var(--arabic); font-size: 15px; }

/* ================= Menu in journey order: done is green, the step in hand pulses (owner, 18 Nov 2026) ================= */
:root { --done: #1B6B44; --done-tint: #DFF3E7; }
:root[data-theme="dark"] { --done: #6FD39C; --done-tint: #12301F; }
/* completed: the dot, the line behind it and its name all read green */
.is-done .rail-dot { background: var(--done); border-color: var(--done); color: #fff; }
:root[data-theme="dark"] .is-done .rail-dot { background: var(--done); border-color: var(--done); color: #0E2418; }
.rail--compact .rail-step.is-done::before, .rail:not(.rail--compact) .rail-step.is-done::before { background: var(--done); }
.rail--compact .is-done .rail-label, .rail:not(.rail--compact) .is-done .rail-label { color: var(--done); }
.is-done .rail-state { background: var(--done-tint); color: var(--done); }
:root[data-theme="dark"] .is-done .rail-state { background: var(--done-tint); color: var(--done); }
/* the step in hand: a slow pulse, so the eye lands on it first */
@keyframes mh-now { 0%, 100% { box-shadow: 0 0 0 4px rgba(140, 91, 166, .20); } 50% { box-shadow: 0 0 0 10px rgba(140, 91, 166, .08); } }
.is-now .rail-dot { animation: mh-now 1.8s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) { .is-now .rail-dot { animation: none; } }
/* chapters already read are green too, for one meaning of "done" across the menu */
.chrow.is-done .chdot { background: var(--done); border-color: var(--done); }
/* the onboarding card says what tapping it does */
.obcta { display: flex; width: 100%; margin-top: 14px; justify-content: center; white-space: normal; }
.obcta svg { order: 2; }
/* icons line up: every card icon sits at the top of its card, and the text starts under it */
.qtile { align-items: flex-start; }
.tiles--pair .tile-text { margin-top: 0; }
.tiles--pair .tile-icon, .tiles--pair .tile-avatar { width: 44px; height: 44px; }

/* ============ One card each for your buddy and the tour; quick help retired (owner, 18 Nov 2026) ============ */
.tiles--stack { grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
.tiles--stack .tile { flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 16px; }
.tiles--stack .tile-text { margin-top: 0; flex: 1; min-width: 0; }
/* one shape for every card icon: a 48px rounded square, the buddy's photo included */
.tiles--stack .tile-icon, .tiles--stack .tile-avatar { width: 48px; height: 48px; border-radius: 14px; flex: none; }
.tiles--stack .tile-icon svg { width: 26px; height: 26px; }
.tiles--stack .tile-avatar { background: var(--yellow); display: grid; place-items: center; overflow: hidden; }
.tiles--stack .tile-avatar .penta { display: none; }
.tiles--stack .tile-avatar .buddy-initials { position: static; padding: 0; font-size: 17px; color: var(--purple); }
.tiles--stack .tile-avatar .buddy-photo { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: none; }
.tiles--stack .tile-label { font-size: 16.5px; }
.tiles--stack .tile-sub { margin-top: 2px; }

/* ================= App shell: the chrome is fixed, only the content between it scrolls (owner, 18 Nov 2026) ================= */
.screen--home, .screen--journey, .screen--toolkit, .screen--tour {
  height: calc(100dvh - var(--offline-h, 0px)); max-height: calc(100dvh - var(--offline-h, 0px));
  min-height: 0; overflow: hidden;
}
/* the one scrolling region on each screen */
.screen--home > .home-body, .screen--journey > .home-body, .screen--toolkit > .tk-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
/* the header, the toolkit's title row and the tab bar never move */
.screen--home > .hhead, .screen--toolkit > .tk-head, .screen--journey > .topbar, .screen--tour > .tour-top { flex: none; }
.tabbar { position: static; flex: none; }
@media (max-height: 520px) { .tabbar { position: static; } }
/* the scrolling region ends above the tab bar, so nothing hides under it */
.screen--home > .home-body, .screen--journey > .home-body { padding-bottom: 12px; }
.tk-body { padding-bottom: 12px; }
/* the tour fills whatever is left between the title and the tab bar */
.screen--tour { padding-bottom: 0; }
.screen--tour .tour-frame { min-height: 0; height: 100%; }
.screen--tour .tour-hint { margin-bottom: 6px; }
/* [hidden] has to win over the grid above it, or the fallback shows beside a working tour */
.tour-fallback[hidden], .tour-hint[hidden] { display: none; }
/* the fixed header lifts off the content scrolling under it */
.hhead { box-shadow: 0 8px 20px rgba(37, 16, 60, .13); }

/* ============ Toolkit in journey order, with designed app icons (owner, 18 Nov 2026) ============ */
.tk-stage { margin: 0 0 10px; }
.tk-stage-title { margin: 22px 0 4px; font: 700 20px/1.3 var(--display); color: var(--purple); }
:root[lang="ar"] .tk-stage-title { font-family: var(--arabic); font-size: 21px; line-height: 1.45; }
:root[data-theme="dark"] .tk-stage-title { color: var(--ink); }
.tk-stage:first-child .tk-stage-title { margin-top: 14px; }
.tk-stage-note { margin: 0 0 6px; font: 400 13.5px/1.5 var(--sans); color: var(--grey); }
:root[lang="ar"] .tk-stage-note { font-family: var(--arabic); font-size: 15px; line-height: 1.7; }
.tk-group .tk-title { margin: 16px 0 10px; font: 600 15px/1.3 var(--display); color: var(--grey); letter-spacing: .01em; }
:root[lang="ar"] .tk-group .tk-title { font-family: var(--arabic); font-size: 16px; }
/* the icon is a designed tile in its group's tone, not a copy of anyone's logo */
.bt-art { background: var(--lilac); color: var(--purple); box-shadow: inset 0 -2px 0 rgba(60,16,83,.10), 0 2px 6px rgba(37,16,60,.10); }
.bt-art--red { background: #FBE6E6; color: #8A1C1C; }
.bt-art--green { background: #DFF3E7; color: #1B6B44; }
.bt-art--blue { background: #E0ECFA; color: #1F4E8C; }
.bt-art--gold { background: var(--cream); color: #7A5A00; }
.bt-art--violet { background: #EDE3F4; color: #6B3E8A; }
.bt-art--purple { background: var(--purple); color: var(--yellow); }
:root[data-theme="dark"] .bt-art--red { background: #3A1414; color: #FFB4B4; }
:root[data-theme="dark"] .bt-art--green { background: #12301F; color: #7FD6A5; }
:root[data-theme="dark"] .bt-art--blue { background: #14263F; color: #9CC4F2; }
:root[data-theme="dark"] .bt-art--gold { background: #3A2E10; color: #FFD866; }
:root[data-theme="dark"] .bt-art--violet { background: #2C1B3D; color: #D3A8EC; }
:root[data-theme="dark"] .bt-art--purple { background: #2C1B3D; color: var(--yellow); }
/* a real logo file fills the tile edge to edge and drops the tint behind it */
.bt-art.has-img { background: #fff; box-shadow: 0 2px 6px rgba(37,16,60,.12); }
/* nine emergency numbers should all be in sight, not behind a sideways swipe */
.tk-calls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; overflow: visible; padding-bottom: 2px; }
.call--tk { min-width: 0; }
.call--tk .call-dot { width: 56px; height: 56px; }
.call--tk .call-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.call--tk .call-num { font-size: 12px; }
:root[lang="ar"] .tk-group .tk-title { line-height: 1.5; }
.tk-group .tk-title { line-height: 1.45; }
:root[lang="ar"] .tk-stage-note { font-size: 16px; }
.tk-stage-note { font-size: 14px; }

/* ============ Header: the Maher lockup reads on two lines, the ask field is gone (owner, 18 Nov 2026) ============ */
.brand--assistant { align-items: center; gap: 12px; }
.brand-lines { display: flex; flex-direction: column; min-width: 0; }
.brand--assistant .brand-key { margin-top: 0; width: 32px; height: 32px; }
.brand--assistant .brand-name { font-size: 21px; line-height: 1.1; }
.brand--assistant .brand-sub { margin-top: 3px; font-size: 12.5px; line-height: 1.35; max-width: 210px; color: #D9CBE4; }
:root[lang="ar"] .brand--assistant .brand-sub { font-size: 13.5px; line-height: 1.5; max-width: 220px; }
.hhead-title { margin-bottom: 0; }
.hhead { padding-bottom: 20px; }
:root[lang="ar"] .brand--assistant .brand-sub { font-size: 14px; }
/* the header is the brand row alone now, so it needs no bottom gap of its own */
.hhead { padding-bottom: 16px; }
.hhead-top { margin-bottom: 0; }

/* ===== Joiner type: the quiet correction line for someone marked as already here (owner, 19 Nov 2026) ===== */
.reloc-ask { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 16px; padding: 0 2px;
  font: 400 14px/1.5 var(--sans); color: var(--grey); }
:root[lang="ar"] .reloc-ask { font-family: var(--arabic); font-size: 15px; line-height: 1.7; }
.reloc-ask-btn { padding: 0; border: 0; background: none; color: var(--violet); font: 600 14px/1.5 var(--sans);
  text-decoration: underline; text-underline-offset: 3px; }
:root[lang="ar"] .reloc-ask-btn { font-family: var(--arabic); font-size: 15px; }
:root[data-theme="dark"] .reloc-ask-btn { color: var(--violet); }

/* ===== Guided relocation stages: what to bring, what to know, the steps in order (owner, 19 Nov 2026) ===== */
.tk-block { margin: 0 0 6px; }
.tk-foot--tight { margin-top: 8px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-row { display: flex; align-items: flex-start; gap: 10px; }
.mini-dot { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lilac); color: var(--purple); }
.mini-dot svg { width: 13px; height: 13px; }
.mini-dot--quiet { background: var(--cream); color: #7A5A00; }
:root[data-theme="dark"] .mini-dot { background: #2C1B3D; color: var(--ink); }
:root[data-theme="dark"] .mini-dot--quiet { background: #3A2E10; color: #FFD866; }
.mini-text { font: 400 14.5px/1.5 var(--sans); color: var(--ink); }
:root[lang="ar"] .mini-text { font-family: var(--arabic); font-size: 16px; line-height: 1.7; }
/* the arrival steps */
.steps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.steps-count { font: 600 13px/1.4 var(--sans); color: var(--violet); white-space: nowrap; }
:root[lang="ar"] .steps-count { font-family: var(--arabic); font-size: 14px; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.step-row { display: flex; align-items: stretch; gap: 6px; }
.step { flex: 1; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px 14px; text-align: start;
  border: 1px solid var(--lilac); border-radius: 16px; background: var(--white); }
:root[data-theme="dark"] .step { background: var(--surface); }
.step:active { transform: scale(.985); }
.step-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lilac); color: var(--purple); font: 700 13px/1 var(--display); }
.step-num svg { width: 15px; height: 15px; }
.step.is-done .step-num { background: var(--done); border-color: var(--done); color: #fff; }
:root[data-theme="dark"] .step.is-done .step-num { color: #0E2418; }
.step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-label { font: 600 15px/1.35 var(--display); color: var(--purple); }
:root[lang="ar"] .step-label { font-family: var(--arabic); font-size: 16px; line-height: 1.5; }
:root[data-theme="dark"] .step-label { color: var(--ink); }
.step.is-done .step-label { color: var(--grey); text-decoration: line-through; }
.step-sub { font: 400 14px/1.55 var(--sans); color: var(--grey); }
:root[lang="ar"] .step-sub { font-family: var(--arabic); font-size: 16px; line-height: 1.65; }
.step.is-done .step-sub { opacity: .7; }
.step-link { flex: none; width: 44px; border: 1px solid var(--lilac); border-radius: 16px; background: var(--white);
  display: grid; place-items: center; color: var(--violet); }
:root[data-theme="dark"] .step-link { background: var(--surface); }
.step-link svg { width: 18px; height: 18px; }
/* the one-time question */
.screen--origin .choices { display: grid; gap: 12px; margin-top: 8px; }
.choice--origin { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: start;
  border: 1px solid var(--lilac); border-radius: 20px; background: var(--white); }
:root[data-theme="dark"] .choice--origin { background: var(--surface); }
.choice--origin .choice-icon { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--lilac); color: var(--purple); }
.choice--origin .choice-icon svg { width: 24px; height: 24px; }
.choice--origin .choice-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.choice--origin .choice-label { font: 600 16px/1.35 var(--display); color: var(--purple); }
:root[lang="ar"] .choice--origin .choice-label { font-family: var(--arabic); font-size: 17px; line-height: 1.5; }
:root[data-theme="dark"] .choice--origin .choice-label { color: var(--ink); }
.choice--origin .choice-sub { font: 400 14px/1.5 var(--sans); color: var(--grey); }
:root[lang="ar"] .choice--origin .choice-sub { font-family: var(--arabic); font-size: 15px; line-height: 1.6; }
.choice--origin .choice-go { flex: none; color: var(--violet); display: grid; place-items: center; }
.choice--origin .choice-go svg { width: 20px; height: 20px; }
.choice--origin.is-suggested { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(140, 91, 166, .14); }
/* one card per step, with the link as an attached action rather than a floating box */
.step-row { gap: 0; border: 1px solid var(--lilac); border-radius: 16px; overflow: hidden; background: var(--white); }
:root[data-theme="dark"] .step-row { background: var(--surface); }
.step, .step-link { border: 0; border-radius: 0; background: none; }
.step-link { width: 52px; border-inline-start: 1px solid var(--lilac); }
.step-row:focus-within { box-shadow: 0 0 0 3px rgba(140, 91, 166, .18); }
.mini-dot--quiet::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.step-label { line-height: 1.45; }
.mini-text { line-height: 1.55; }

/* ===== The 3D tour card carries the building itself (owner, 19 Nov 2026) ===== */
.tile--media { display: block; padding: 0; overflow: hidden; }
.tile-shot-wrap { display: block; aspect-ratio: 16 / 9; background: #0B0611; }
.tile-shot { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile--media .tile-icon { display: none; }
.tile--media .tile-text { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 0; margin: 0; }
.tile-tap { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 16px 14px;
  padding: 10px 14px; border-radius: 12px; background: var(--lilac); color: var(--purple);
  font: 600 14.5px/1.4 var(--sans); }
:root[lang="ar"] .tile-tap { font-family: var(--arabic); font-size: 15.5px; }
:root[data-theme="dark"] .tile-tap { background: #2C1B3D; color: var(--ink); }
.tile-tap-go { display: grid; place-items: center; flex: none; color: var(--violet); }
.tile-tap-go svg { width: 18px; height: 18px; }
@media (hover: hover) { .tile--media:hover .tile-shot { transform: scale(1.02); } }
.tile-shot { transition: transform .3s var(--ease); }


/* ---------- Home: one card system (owner, 20 Nov 2026) ----------
   Every card on home shares one radius (20), one border, one shadow and one inner rhythm.
   The four destinations are equal tiles: a 96px visual, then the name (two lines reserved) and one line of state. */
.screen--home .home-body > * { margin-bottom: 14px; }
.screen--home .more-card { border-radius: 20px; }
.hgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.htile { position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; overflow: hidden; text-align: start;
  font: inherit; color: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background: var(--surface, var(--white));
  border: 1px solid var(--lilac); box-shadow: 0 6px 20px rgba(60,16,83,.06); transition: transform .12s var(--ease, ease), box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.htile:active { transform: scale(.98); }
@media (hover: hover) { .htile:hover { box-shadow: 0 8px 26px rgba(60,16,83,.12); } }
.htile:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.htile[aria-disabled="true"] { cursor: default; }
.htile[aria-disabled="true"] .htile-vis { opacity: .6; }
.htile-vis { flex: none; height: 96px; display: grid; place-items: center; overflow: hidden; }
.htile-vis--photo { background: #0d0a14; }
.htile-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.htile-icon { width: 48px; height: 48px; display: grid; place-items: center; }
.htile-icon svg { width: 32px; height: 32px; }
.htile .tile-ring { width: 64px; height: 64px; }
.htile-avatar { width: 62px; height: 60px; }
.htile-avatar .buddy-initials { font-size: 19px; }
.htile-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.htile-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: calc(2 * 1.3em);
  margin: 0; font: 600 15.5px/1.3 var(--display); color: var(--purple); }
.htile-sub { margin: 0; font-size: 13px; line-height: 1.4; color: var(--grey); }
.htile-badge { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 999px; background: var(--yellow); color: var(--purple);
  font-size: 14px; font-weight: 700; line-height: 1.35; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
:root[lang="ar"] .htile-title { font: 600 16px/1.45 var(--arabic); }
:root[lang="ar"] .htile-sub { font-size: 14px; line-height: 1.5; }
:root[lang="ar"] .htile-badge { font-size: 15px; }
:root[data-theme="dark"] .htile { background: var(--surface); box-shadow: none; border-color: #43305E; }
:root[data-theme="dark"] .htile-title { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .htile { transition: none; } .htile:active { transform: none; } }

/* ---------- Get ready: the three relocation steps after sign-in ---------- */
.screen--prep { padding: 0; display: flex; flex-direction: column;
  height: calc(100dvh - var(--offline-h, 0px)); max-height: calc(100dvh - var(--offline-h, 0px)); min-height: 0; overflow: hidden; }
.prep-head { flex: none; }
.prep-title-row { padding: 4px var(--pad) 12px; }
.prep-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.prep-seg { height: 4px; border-radius: 4px; background: var(--lilac); }
.prep-seg.is-on { background: var(--purple); }
.prep-step { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--grey); }
.prep-title { margin: 0; font: 700 26px/1.2 var(--display); color: var(--purple); }
:root[lang="ar"] .prep-title { font: 700 26px/1.4 var(--arabic); }
:root[lang="ar"] .prep-step { font-size: 14px; }
.prep-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) 16px; }
.prep-foot { flex: none; padding: 12px var(--pad) max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--lilac); background: var(--surface, var(--white)); }
.prep-foot .btn { width: 100%; }
.prep-next svg { order: 2; }
:root[data-theme="dark"] .prep-seg { background: #43305E; }
:root[data-theme="dark"] .prep-seg.is-on { background: var(--yellow); }
:root[data-theme="dark"] .prep-title { color: var(--ink); }
:root[data-theme="dark"] .prep-foot { background: var(--surface); border-color: #43305E; }
body.kb-open .prep-foot { display: none; }
/* 20 Nov 2026 (owner): screen titles sit on one line, no description beneath. */
.screen--origin .h1 { margin: 8px 0 16px; white-space: nowrap; font: 600 clamp(18px, calc((100vw - 2 * var(--pad)) / 13), 26px)/1.25 var(--display); }
:root[lang="ar"] .screen--origin .h1 { font-family: var(--arabic); line-height: 1.5; }

/* 20 Nov 2026 (owner): the journey line runs behind the dots, never across them. */
.rail-dot { z-index: 1; }
.rail--compact .rail-step::before { z-index: 0; }
/* 20 Nov 2026 (owner): the lockup reads as one unit — "Maher" over its descriptor, no orphaned last word. */
.brand--assistant .brand-sub { max-width: none; text-wrap: balance; }
/* 20 Nov 2026 (owner, option A): in light mode the top bar matches the bottom bar — light, with a hairline —
   and purple is kept for the Maher mark, the name and the round Maher button. Dark mode keeps the deep purple. */
:root[data-theme="light"] .hhead { background: var(--page); color: var(--purple); border-bottom: 1px solid var(--lilac); box-shadow: none; }
:root[data-theme="light"] .hhead .brand-name { color: var(--purple); }
:root[data-theme="light"] .hhead .brand-sub { color: var(--grey); }
:root[data-theme="light"] .hhead .menu-btn { color: var(--purple); border-color: var(--lilac); background: var(--white); }
@media (hover: hover) { :root[data-theme="light"] .hhead .menu-btn:hover { background: rgba(140,91,166,.08); } }

/* 20 Nov 2026 (owner): all four home tiles carry a picture. The onboarding progress ring sits on the photo's corner. */
.htile-vis { position: relative; }
.htile .tile-ring.tile-ring--over { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.htile .tile-ring--over .tile-ring-num { font-size: 13px; }
:root[data-theme="dark"] .htile .tile-ring.tile-ring--over { background: var(--surface); }
.buddy-avatar--sheet { width: 72px; height: 70px; margin: 4px auto 10px; }
.buddy-avatar--sheet .buddy-initials { font-size: 22px; }
.sheet--buddy > h2, .sheet--buddy > p { text-align: center; }
/* 20 Nov 2026 (owner): the check-in card is one tappable line. */
.checkin-card { width: 100%; grid-template-columns: 48px 1fr auto; align-items: center; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.checkin-card-title { font: 600 17px/1.3 var(--display); color: var(--purple); }
:root[lang="ar"] .checkin-card-title { font: 600 17px/1.5 var(--arabic); }
.checkin-card-go { display: grid; place-items: center; color: var(--purple); }
.checkin-card-go svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .checkin-card-title, :root[data-theme="dark"] .checkin-card-go { color: var(--ink); }
.checkin-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
/* 21 Nov 2026 (owner, D-2026-11-21-A): touch targets at least 44px — "View all" and the Toolkit stage chips. */
.hsec-link { min-height: 44px; padding: 4px 8px; margin-inline-end: -8px; }
.tk-chip { min-height: 44px; }
