:root {
  --ink-950: #071c2c;
  --navy-900: #0c2940;
  --navy-800: #113a56;
  --navy-700: #174b6b;
  --sky-500: #16a3c7;
  --sky-100: #daf3f8;
  --teal-600: #0b8f72;
  --teal-100: #dff5ef;
  --red-600: #d92f3d;
  --red-500: #e23a47;
  --red-100: #fde8ea;
  --amber-500: #e89a22;
  --amber-100: #fff1d8;
  --cloud-50: #f7f8f8;
  --surface: #ffffff;
  --slate-700: #415966;
  --slate-600: #617580;
  --slate-500: #7d909a;
  --border: #dce5e9;
  --border-soft: #eaf0f2;
  --shadow: 0 24px 70px rgba(7, 28, 44, .16);
  --soft-shadow: 0 14px 35px rgba(7, 28, 44, .09);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Manrope, Inter, "SF Pro Display", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-950);
  background: #dfe8ec;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 17% 14%, rgba(22, 163, 199, .18), transparent 27rem),
    radial-gradient(circle at 87% 90%, rgba(11, 143, 114, .14), transparent 30rem),
    linear-gradient(135deg, #edf3f5 0%, #dce7eb 100%);
  color: var(--ink-950);
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(22, 163, 199, .44);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(340px, 540px);
  align-items: center;
  justify-content: center;
  gap: clamp(64px, 9vw, 150px);
  padding: 40px;
  overflow: hidden;
}

.phone {
  position: relative;
  width: min(100%, 430px);
  height: min(900px, calc(100vh - 48px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 40px;
  background: var(--cloud-50);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(7, 28, 44, .04);
}

.runtime-state {
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--slate-700);
  background: #eef3f4;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
}
.runtime-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-500); box-shadow: 0 0 0 3px rgba(232,154,34,.15); }
.runtime-dot.offline { background: #86a2af; box-shadow: 0 0 0 3px rgba(134,162,175,.15); }
.runtime-dot.live { background: #5bd6cf; box-shadow: 0 0 0 3px rgba(91,214,207,.16); }
.runtime-dot.error { background: var(--red-500); box-shadow: 0 0 0 3px rgba(226,58,71,.16); }

.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(247, 248, 248, .92);
  border-bottom: 1px solid rgba(220, 229, 233, .7);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 8;
}

.brand {
  border: 0;
  padding: 4px 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 48px;
}

.brand-mark {
  position: relative;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--red-500);
  box-shadow: 0 8px 18px rgba(226, 58, 71, .22);
}

.brand-mark::before, .brand-mark::after, .brand-mark span::before, .brand-mark span::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 2px;
}
.brand-mark::before { width: 5px; height: 19px; left: 15px; top: 8px; }
.brand-mark::after { width: 19px; height: 5px; left: 8px; top: 15px; }
.brand-mark span::before { width: 4px; height: 4px; left: -10px; top: -10px; opacity: .55; }
.brand-mark span::after { width: 4px; height: 4px; right: -10px; bottom: -10px; opacity: .55; }

.brand-copy { display: grid; text-align: start; line-height: 1; }
.brand-copy strong { font-size: 15px; letter-spacing: .08em; }
.brand-copy small { margin-top: 4px; color: var(--slate-600); font-size: 11px; font-weight: 700; letter-spacing: .05em; }

.top-actions { display: flex; align-items: center; gap: 7px; }
.icon-button {
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.icon-button:hover { border-color: #bdd0d7; transform: translateY(-1px); }
.icon-button svg { width: 19px; height: 19px; }
.language-button { padding: 0 11px; color: var(--navy-900); font-size: 11px; font-weight: 800; }
.profile-button { border-radius: 50%; }

.screen {
  height: calc(100% - 66px - 82px - var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.screen::-webkit-scrollbar { display: none; }
.view { min-height: 100%; padding: 22px 20px 34px; animation: view-in .22s ease both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--sky-500);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.page-title { margin: 0; font-size: 27px; line-height: 1.16; letter-spacing: -.035em; }
.page-subtitle { margin: 8px 0 0; max-width: 330px; color: var(--slate-600); font-size: 14px; line-height: 1.55; }
.greeting-row, .section-head, .row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head { margin: 24px 2px 12px; }
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.text-button { border: 0; background: none; color: var(--navy-700); font-size: 12px; font-weight: 800; cursor: pointer; padding: 8px 0; }

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: #08745e;
  background: var(--teal-100);
  border: 1px solid #bce6da;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.status-pill svg { width: 16px; height: 16px; stroke-width: 2.2; }

.map-hero {
  position: relative;
  min-height: 250px;
  margin-top: 20px;
  overflow: hidden;
  color: #fff;
  background: var(--navy-900);
  border-radius: var(--radius-xl);
  box-shadow: var(--soft-shadow);
}
.map-canvas { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(145deg, #123e59, #08263a); }
.map-canvas::before {
  content: "";
  position: absolute;
  inset: -25%;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.38) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.38) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: rotate(-12deg);
}
.road { position: absolute; height: 9px; border: 2px solid rgba(255,255,255,.22); border-left: 0; border-right: 0; transform-origin: center; }
.road-a { width: 380px; top: 72px; left: -48px; transform: rotate(-18deg); }
.road-b { width: 300px; top: 155px; left: 96px; transform: rotate(35deg); }
.road-c { width: 240px; top: 90px; left: 170px; transform: rotate(82deg); opacity: .55; }
.map-water { position: absolute; width: 230px; height: 90px; border: 2px solid rgba(22,163,199,.45); border-radius: 50%; right: -100px; bottom: -22px; background: rgba(22,163,199,.13); transform: rotate(-18deg); }
.map-route { position: absolute; width: 120px; height: 72px; border-top: 3px dashed rgba(255,255,255,.72); border-radius: 50%; left: 132px; top: 94px; transform: rotate(-12deg); }
.map-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 15px 15px 15px 4px;
  display: grid;
  place-items: center;
  background: var(--sky-500);
  box-shadow: 0 0 0 9px rgba(22,163,199,.16), 0 12px 24px rgba(0,0,0,.22);
  left: 95px;
  top: 78px;
  transform: rotate(-45deg);
}
.map-pin svg { width: 20px; transform: rotate(45deg); }
.map-overlay { position: relative; z-index: 2; min-height: 250px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, rgba(7,28,44,.04), rgba(7,28,44,.76)); }
.map-top { display: flex; justify-content: flex-end; }
.accuracy-chip { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; }
.map-location { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.map-location p { margin: 0 0 5px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; }
.map-location strong { display: block; max-width: 240px; font-size: 16px; line-height: 1.25; }
.round-action { flex: 0 0 auto; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.2); border-radius: 15px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); }

.emergency-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: -4px;
  padding: 16px 17px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: 0 12px 32px rgba(7,28,44,.07);
}
.emergency-copy { display: flex; gap: 11px; align-items: center; }
.mini-pulse { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: var(--red-500); background: var(--red-100); }
.mini-pulse svg { width: 20px; }
.emergency-copy strong { display: block; font-size: 13px; }
.emergency-copy span { display: block; margin-top: 3px; color: var(--slate-600); font-size: 10px; }
.small-danger { min-height: 42px; padding: 0 15px; border: 0; border-radius: 14px; color: #fff; background: var(--red-600); font-size: 11px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(226,58,71,.2); }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.quick-card {
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: start;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(7,28,44,.07); border-color: #cddde2; }
.quick-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: var(--navy-700); background: #edf4f7; }
.quick-icon.red { color: var(--red-500); background: var(--red-100); }
.quick-icon.teal { color: var(--teal-600); background: var(--teal-100); }
.quick-icon.sky { color: #087e9a; background: var(--sky-100); }
.quick-card strong { display: block; margin-top: 14px; font-size: 13px; }
.quick-card span { display: block; margin-top: 3px; color: var(--slate-600); font-size: 10px; line-height: 1.35; }

.bottom-nav {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(82px + var(--safe-bottom));
  padding: 9px 12px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(255,255,255,.92);
  border-top: 1px solid var(--border-soft);
  backdrop-filter: blur(20px);
}
.bottom-nav button { position: relative; height: 58px; border: 0; background: transparent; color: var(--slate-500); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 15px; font-size: 9px; font-weight: 750; cursor: pointer; transition: color .16s ease, transform .16s ease; }
.bottom-nav button svg { width: 21px; height: 21px; }
.bottom-nav button[aria-current="page"] { color: var(--navy-900); }
.bottom-nav button[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; width: 20px; height: 3px; border-radius: 999px; background: var(--teal-600); }
.bottom-nav button:active { transform: scale(.96); }
.bottom-nav .nav-sos { color: var(--red-500); gap: 2px; transform: translateY(-11px); }
.bottom-nav .nav-sos::after { display: none; }
.nav-sos-core { width: 54px; height: 54px; border-radius: 20px; color: #fff; background: linear-gradient(145deg, #ef4451, #d92f3d); display: grid; place-items: center; border: 5px solid #fff; box-shadow: 0 10px 24px rgba(226,58,71,.24); }
.nav-sos-core svg { width: 24px !important; height: 24px !important; stroke-width: 2.2; }
.emergency-open .bottom-nav { transform: translateY(110%); }
.emergency-open .screen { height: calc(100% - 66px); }

.presentation-copy { max-width: 520px; align-self: center; }
.presentation-copy .eyebrow { color: var(--navy-700); }
.presentation-copy h1 { margin: 0; max-width: 520px; color: var(--ink-950); font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.065em; }
.presentation-copy > p:not(.eyebrow) { max-width: 470px; margin: 26px 0 0; color: var(--slate-700); font-size: 18px; line-height: 1.65; }
.presentation-points { margin-top: 38px; display: grid; gap: 14px; }
.presentation-points span { display: flex; align-items: center; gap: 13px; color: var(--navy-900); font-size: 13px; font-weight: 750; }
.presentation-points b { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #bed0d7; border-radius: 10px; color: var(--sky-500); font-size: 10px; }

.toast { position: absolute; z-index: 30; left: 20px; right: 20px; bottom: calc(94px + var(--safe-bottom)); padding: 13px 15px; color: #fff; background: rgba(7,28,44,.94); border-radius: 15px; box-shadow: var(--soft-shadow); font-size: 12px; font-weight: 700; text-align: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

/* Shared content cards */
.surface-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); box-shadow: 0 10px 25px rgba(7,28,44,.045); }
.card-link { width: 100%; border: 0; text-align: start; cursor: pointer; }
.card-link:hover { border-color: #c9dbe1; }
.list { display: grid; gap: 10px; }
.list-row { min-height: 80px; padding: 15px 14px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 18px; }
.list-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--navy-700); background: #eef4f6; }
.list-icon svg { width: 20px; height: 20px; }
.list-copy { min-width: 0; flex: 1; }
.list-copy strong { display: block; font-size: 15px; line-height: 1.35; }
.list-copy span { display: block; margin-top: 6px; color: var(--slate-600); font-size: 13px; line-height: 1.5; }
.list-row > svg { width: 18px; color: var(--slate-500); }
.badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; color: var(--navy-700); background: #edf4f7; font-size: 9px; font-weight: 800; }
.badge.success { color: #08745e; background: var(--teal-100); }
.badge.warning { color: #94600d; background: var(--amber-100); }

/* Safety profile */
.profile-hero { position: relative; overflow: hidden; margin-top: 20px; padding: 20px; color: #fff; background: linear-gradient(145deg, var(--navy-900), #144d6c); border-radius: var(--radius-xl); box-shadow: var(--soft-shadow); }
.profile-hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -75px; top: -80px; border: 28px solid rgba(255,255,255,.06); border-radius: 50%; }
.profile-top { position: relative; z-index: 1; display: flex; gap: 13px; align-items: center; }
.avatar { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 19px; display: grid; place-items: center; color: var(--navy-900); background: linear-gradient(135deg, #d9f4f8, #fff); font-size: 18px; font-weight: 850; }
.profile-top h2 { margin: 0; font-size: 18px; }
.profile-top p { margin: 6px 0 0; color: rgba(255,255,255,.76); font-size: 13px; line-height: 1.45; }
.profile-top .badge { margin-top: 8px; font-size: 11px; }
.profile-status { position: relative; z-index: 1; margin-top: 18px; }
.profile-status .row-between { font-size: 12px; line-height: 1.4; font-weight: 750; }
.progress-track { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.progress-fill { height: 100%; width: 82%; border-radius: inherit; background: linear-gradient(90deg, var(--sky-500), #5bd6cf); }
.privacy-note { margin-top: 14px; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.45; }
.privacy-note svg { width: 15px; height: 15px; }
.metric-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric { padding: 13px 10px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 17px; }
.metric strong { display: block; font-size: 17px; line-height: 1.25; letter-spacing: -.03em; }
.metric span { display: block; margin-top: 6px; color: var(--slate-600); font-size: 12px; line-height: 1.45; }

/* Services */
.concierge { margin-top: 20px; padding: 19px; background: linear-gradient(145deg, #0c2940, #164c68); color: #fff; border-radius: var(--radius-xl); box-shadow: var(--soft-shadow); }
.concierge-heading { display: flex; align-items: flex-start; gap: 12px; }
.concierge-icon { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; color: #c8f6ff; background: rgba(22,163,199,.18); border: 1px solid rgba(135,230,247,.22); border-radius: 15px; }
.concierge h2 { margin: 0; font-size: 17px; }
.concierge p { margin: 5px 0 0; color: rgba(255,255,255,.67); font-size: 10px; line-height: 1.45; }
.prompt-form { margin-top: 16px; display: flex; gap: 8px; }
.prompt-input { min-width: 0; flex: 1; min-height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; color: #fff; background: rgba(255,255,255,.09); outline: 0; font-size: 11px; }
.prompt-input::placeholder { color: rgba(255,255,255,.5); }
.prompt-input:focus { border-color: rgba(134,229,247,.68); box-shadow: 0 0 0 3px rgba(22,163,199,.15); }
.prompt-submit { width: 48px; height: 48px; border: 0; border-radius: 15px; display: grid; place-items: center; color: var(--navy-900); background: #fff; cursor: pointer; }
.prompt-submit svg { width: 20px; }
.sample-prompt { margin-top: 10px; border: 0; padding: 0; color: #aee8f2; background: none; font-size: 9px; font-weight: 750; cursor: pointer; text-align: start; }
.recommendation { margin-top: 12px; padding: 15px; background: var(--sky-100); border: 1px solid #b9e7f0; border-radius: 19px; animation: view-in .22s ease both; }
.recommendation .eyebrow { margin-bottom: 4px; color: #087e9a; }
.recommendation h3 { margin: 0; font-size: 14px; }
.recommendation p { margin: 6px 0 0; color: var(--slate-700); font-size: 10px; line-height: 1.45; }
.recommendation-actions { margin-top: 12px; display: flex; gap: 8px; }
.recommendation-meta { margin-top: 10px; color: var(--slate-600); font-size: 9px; font-weight: 750; }
.mini-primary, .mini-secondary { min-height: 38px; padding: 0 13px; border-radius: 12px; font-size: 10px; font-weight: 800; cursor: pointer; }
.mini-primary { border: 0; color: #fff; background: var(--navy-900); }
.mini-secondary { border: 1px solid #b7d5dc; color: var(--navy-900); background: rgba(255,255,255,.6); }
.category-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--slate-700); background: var(--surface); font-size: 10px; font-weight: 750; cursor: pointer; }
.category-chip.active { color: #fff; border-color: var(--navy-900); background: var(--navy-900); }

/* Learning */
.learn-view { padding: 18px 18px 36px; animation-name: learn-view-in; }
@keyframes learn-view-in { from { opacity: 0; } to { opacity: 1; } }
.learn-intro .eyebrow { margin-bottom: 6px; color: #08745e; font-size: 9px; letter-spacing: .1em; }
.learn-intro .page-title { font-size: 29px; }
.learn-intro .page-subtitle { margin-top: 5px; font-size: 13px; }

.learning-hero {
  position: relative;
  min-height: 168px;
  margin-top: 17px;
  padding: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 102px 1fr;
  align-items: center;
  gap: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 15%, rgba(70, 213, 220, .17), transparent 34%),
    linear-gradient(145deg, #061d2e, #0a3348 62%, #0b4e52);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 25px;
  box-shadow: 0 16px 34px rgba(7,28,44,.16);
}
.learning-hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -32px;
  bottom: -55px;
  width: 145px;
  height: 145px;
  border: 1px solid rgba(117,224,213,.16);
  border-radius: 50%;
}
.learning-hero > * { position: relative; z-index: 1; }
.learning-score { display: grid; place-items: center; }
.progress-ring {
  --learning-progress: 68%;
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: conic-gradient(#4bd6dc var(--learning-progress), rgba(255,255,255,.11) 0);
  animation: learning-score-in .45s cubic-bezier(.2,.8,.2,1) both;
}
.progress-ring::before { content: ""; position: absolute; inset: 9px; border-radius: inherit; background: #092b3c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.progress-ring strong, .progress-ring span { position: relative; z-index: 1; }
.progress-ring strong { font-size: 22px; line-height: 1; letter-spacing: -.04em; }
.progress-ring span { margin-top: 4px; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 750; }
@keyframes learning-score-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

.learning-next { min-width: 0; }
.learning-next-label { color: #6fe5dd; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.learning-next h2 { margin: 5px 0 0; font-size: 18px; line-height: 1.2; }
.learning-next p { margin: 5px 0 0; color: rgba(255,255,255,.64); font-size: 11px; line-height: 1.4; }
.learning-continue {
  min-height: 48px;
  margin-top: 14px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-950);
  background: #55dbe0;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(50,208,214,.14);
  transition: transform .14s ease, background .14s ease;
}
.learning-continue svg { width: 17px; height: 17px; }
.learning-continue:active { transform: scale(.97); }

.learn-view .section-head { margin: 21px 2px 10px; }
.learn-view .section-head h2 { font-size: 16px; }
.learn-view .text-button { min-height: 48px; color: #08745e; }
.lesson-list { display: grid; gap: 9px; }
.lesson-card {
  width: 100%;
  min-height: 108px;
  padding: 9px 12px 9px 9px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  color: var(--ink-950);
  background: rgba(255,255,255,.94);
  text-align: start;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(7,28,44,.045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  animation: lesson-in .28s ease both;
}
.lesson-card:nth-child(2) { animation-delay: 45ms; }
.lesson-card:nth-child(3) { animation-delay: 90ms; }
@keyframes lesson-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.lesson-card:active { transform: scale(.985); }
.lesson-card > svg { width: 18px; color: var(--slate-500); }
.lesson-visual {
  position: relative;
  height: 88px;
  margin: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  isolation: isolate;
}
.lesson-visual::before, .lesson-visual::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.lesson-visual::before { width: 74px; height: 74px; inset-inline-end: -28px; top: -22px; background: rgba(255,255,255,.16); }
.lesson-visual::after { width: 44px; height: 44px; inset-inline-start: -14px; bottom: -18px; border: 8px solid rgba(255,255,255,.1); }
.lesson-visual.cpr { background: linear-gradient(150deg, #173e55, #0c7780); }
.lesson-visual.choking { background: linear-gradient(150deg, #166b67, #0a8d78); }
.lesson-visual.responsive { background: linear-gradient(150deg, #38526a, #667d8d); }
.lesson-visual svg { width: 31px; height: 31px; stroke-width: 2.1; }
.lesson-visual-pulse { position: absolute; left: 10px; right: 10px; bottom: 12px; height: 1px; margin: 0; background: rgba(255,255,255,.28); }
.lesson-card-copy { min-width: 0; display: block; }
.lesson-card-copy strong { display: block; font-size: 14px; line-height: 1.25; }
.lesson-card-copy .lesson-meta { display: block; margin-top: 5px; color: var(--slate-600); font-size: 11px; line-height: 1.35; }
.lesson-state { min-height: 17px; margin-top: 9px; display: flex; align-items: center; gap: 8px; }
.lesson-state-label { flex: 0 0 auto; color: #08745e; font-size: 9px; font-weight: 800; }
.lesson-track { width: 68px; height: 5px; margin: 0; overflow: hidden; border-radius: 999px; background: #e7ecee; }
.lesson-track-fill { display: block; height: 100%; margin: 0; border-radius: inherit; background: var(--teal-600); }

.video-rail { display: flex; gap: 9px; overflow-x: auto; padding: 0 1px 4px; scrollbar-width: none; scroll-snap-type: inline mandatory; }
.video-rail::-webkit-scrollbar { display: none; }
.video-card {
  position: relative;
  width: 144px;
  min-width: 144px;
  height: 128px;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 0;
  border-radius: 18px;
  color: #fff;
  text-align: start;
  cursor: pointer;
  scroll-snap-align: start;
  isolation: isolate;
}
.video-card::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(155deg, #1b4b61, #071c2c); }
.video-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 76% 20%, rgba(91,214,207,.46), transparent 30%), linear-gradient(0deg, rgba(7,28,44,.78), transparent 72%); }
.video-card.choking::before { background: linear-gradient(155deg, #187363, #083934); }
.video-card.responsive::before { background: linear-gradient(155deg, #667d8d, #263d51); }
.video-play { position: absolute; top: 11px; inset-inline-start: 11px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.video-play svg { width: 17px; height: 17px; }
.video-card strong { font-size: 12px; line-height: 1.25; }
.video-card > span:last-child { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 9px; line-height: 1.3; }

.course-banner {
  width: 100%;
  min-height: 76px;
  margin-top: 17px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #cfe5e3;
  border-radius: 19px;
  color: var(--ink-950);
  background: #edf7f5;
  text-align: start;
  cursor: pointer;
}
.course-icon, .lesson-sheet-icon { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--teal-600); background: #fff; }
.course-icon svg, .lesson-sheet-icon svg { width: 22px; height: 22px; }
.course-copy { min-width: 0; flex: 1; }
.course-copy strong, .course-copy span { display: block; }
.course-copy strong { font-size: 13px; }
.course-copy span { margin-top: 4px; color: var(--slate-600); font-size: 10px; line-height: 1.35; }
.course-banner > svg { width: 18px; color: var(--slate-500); }

.lesson-sheet {
  position: absolute;
  z-index: 24;
  inset-inline: 12px;
  bottom: calc(94px + var(--safe-bottom));
  max-height: calc(100% - 116px - var(--safe-bottom));
  overflow-y: auto;
  padding: 12px 17px 17px;
  color: var(--ink-950);
  background: rgba(255,255,255,.98);
  border: 1px solid var(--border);
  border-radius: 25px;
  box-shadow: 0 24px 60px rgba(7,28,44,.28);
  animation: sheet-in .24s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.sheet-handle { width: 36px; height: 4px; margin: 0 auto 10px; display: block; border-radius: 999px; background: #d7e0e3; }
.sheet-close { position: absolute; top: 13px; inset-inline-end: 13px; width: 44px; height: 44px; border: 1px solid var(--border-soft); border-radius: 14px; display: grid; place-items: center; color: var(--slate-700); background: #f7f9f9; cursor: pointer; }
.sheet-close svg { width: 18px; height: 18px; }
.lesson-sheet-heading { padding-inline-end: 42px; display: flex; align-items: center; gap: 12px; }
.lesson-sheet-heading .eyebrow { margin-bottom: 3px; font-size: 8px; }
.lesson-sheet-heading h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.lesson-sheet-heading p:last-child { margin: 4px 0 0; color: var(--slate-600); font-size: 10px; }
.lesson-preview-notice { margin-top: 14px; padding: 12px; display: flex; align-items: flex-start; gap: 9px; color: var(--navy-900); background: #eef5f6; border-radius: 15px; }
.lesson-preview-notice svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--teal-600); }
.lesson-preview-notice p { margin: 0; font-size: 10px; line-height: 1.45; }
.lesson-sheet .primary-button { min-height: 50px; }
.scenario-step { margin-top: 14px; }
.scenario-count { margin: 0 0 7px; color: var(--teal-600); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.scenario-step h3 { margin: 0; color: var(--ink-950); font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.scenario-copy { margin: 8px 0 0; color: var(--slate-600); font-size: 11px; line-height: 1.5; }
.scenario-question { margin-top: 15px; display: block; font-size: 12px; }
.scenario-choices { margin-top: 9px; display: grid; gap: 8px; }
.scenario-choice { width: 100%; min-height: 54px; padding: 8px 11px; display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 15px; color: var(--navy-900); background: #fff; text-align: start; cursor: pointer; }
.scenario-choice:hover, .scenario-choice:focus-visible { border-color: var(--teal-600); background: #f2faf8; }
.scenario-choice-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--teal-600); background: var(--teal-100); font-size: 10px; font-weight: 850; }
.scenario-choice > span:nth-child(2) { font-size: 10px; font-weight: 750; line-height: 1.35; }
.scenario-choice > svg { width: 16px; color: var(--slate-500); }
.scenario-selection { margin-top: 14px; padding: 12px; display: grid; grid-template-columns: 30px 1fr; gap: 2px 9px; border-radius: 15px; background: #edf7f5; }
.scenario-selection svg { width: 20px; height: 20px; grid-row: span 2; align-self: center; color: var(--teal-600); }
.scenario-selection span { color: var(--slate-600); font-size: 9px; }
.scenario-selection strong { font-size: 11px; line-height: 1.35; }
.scenario-complete-icon { width: 48px; height: 48px; margin: 2px 0 12px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: var(--teal-600); }
.scenario-complete-icon svg { width: 25px; height: 25px; }

/* Emergency flow */
.sos-view { min-height: 100%; padding: 0; background: #fff; }
.emergency-head { min-height: 90px; padding: 18px 20px; display: flex; align-items: center; gap: 13px; color: #fff; background: var(--ink-950); }
.back-button { width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }
.back-button svg { transform: rotate(180deg); }
[dir="rtl"] .back-button svg { transform: none; }
.emergency-head h1 { margin: 0; font-size: 18px; }
.emergency-head p { margin: 5px 0 0; color: rgba(255,255,255,.6); font-size: 10px; }
.emergency-step { padding: 25px 20px 38px; }
.step-count { margin: 0 0 8px; color: var(--red-600); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.emergency-step h2 { margin: 0; max-width: 330px; font-size: 27px; line-height: 1.15; letter-spacing: -.04em; }
.emergency-step > p { margin: 10px 0 0; color: var(--slate-600); font-size: 13px; line-height: 1.55; }
.voice-panel { margin-top: 26px; min-height: 235px; padding: 22px; display: grid; place-items: center; background: linear-gradient(150deg, #f5f8f9, #eaf2f5); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.voice-orb { position: relative; width: 112px; height: 112px; border: 0; border-radius: 38px; display: grid; place-items: center; color: #fff; background: var(--red-500); cursor: pointer; box-shadow: 0 18px 40px rgba(226,58,71,.28); }
.voice-orb::before, .voice-orb::after { content: ""; position: absolute; inset: -13px; border: 1px solid rgba(226,58,71,.24); border-radius: 45px; }
.voice-orb::after { inset: -25px; opacity: .45; }
.voice-orb svg { width: 38px; height: 38px; stroke-width: 2; }
.voice-orb.listening { background: var(--sky-500); box-shadow: 0 18px 40px rgba(22,163,199,.3); animation: listening 1.3s ease-in-out infinite; }
@keyframes listening { 50% { transform: scale(1.035); } }
.voice-label { margin-top: 18px; color: var(--navy-900); font-size: 12px; font-weight: 850; }
.voice-help { margin-top: 5px; color: var(--slate-600); font-size: 10px; }
.choice-row { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 13px; color: var(--slate-700); background: #fff; font-size: 10px; font-weight: 750; cursor: pointer; }
.call-fallback { width: 100%; min-height: 52px; margin-top: 16px; border: 1px solid var(--border); border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--navy-900); background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.call-fallback svg { width: 19px; }
.summary-card { margin-top: 22px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--soft-shadow); }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-head span { display: flex; align-items: center; gap: 7px; color: var(--teal-600); font-size: 10px; font-weight: 850; }
.summary-head span svg { width: 16px; }
.summary-head button { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; display: grid; place-items: center; background: #fff; cursor: pointer; }
.summary-head button svg { width: 17px; }
.fact-grid { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fact { padding: 13px; border-radius: 15px; background: var(--cloud-50); }
.fact span { display: block; color: var(--slate-600); font-size: 9px; }
.fact strong { display: block; margin-top: 5px; font-size: 12px; line-height: 1.3; }
.location-confirm { margin-top: 11px; padding: 13px; display: flex; align-items: center; gap: 11px; color: var(--navy-900); background: var(--sky-100); border-radius: 16px; }
.location-confirm svg { flex: 0 0 auto; color: #087e9a; }
.location-confirm strong { display: block; font-size: 11px; }
.location-confirm span { display: block; margin-top: 3px; color: var(--slate-600); font-size: 9px; }
.primary-button, .secondary-button { width: 100%; min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 17px; font-size: 12px; font-weight: 850; cursor: pointer; }
.primary-button svg, .secondary-button svg { width: 20px; height: 20px; display: block; flex: none; }
.primary-button span, .secondary-button span { line-height: 1.25; }
.primary-button { margin-top: 16px; border: 0; color: #fff; background: var(--navy-900); box-shadow: 0 12px 25px rgba(12,41,64,.18); }
.primary-button.danger { background: var(--red-600); box-shadow: 0 12px 25px rgba(226,58,71,.22); }
.secondary-button { margin-top: 10px; border: 1px solid var(--border); color: var(--navy-900); background: #fff; }
.dispatched-hero { padding: 22px; color: #fff; background: linear-gradient(145deg, #0c2940, #0b806b); border-radius: var(--radius-xl); }
.dispatched-top { display: flex; align-items: center; gap: 13px; }
.accepted-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 17px; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); }
.accepted-icon svg { width: 27px; height: 27px; stroke-width: 2.3; }
.dispatched-top h2 { margin: 0; font-size: 18px; }
.dispatched-top p { margin: 5px 0 0; color: rgba(255,255,255,.68); font-size: 10px; }
.eta { margin-top: 22px; display: flex; align-items: baseline; justify-content: space-between; }
.eta strong { font-size: 44px; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.eta span { color: rgba(255,255,255,.68); font-size: 10px; }
.incident-reference { margin: 14px 0 0; color: rgba(255,255,255,.68); font-size: 9px; font-weight: 750; }
.timeline { margin-top: 18px; padding: 4px 2px; }
.timeline-step { position: relative; min-height: 58px; padding-inline-start: 34px; }
.timeline-step::before { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; width: 9px; height: 9px; border: 3px solid #fff; border-radius: 50%; background: var(--border); }
.timeline-step::after { content: ""; position: absolute; inset-inline-start: 12px; top: 23px; bottom: -4px; width: 1px; background: var(--border); }
.timeline-step:last-child::after { display: none; }
.timeline-step.done::before { background: var(--teal-600); border-color: var(--teal-100); }
.timeline-step.active::before { background: var(--sky-500); border-color: var(--sky-100); box-shadow: 0 0 0 5px rgba(22,163,199,.12); }
.timeline-step strong { display: block; font-size: 12px; }
.timeline-step span { display: block; margin-top: 4px; color: var(--slate-600); font-size: 9px; }
.response-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.response-actions button { min-height: 48px; border: 1px solid var(--border); border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--navy-900); background: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.response-actions svg { width: 18px; }

[dir="rtl"] body, [dir="rtl"] .brand-copy, [dir="rtl"] .quick-card, [dir="rtl"] .card-link, [dir="rtl"] .sample-prompt { text-align: right; }
[dir="rtl"] .page-title { letter-spacing: 0; }
[dir="rtl"] .presentation-copy { direction: rtl; text-align: right; }
[dir="rtl"] .map-canvas { transform: scaleX(-1); }
[dir="rtl"] .bottom-nav button { letter-spacing: 0; }
[dir="rtl"] .nav-sos { transform: translateY(-11px); }
[dir="rtl"] .brand-copy strong { letter-spacing: .05em; }
[dir="rtl"] .lesson-card > svg, [dir="rtl"] .course-banner > svg, [dir="rtl"] .learning-continue svg { transform: scaleX(-1); }
[dir="rtl"] .scenario-choice > svg { transform: scaleX(-1); }

@media (max-width: 960px) {
  .stage { display: block; min-height: 100vh; padding: 0; }
  .phone { width: 100%; max-width: none; height: 100vh; min-height: 640px; border: 0; border-radius: 0; box-shadow: none; }
  .presentation-copy { display: none; }
}

@media (max-height: 760px) and (min-width: 961px) {
  .phone { min-height: 680px; height: calc(100vh - 24px); }
  .stage { padding: 12px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .view, .progress-ring, .lesson-card, .lesson-sheet { animation: none !important; transform: none !important; }
}

@media (prefers-contrast: more) {
  :root { --slate-600: #354b57; --border: #9eb2ba; --border-soft: #b7c7cd; }
  .status-pill, .badge { border: 1px solid currentColor; }
}
