/* ==========================================================================
   MyEasyAgent UX toolkit — shared by /app/ and the main site (redesign mode)
   Everything is scoped under html.mea-ux, which only exists when this toolkit
   is loaded, so the classic site is never affected.
   Sections: 1 fonts · 2 readability · 3 focus & press · 4 hints · 5 explain terms
             6 toast · 7 Text & View controls · 8 skeletons · 9 small animations
   ========================================================================== */

/* ---------- 1. Fonts: Ubuntu for reading, Ubuntu Mono for numbers & IDs ---------- */
html.mea-ux {
  --mea-font-body: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mea-font-mono: 'Ubuntu Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --mea-green: #15803d;
  --mea-green-dark: #14532d;
  --mea-green-soft: #f0fdf4;
  --mea-ink: #0f172a;
  --mea-focus: #f59e0b;
}
html.mea-ux body,
html.mea-ux button,
html.mea-ux input,
html.mea-ux select,
html.mea-ux textarea {
  font-family: var(--mea-font-body);
}
/* Mono highlights: prices, references, IDs, small captions */
html.mea-ux .pd-price,
html.mea-ux .card-price,
html.mea-ux .pd-sim-price,
html.mea-ux .cost-summary__table td:last-child,
html.mea-ux .pd-meta-value,
html.mea-ux [data-copy],
html.mea-ux .mea-mono,
html.mea-ux .price-val,
html.mea-ux .ref-val,
html.mea-ux .web-card-price,
html.mea-ux .web-card-ref,
html.mea-ux .inspector-price-tag,
html.mea-ux .float-price,
html.mea-ux .stat-number,
html.mea-ux .math-row strong,
html.mea-ux .cost-row strong,
html.mea-ux .detail-price-tag,
html.mea-ux .mea-hint-step-num {
  font-family: var(--mea-font-mono);
  letter-spacing: 0;
}

/* ---------- 2. Readability: text size & Simple view (set from the Aa panel) ---------- */
html.mea-ux body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
html.mea-ux.mea-text-lg body { zoom: 1.12; }
html.mea-ux.mea-text-xl body { zoom: 1.25; }

/* Simple view: calmer page — no motion, no decoration, underlined links, stronger text */
html.mea-ux.mea-simple *,
html.mea-ux.mea-simple *::before,
html.mea-ux.mea-simple *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.mea-ux.mea-simple body { color: #111827; }
html.mea-ux.mea-simple p a,
html.mea-ux.mea-simple li a { text-decoration: underline; text-underline-offset: 3px; }
html.mea-ux.mea-simple .hero-bg-glow,
html.mea-ux.mea-simple .hero-bg-grid,
html.mea-ux.mea-simple .hero-float-card,
html.mea-ux.mea-simple .live-dot,
html.mea-ux.mea-simple .pulse-dot,
html.mea-ux.mea-simple .hero-reveal-text,
html.mea-ux.mea-simple .trust-ticker,
html.mea-ux.mea-simple .marquee { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html.mea-ux *,
  html.mea-ux *::before,
  html.mea-ux *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Comfortable tap targets for the controls people tap most */
html.mea-ux .pill-btn,
html.mea-ux .bento-chip,
html.mea-ux .web-cat-pill,
html.mea-ux .filter-pill,
html.mea-ux .mea-dock-item,
html.mea-ux .push-optin-btn,
html.mea-ux .pd-btn {
  min-height: 44px;
}

/* ---------- 3. Keyboard focus & press feedback ---------- */
html.mea-ux :focus-visible {
  outline: 3px solid var(--mea-focus) !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}
html.mea-ux button,
html.mea-ux [role="button"],
html.mea-ux a[class*="btn"],
html.mea-ux .pill-btn,
html.mea-ux .bento-chip,
html.mea-ux .mea-bento-card,
html.mea-ux .web-prop-card,
html.mea-ux .prop-card,
html.mea-ux .property-card {
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
html.mea-ux button:active:not(:disabled),
html.mea-ux [role="button"]:active,
html.mea-ux a[class*="btn"]:active,
html.mea-ux .pill-btn:active,
html.mea-ux .bento-chip:active {
  transform: scale(0.96);
}
html.mea-ux .mea-bento-card:active,
html.mea-ux .web-prop-card:active,
html.mea-ux .prop-card:active,
html.mea-ux .property-card:active {
  transform: scale(0.985);
}
@media (hover: hover) {
  html.mea-ux .mea-bento-card:hover,
  html.mea-ux .property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }
}

/* ---------- 4. Teaching hints (dismissible, remembered per device) ---------- */
.mea-hint {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 16px auto;
  padding: 14px 52px 14px 16px;
  background: var(--mea-green-soft, #f0fdf4);
  border: 1px solid #bbf7d0;
  border-left: 5px solid var(--mea-green, #15803d);
  border-radius: 14px;
  color: var(--mea-green-dark, #14532d);
  font-size: 1rem;
  line-height: 1.55;
  box-sizing: border-box;
}
.mea-hint-wrap { padding: 0 16px; }
.mea-hint[hidden] { display: none !important; }
.mea-hint-icon { font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.mea-hint-body { flex: 1; min-width: 0; }
.mea-hint-title { display: block; font-weight: 700; margin-bottom: 2px; }
.mea-hint-steps { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.mea-hint-steps li { display: flex; gap: 8px; align-items: baseline; }
.mea-hint-step-num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--mea-green, #15803d);
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
}
.mea-hint-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}
.mea-hint-close:hover { background: rgba(21, 128, 61, 0.1); }
.mea-hint.mea-hint-leaving { opacity: 0; transform: translateY(-4px); transition: opacity 0.2s, transform 0.2s; }

/* ---------- 5. "?" help icons + small hover tooltips ---------- */
.mea-help {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font: 700 10px/1 var(--mea-font-body, sans-serif);
  vertical-align: middle;
  cursor: help;
  opacity: 0.8;
  position: relative;
}
.mea-help::before { content: ''; position: absolute; inset: -12px; } /* bigger invisible touch area */
.mea-help:hover, .mea-help[aria-expanded="true"] { color: #15803d; opacity: 1; }
.mea-tip {
  position: absolute;
  z-index: 2147483000;
  width: max-content;
  max-width: min(260px, calc(100vw - 24px));
  padding: 9px 11px;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font: 400 12px/1.5 var(--mea-font-body, sans-serif);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}
.mea-tip strong { display: block; margin-bottom: 2px; color: #86efac; font-size: 12px; font-weight: 700; }

/* ---------- 6. Toast ---------- */
.mea-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  z-index: 2147483001;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--mea-ink, #0f172a);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.mea-toast.show { opacity: 1; transform: translate(-50%, 0); }
html.mea-ux [data-copy] { cursor: copy; border-bottom: 1px dashed currentColor; }

/* ---------- 7. Text & View controls (the "Aa" button) ---------- */
.mea-ux-controls { position: relative; display: inline-flex; }
.mea-ux-floating { position: fixed; right: 16px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 900; }
.mea-ux-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;          /* never squeezed by a crowded bar (Android) */
  box-sizing: border-box;
  -webkit-appearance: none; appearance: none; /* iOS gave the button its own sizing */
  line-height: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: var(--mea-ink, #0f172a);
  cursor: pointer;
}
.mea-ux-toggle:hover, .mea-ux-toggle[aria-expanded="true"] { border-color: #15803d; color: #15803d; }
.mea-ux-toggle .mea-ux-aa { font-family: var(--mea-font-mono, monospace); font-size: 1.05rem; }
.mea-ux-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2000;
  width: min(300px, calc(100vw - 24px));
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--mea-ink, #0f172a);
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  text-align: left;
}
.mea-ux-floating .mea-ux-panel { top: auto; bottom: calc(100% + 8px); }
.mea-ux-panel[hidden] { display: none; }
.mea-ux-panel h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; }
.mea-ux-panel .mea-ux-caption { margin: 0 0 12px; font-size: 0.85rem; color: #475569; }
.mea-ux-row { margin-bottom: 14px; }
.mea-ux-row > span { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.mea-ux-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mea-ux-sizes button {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
}
.mea-ux-sizes button[aria-pressed="true"] { background: var(--mea-green, #15803d); border-color: var(--mea-green, #15803d); color: #fff; }
.mea-ux-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.mea-ux-switch .knob { flex: 0 0 auto; width: 40px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; }
.mea-ux-switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.mea-ux-switch[aria-checked="true"] .knob { background: var(--mea-green, #15803d); }
.mea-ux-switch[aria-checked="true"] .knob::after { left: 19px; }
.mea-ux-link { border: 0; background: none; padding: 8px 0; color: var(--mea-green, #15803d); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ---------- 8. Skeleton placeholders while content loads ---------- */
.mea-skeleton {
  border-radius: 18px;
  min-height: 260px;
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: mea-shimmer 1.2s infinite linear;
}
@keyframes mea-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 9. Small animations ---------- */
@keyframes mea-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.mea-pop { animation: mea-pop 0.35s ease; }

/* Push opt-in inside the bell menus */
.push-optin { padding: 12px 14px; border-top: 1px solid #e2e8f0; }
.push-optin-btn {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--mea-green, #15803d);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.push-optin-btn:disabled { opacity: 0.7; cursor: progress; }
.push-optin-note { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.45; color: #475569; }

/* (Old "Aa" sizing rules removed: they made the display button 44px with uneven padding next to
   the 40px bar icons — squeezed on Android, stretched on iPhone. Sizing now lives in §7 and §14.) */

/* ---------- 10. Main-site search form: step numbers & helper captions ---------- */
.search-step {
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  margin-right: 6px;
  border-radius: 50%;
  background: #15803d;
  color: #fff;
  font-family: var(--mea-font-mono, monospace);
  font-size: 0.8em;
  font-weight: 700;
  vertical-align: middle;
}
.search-help {
  display: block;
  margin: -2px 0 6px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #475569;
  font-weight: 400;
}

/* ---------- 11. Bento on desktop (main site, redesign) ----------
   The bento box was phone-only; on wider screens it becomes a 4-tile row
   under the hero (the hero already has the full search form there). */
@media (min-width: 769px) {
  body.mea-redesign .mea-mobile-bento-section { display: block !important; padding: 32px 24px; }
  body.mea-redesign .mea-bento-container { max-width: 1200px; }
  body.mea-redesign .mea-bento-status-bar,
  body.mea-redesign .bento-hero-search { display: none; }
  body.mea-redesign .mea-bento-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  body.mea-redesign .bento-receipt-banner,
  body.mea-redesign .bento-app-download { grid-column: span 2; }
}

/* ---------- 12. Header fit & pill alignment with the wider Ubuntu font ---------- */
html.mea-ux .pill-btn { display: inline-flex; align-items: center; justify-content: center; }
body.mea-redesign .nav-app-btn,
body.mea-redesign .header-contact-btn,
body.mea-redesign .mea-ux-toggle { white-space: nowrap; }
body.mea-redesign .header-nav a { white-space: nowrap; }
@media (max-width: 1440px) { body.mea-redesign .header-nav { gap: 18px; } }
.mea-ux-toggle { white-space: nowrap; }

/* ---------- 13. Compact cookie notice on phones (main site, redesign) ---------- */
@media (max-width: 600px) {
}

/* ---------- 14. Shared top bar (main site redesign + /app/) ----------
   logo · Lagos pill · main menu pill · Aa · bell · Switch role  (phones: logo · icons · menu) */
.mea-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid #e2e8f0;
  font-family: var(--mea-font-body, 'Ubuntu', system-ui, sans-serif);
}
.mea-topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
}
.mea-topbar-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.mea-topbar-brand img { height: 44px; width: auto; display: block; }
.mea-topbar-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.mea-topbar-location svg { color: #15803d; }
.mea-topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}
.mea-topbar-nav a {
  padding: 7px 13px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.mea-topbar-nav a:hover { background: #fff; color: #0f172a; }
.mea-topbar-nav a[aria-current="page"] { background: #fff; color: #15803d; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); }
.mea-topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.mea-topbar-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a !important;
  cursor: pointer;
}
.mea-topbar-icon:hover { border-color: #15803d; color: #15803d !important; }
.mea-topbar-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #15803d;
  border-radius: 999px;
  background: #fff;
  color: #15803d;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.mea-topbar-role:hover { background: #f0fdf4; }
.mea-topbar-menu { display: none; }
.mea-topbar-drawer {
  display: grid;
  padding: 8px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.mea-topbar-drawer[hidden] { display: none; }
.mea-topbar-drawer a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.mea-topbar-drawer a[aria-current="page"] { color: #15803d; font-weight: 700; }
/* Bell dropdowns inside the bar (main site ntfy-*, app web-notif-*) */
.mea-topbar .ntfy-bell-container,
.mea-topbar .web-notif-wrap { position: relative; }
.mea-topbar .ntfy-dropdown,
.mea-topbar .web-notif-popover { right: 0; left: auto; top: calc(100% + 8px); }

.mea-ux-toggle-label { display: none; }
.mea-topbar-drawer-tools { display: none; }
.mea-topbar-icon, .mea-topbar-role, .mea-topbar-menu { flex: 0 0 auto; box-sizing: border-box; -webkit-appearance: none; appearance: none; }

/* Measured: the full bar needs ~1130px (links + buttons) and ~1270px with the Lagos pill. */
@media (max-width: 1279px) { .mea-topbar-location { display: none; } }
@media (max-width: 1140px) {
  .mea-topbar-nav { display: none; }
  .mea-topbar-menu { display: inline-grid; }
  .mea-topbar-actions { margin-left: auto; }
  /* Phones/tablets (and iPad landscape): display settings + Switch role move into the ☰ menu */
  .mea-topbar-actions > [data-ux-controls], .mea-topbar-actions > .mea-topbar-role { display: none; }
  .mea-topbar-drawer-tools { display: grid; gap: 8px; padding: 8px 0 12px; border-bottom: 1px solid #f1f5f9; }
  .mea-drawer-role,
  .mea-topbar-drawer .mea-ux-toggle {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; height: auto; min-height: 48px; padding: 0 14px; border-radius: 12px;
    font: 600 16px/1.2 var(--mea-font-body, 'Ubuntu', system-ui, sans-serif); text-align: left; cursor: pointer;
  }
  .mea-drawer-role { border: 1px solid #15803d; background: #fff; color: #15803d; }
  .mea-topbar-drawer .mea-ux-controls { display: block; }
  .mea-topbar-drawer .mea-ux-toggle-label { display: inline; }
  .mea-topbar-drawer .mea-ux-panel { position: static; width: auto; margin-top: 8px; box-shadow: none; }
}
@media (max-width: 520px) {
  .mea-topbar-inner { gap: 8px; padding: 0 12px; height: 60px; }
  .mea-topbar-brand img { height: 38px; }
  /* label hidden visually only, so screen readers still hear "Switch role" */
  .mea-topbar-role span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .mea-topbar-role { width: 40px; padding: 0; justify-content: center; border-radius: 50%; }
}

/* ---------- 15. Property page in the app's style (main site, redesign) ----------
   Soft grey page, white rounded cards, Ubuntu headings, app-style chips and buttons. */
body.mea-redesign {
  --font-primary: 'Ubuntu', system-ui, sans-serif;
  --font-body: 'Ubuntu', system-ui, sans-serif;
  --radius-lg: 18px;
}
body.mea-redesign main,
body.mea-redesign .pd-gallery,
body.mea-redesign .pd-header,
body.mea-redesign .pd-content { background: transparent; }
body.mea-redesign:has(.pd-content) { background: #f8fafc; }
body.mea-redesign .pd-gallery-grid { border-radius: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
body.mea-redesign .pd-header {
  margin-top: 16px;
  padding: 24px;
  max-width: 1152px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}
body.mea-redesign .pd-price { color: #15803d; font-size: 2rem; }
body.mea-redesign .pd-title { font-weight: 700; letter-spacing: -0.01em; }
body.mea-redesign .pd-tag {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-weight: 500;
}
body.mea-redesign .pd-tag:first-of-type { background: #15803d; border-color: #15803d; color: #fff; }
body.mea-redesign .pd-main > .pd-section,
body.mea-redesign .pd-main > .cost-summary {
  margin-bottom: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}
body.mea-redesign .pd-section-title {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}
body.mea-redesign .pd-card {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
body.mea-redesign .pd-sidebar { top: 84px; }
body.mea-redesign .pd-btn { border-radius: 999px; font-weight: 700; }
body.mea-redesign .cost-summary { border-radius: 20px; }
body.mea-redesign .cost-summary__title { font-size: 1rem; }
body.mea-redesign .pd-sim-card { border-radius: 18px; overflow: hidden; border: 1px solid #e2e8f0; background: #fff; }
body.mea-redesign .pd-similar-title { font-weight: 700; }

/* ---------- 16. Explore state menu inside the top bar ---------- */
.mea-topbar-nav .state-menu > summary {
  padding: 7px 13px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.mea-topbar-nav .state-menu > summary:hover,
.mea-topbar-nav .state-menu[open] > summary { background: #fff; color: #0f172a; }
.mea-topbar-nav .state-menu:has(a[aria-current]) > summary {
  background: #fff; color: #15803d; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
.mea-topbar-drawer .state-menu > summary {
  display: flex; justify-content: space-between; min-height: 48px; padding: 0 8px;
  border-bottom: 1px solid #f1f5f9; color: #0f172a; font-size: 16px; font-weight: 500;
}

/* ---------- 17. In-page jumps land below the sticky top bar ----------
   (headings like "Tenant Legal Protection & Advisory" were hidden/cut under the bar) */
html.mea-ux { scroll-padding-top: 84px; }
@media (max-width: 520px) { html.mea-ux { scroll-padding-top: 76px; } }

/* ---------- 18. Logo stamp ink ring (mea-ux.js §6) ---------- */
.mea-stamp-ink {
  width: 140px; height: 140px; margin: 0; border-radius: 50%;
  border: 3px solid #15803d; background: radial-gradient(circle, rgba(21,128,61,.18), transparent 60%);
  z-index: 2147483645; pointer-events: none;
}

/* ---------- 19. Loading screen (layouts/partials/loader.html) ---------- */
.mea-loader {
  position: fixed; inset: 0; z-index: 2147483647;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f0fdf4 70%, #dcfce7 100%);
  animation: ld-exit 0.45s cubic-bezier(.65, 0, .35, 1) 1.55s forwards;
}
.mea-loader[hidden] { display: none; }
html[data-theme="dark"] .mea-loader { background: radial-gradient(ellipse at 50% 45%, #111a2c 0%, #0b1220 75%); }
html[data-theme="dark"] .mea-loader-mark { fill: #4ade80; }
.mea-loader-mark { overflow: visible; }
.ld-roof { clip-path: inset(0 100% 0 0); animation: ld-roof 0.55s cubic-bezier(.65, 0, .35, 1) 0.1s forwards; }
.ld-rider { transform: translateX(-130%) rotate(-8deg); transform-box: fill-box; transform-origin: 50% 100%;
  animation: ld-slide 0.7s cubic-bezier(.34, 1.32, .64, 1) 0.45s forwards; }
.ld-head { transform: translateY(-60px); opacity: 0; transform-box: fill-box;
  animation: ld-head 0.4s cubic-bezier(.34, 1.56, .64, 1) 0.95s forwards; }
.mea-loader-word {
  margin: 0; display: flex; gap: 0.08em;
  font: 700 clamp(1.4rem, 5vw, 2.1rem)/1 'Ubuntu', system-ui, sans-serif; letter-spacing: 0.14em; color: #0f172a;
}
html[data-theme="dark"] .mea-loader-word { color: #f1f5f9; }
.mea-loader-word span { display: inline-block; opacity: 0; transform: translateY(14px);
  animation: ld-letter 0.35s cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: calc(0.75s + var(--i) * 0.045s); }
.mea-loader-word span:nth-child(-n+2) { color: #047857; }   /* MY */
html[data-theme="dark"] .mea-loader-word span:nth-child(-n+2) { color: #4ade80; }
@keyframes ld-roof { to { clip-path: inset(0 0 0 0); } }
@keyframes ld-slide { 70% { transform: translateX(4%) rotate(2deg); } 100% { transform: translateX(0) rotate(0); } }
@keyframes ld-head { to { transform: translateY(0); opacity: 1; } }
@keyframes ld-letter { to { opacity: 1; transform: translateY(0); } }
@keyframes ld-exit { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }
html.mea-loading { overflow: hidden; }

/* iPhone/iPad only (-webkit-touch-callout exists only in iOS Safari): no live blur behind the
   sticky top bar — iOS re-blurs it on every scroll frame. The bar is already 94% opaque. */
@supports (-webkit-touch-callout: none) {
  .mea-topbar { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Games row in the phone menu (Agent Wahala + Rent Sharp quiz) */
.mea-drawer-games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.mea-topbar-drawer .mea-drawer-games a { justify-content: center; min-height: 48px; padding: 0 10px; border: 2px solid #0f172a; border-bottom-width: 2px; border-radius: 12px;
  background: #facc15; color: #0f172a; font-weight: 700; font-size: 15px; text-align: center; box-shadow: 2px 2px 0 #0f172a; }
html[data-theme="dark"] .mea-drawer-games { border-bottom-color: #2a3850; }
html[data-theme="dark"] .mea-topbar-drawer .mea-drawer-games a { color: #0f172a; background: #facc15; border-color: #0f172a; }
