/* ==========================================================================
 * 5Tawzeef Unified OOP App Surface Design Tokens & Archetype Styles
 * Single source of semantic styling for Main Portal, Country Apps & Specialty Apps.
 * Zero !important override wars; zero runtime DOM getComputedStyle() sweeps.
 * ========================================================================== */

html[data-surface-key="main:main"],
.w45-social-app {
  /* Layer 1: Default Brand Seeds scoped cleanly to Main V10 Portal */
  --seed-primary: #087555;
  --seed-secondary: #075c48;
  --seed-accent: #ba8733;
  --seed-bg: #f7f8f6;
  --seed-ink: #1d343d;
  --seed-hero-scrim: #022319;
  --seed-on-primary: #ffffff;
  --seed-radius-card: 24px;
  --seed-radius-control: 14px;
}

:root {
  /* Layer 2: Precomputed & Semantic Tokens (inherit active --seed-* on App Surfaces) */
  --srf-primary: var(--seed-primary, #087555);
  --srf-primary-strong: var(--seed-primary-strong, var(--seed-secondary, #075c48));
  --srf-primary-bright: var(--seed-primary-bright, var(--seed-primary, #087555));
  --srf-primary-soft: var(--seed-primary-soft, #e8f7f0);
  --srf-primary-tint2: var(--seed-primary-tint2, #f4faf5);
  --srf-primary-border: var(--seed-primary-border, #bfe8d9);
  --srf-primary-ring: var(--seed-primary-ring, rgba(8, 117, 85, 0.16));

  --srf-secondary: var(--seed-secondary, #075c48);
  --srf-accent: var(--seed-accent, #ba8733);
  --srf-accent-soft: var(--seed-accent-soft, #f7eed8);

  --srf-bg: var(--seed-bg, #f7f8f6);
  --srf-card: #ffffff;
  --srf-ink: var(--seed-ink, #1d343d);
  --srf-muted: var(--seed-muted, #5d707a);
  --srf-line: var(--seed-line, #dce6e2);
  --srf-on-primary: var(--seed-on-primary, #ffffff);
  --srf-hero-scrim: var(--seed-hero-scrim, #022319);
  --srf-radius-card: var(--seed-radius-card, 24px);
  --srf-radius-ctrl: var(--seed-radius-control, 14px);
}

@supports (color: color-mix(in srgb, red 50%, white)) {
  html[data-app-surface] {
    --srf-primary-strong: var(--seed-primary-strong, color-mix(in srgb, var(--seed-primary) 78%, #000000));
    --srf-primary-bright: var(--seed-primary-bright, color-mix(in srgb, var(--seed-primary) 82%, #ffffff));
    --srf-primary-soft: var(--seed-primary-soft, color-mix(in srgb, var(--seed-primary) 10%, #ffffff));
    --srf-primary-tint2: var(--seed-primary-tint2, color-mix(in srgb, var(--seed-primary) 5%, #ffffff));
    --srf-primary-border: var(--seed-primary-border, color-mix(in srgb, var(--seed-primary) 26%, #ffffff));
    --srf-primary-ring: var(--seed-primary-ring, color-mix(in srgb, var(--seed-primary) 18%, transparent));
    --srf-accent-soft: var(--seed-accent-soft, color-mix(in srgb, var(--seed-accent) 16%, #ffffff));
    --srf-muted: var(--seed-muted, color-mix(in srgb, var(--seed-ink) 62%, #ffffff));
    --srf-line: var(--seed-line, color-mix(in srgb, var(--seed-ink) 14%, #ffffff));
  }
}

html[data-app-surface] body.mobile-app-shell {
  background-color: var(--srf-bg);
  color: var(--srf-ink);
}

/* Cascade active Child Surface palette to secondary shared views (.site-header, .btn, /jobs, /login)
 * while leaving Main Portal (main:main) and un-scoped /jobs pages untouched on their native defaults. */
html[data-app-surface]:not([data-surface-key="main:main"]) {
  --brand: var(--srf-primary);
  --brand-2: var(--srf-primary-bright);
  --brand-3: var(--srf-secondary);
  --primary: var(--srf-primary);
  --h-brand: var(--srf-primary);
  --h-brand-dk: var(--srf-primary-strong);
  --color-primary: var(--srf-primary);
  --color-primary-hover: var(--srf-primary-strong);
  --color-primary-active: var(--srf-secondary);
  --color-primary-light: var(--srf-primary-soft);
  --ds-brand: var(--srf-primary);
  --ds-brand-hover: var(--srf-primary-strong);
  --ds-brand-soft: var(--srf-primary-soft);
  --ds-brand-line: var(--srf-primary-border);
  --v143-primary: var(--srf-primary);
  --v143-primary-soft: var(--srf-primary-soft);
  --accent: var(--srf-primary);
}

html[data-app-surface^="specialty:"]:not(.country-app-context-active) {
  --app-primary: var(--srf-primary);
  --app-primary-strong: var(--srf-primary-strong);
  --app-primary-dark: var(--srf-secondary);
  --app-primary-deep: var(--srf-hero-scrim, var(--srf-secondary));
  --app-primary-soft: var(--srf-primary-soft);
  --app-accent: var(--srf-accent);
  --app-line: var(--srf-primary-border);
  --mapp-brand: var(--srf-primary);
  --mapp-brand-soft: var(--srf-primary-soft);
}

html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-pilot-v195-2-1 .mobile-bottom-nav a:is(.active, [aria-current="page"]) {
  color: var(--srf-primary);
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-pilot-v195-2-1 .mobile-bottom-nav a:is(.active, [aria-current="page"])::before {
  background: var(--srf-primary);
}

html[data-app-surface]:not([data-surface-key="main:main"]) .site-header .brand-mark {
  background: linear-gradient(135deg, var(--srf-primary), var(--srf-primary-strong)) !important;
  box-shadow: 0 12px 26px var(--srf-primary-ring) !important;
}

html[data-app-surface]:not([data-surface-key="main:main"]) .site-header .register-link,
html[data-app-surface]:not([data-surface-key="main:main"]) .site-header .premium-post-btn,
html[data-app-surface]:not([data-surface-key="main:main"]) .jobs-quick-tabs a.is-active,
html[data-app-surface]:not([data-surface-key="main:main"]) [class*="mode-switch"] a.is-active,
html[data-app-surface]:not([data-surface-key="main:main"]) .unified-mode-tabs a.is-active {
  background: var(--srf-primary) !important;
  border-color: var(--srf-primary) !important;
  color: var(--srf-on-primary) !important;
}

html[data-app-surface]:not([data-surface-key="main:main"]) .w45-journey-nav a.is-active {
  color: var(--srf-primary) !important;
  border-bottom-color: var(--srf-primary) !important;
  font-weight: 800;
}

html[data-app-surface]:not([data-surface-key="main:main"]) .jobs-hero-stats strong,
html[data-app-surface]:not([data-surface-key="main:main"]) .unified-stat-card strong {
  color: var(--srf-primary) !important;
}

html[data-app-surface]:not([data-surface-key="main:main"]) body :is(
  .btn:not(.soft):not(.ghost):not(.outline):not(.secondary):not(.dark),
  button.btn:not(.soft):not(.ghost):not(.outline):not(.secondary):not(.dark),
  a.btn:not(.soft):not(.ghost):not(.outline):not(.secondary):not(.dark),
  a.job-fit-link
) {
  background: linear-gradient(135deg, var(--srf-primary), var(--srf-primary-strong)) !important;
  border-color: var(--srf-primary) !important;
  color: var(--srf-on-primary) !important;
  box-shadow: 0 12px 26px var(--srf-primary-ring) !important;
}

html[data-app-surface]:not([data-surface-key="main:main"]) body :is(
  .btn.soft,
  .btn.ghost,
  .btn.outline,
  .btn.secondary
) {
  color: var(--srf-primary) !important;
  background: var(--srf-primary-soft) !important;
  border-color: var(--srf-primary-border) !important;
  box-shadow: none !important;
}

/* Desktop Job Detail Hero & Links */
html[data-app-surface]:not([data-surface-key="main:main"]) .job-detail-legacy-parity-h116-detail1 .job-detail-v2-hero {
  background: linear-gradient(135deg, #ffffff 0%, var(--srf-primary-tint2) 100%) !important;
  border-block-color: var(--srf-line) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) .job-detail-legacy-parity-h116-detail1 .job-title-panel h1 {
  color: var(--srf-primary-strong) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) .job-detail-legacy-parity-h116-detail1 .job-breadcrumb-lite a {
  color: var(--srf-muted) !important;
}

/* Secondary Search & SEO landing shortcuts */
html[data-app-surface]:not([data-surface-key="main:main"]) .jobs-results-shortcuts,
html[data-app-surface]:not([data-surface-key="main:main"]) .jobs-web-experience-v19521h2 {
  --search4-blue: var(--srf-primary) !important;
  --search4-blue-dark: var(--srf-primary-strong) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body :is(
  .jobs-results-shortcut.active,
  .jobs-results-shortcut.is-active,
  .jobs-results-shortcut[aria-current="page"],
  .request1-p2-results-shortcuts a.is-active
) {
  background: linear-gradient(135deg, var(--srf-primary), var(--srf-primary-strong)) !important;
  border-color: var(--srf-primary) !important;
  color: var(--srf-on-primary) !important;
  box-shadow: 0 10px 24px var(--srf-primary-ring) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body :is(
  .jobs-results-shortcut.active,
  .jobs-results-shortcut.is-active,
  .jobs-results-shortcut[aria-current="page"]
) .jobs-results-shortcut-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) .jobs-results-shortcut-icon {
  background: var(--srf-primary-soft) !important;
  color: var(--srf-primary) !important;
}

/* Mobile Job Detail & Apply Experience */
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail.mobile-app-pilot-v195-2-1 {
  --mjd-brand: var(--srf-primary) !important;
  --mjd-brand-dark: var(--srf-primary-strong) !important;
  --mjd-brand-soft: var(--srf-primary-soft) !important;
  --mjd-green: var(--srf-primary) !important;
  --mjd-green-soft: var(--srf-primary-soft) !important;
  --mjd-line: var(--srf-line) !important;
  --mobile-accent: var(--srf-primary) !important;
  --mobile-primary: var(--srf-primary) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__round:not(.is-saved) {
  background: var(--srf-primary-tint2) !important;
  color: var(--srf-primary) !important;
  border-color: var(--srf-primary-border) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__hero {
  background: linear-gradient(155deg, #ffffff 0%, var(--srf-primary-tint2) 100%) !important;
  border-color: var(--srf-primary-border) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__hero h1 {
  color: var(--srf-primary-strong) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail :is(
  .mobile-job-detail-native-v19521h93__company-mark,
  .mobile-job-detail-native-v19521h93__featured,
  .mobile-job-detail-native-v19521h93__facts article > span,
  .mobile-job-detail-native-v19521h93__company-mark.is-small,
  .mobile-job-detail-native-v19521h93__related-mark.is-tone-2,
  .mobile-job-detail-native-v19521h93__section summary > span > svg
) {
  background: var(--srf-primary-soft) !important;
  color: var(--srf-primary) !important;
  border-color: var(--srf-primary-border) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__facts article {
  background: var(--srf-primary-tint2) !important;
  border-color: var(--srf-primary-border) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__prose :is(h2, h3, h4, .detail-accent-bar) {
  border-inline-start-color: var(--srf-primary) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail :is(
  .mobile-job-detail-native-v19521h93__readiness,
  .mobile-job-detail-native-v19521h93__match,
  .mobile-job-detail-native-v19521h93__contact-card
) {
  border-color: var(--srf-primary-border) !important;
  background: linear-gradient(145deg, var(--srf-primary-tint2), var(--srf-primary-soft)) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail .mobile-job-detail-native-v19521h93__progress i {
  background: linear-gradient(90deg, var(--srf-primary-strong), var(--srf-primary)) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-job_detail :is(
  .mobile-job-detail-native-v19521h93__dock button:not(.mobile-job-dock-whatsapp-btn),
  .mobile-job-detail-native-v19521h93__apply,
  .mobile-job-apply-v19521h93__submit,
  .mobile-job-dock-call-btn
) {
  background: linear-gradient(135deg, var(--srf-primary), var(--srf-primary-strong)) !important;
  color: var(--srf-on-primary) !important;
  box-shadow: 0 10px 24px var(--srf-primary-ring) !important;
}

/* Mobile Auth & Career Advice Secondary Surfaces */
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-auth.mobile-app-pilot-v195-2-1 {
  --mauth-brand: var(--srf-primary) !important;
  --mauth-brand-dark: var(--srf-primary-strong) !important;
  --mauth-line: var(--srf-line) !important;
}
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-auth .mobile-auth-native-v19521h4__submit,
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-career-advice .mcad-h11420-hero,
html[data-app-surface]:not([data-surface-key="main:main"]) body.mobile-app-page-career-advice .mcad-h11420-primary {
  background: linear-gradient(135deg, var(--srf-primary-strong), var(--srf-primary)) !important;
  box-shadow: 0 14px 32px var(--srf-primary-ring) !important;
}

.srf-mobile-menu-btn {
  display: grid;
}

@media (min-width: 992px) {
  .srf-mobile-menu-btn {
    display: none !important;
  }
}

.srf-brand__icon--photo {
  padding: 0 !important;
  object-fit: cover !important;
}

/* ==========================================================================
 * 1. UNIFIED HERO ENGINE (.srf-hero) + 4 STRUCTURAL ARCHETYPES
 * ========================================================================== */
.srf-hero {
  position: relative;
  overflow: hidden;
  background: var(--srf-hero-scrim);
  color: #ffffff;
  margin-bottom: -24px;
  padding-bottom: 42px;
}

.srf-hero__media,
.srf-hero__image,
.srf-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.srf-hero__image {
  object-fit: cover;
  object-position: center 40%;
}

.srf-hero__shade {
  background: linear-gradient(
    180deg,
    rgba(10, 18, 24, 0.56) 0%,
    rgba(10, 18, 24, 0.78) 56%,
    var(--srf-hero-scrim) 100%
  );
}

.srf-hero__inner {
  position: relative;
  z-index: 3;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 24px;
}

.srf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 10px;
}

.srf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  min-width: 0;
}

.srf-brand__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #ffffff;
  padding: 5px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  flex-shrink: 0;
}

.srf-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.srf-brand__text strong {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srf-brand__text small {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
}

.srf-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.srf-icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 18, 26, 0.38);
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.srf-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.srf-hero__grid {
  display: block;
  padding-top: 12px;
  padding-bottom: 18px;
}

.srf-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.srf-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--srf-accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.srf-hero__title {
  margin: 12px 0 8px;
  font-size: clamp(27px, 4.4vw, 46px);
  line-height: 1.22;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.6px;
}

.srf-hero__subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15.5px;
  line-height: 1.75;
  max-width: 680px;
}

.srf-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.srf-hero__stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
}

.srf-hero__showcase-frame {
  display: none;
}

/* Guided Search inside Hero */
.srf-guided-search {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  color: var(--srf-ink);
  margin-top: 14px;
}

.srf-guided-input,
.srf-guided-select {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--srf-line);
  border-radius: var(--srf-radius-ctrl);
  padding: 6px 12px;
  background: #ffffff;
  min-height: 52px;
}

.srf-guided-input svg {
  color: var(--srf-primary);
  flex-shrink: 0;
}

.srf-guided-input input,
.srf-guided-select select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--srf-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}

.srf-guided-select {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
}

.srf-guided-select label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--srf-muted);
}

.srf-guided-submit {
  border: 0;
  border-radius: var(--srf-radius-ctrl);
  padding-inline: 22px;
  background: linear-gradient(135deg, var(--srf-primary) 0%, var(--srf-primary-strong) 100%);
  color: var(--srf-on-primary);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--srf-primary-ring);
}

/* Archetype 1: Panoramic Arch (Egypt, Saudi, Qatar, Jordan...) */
html[data-hero-layout="panoramic-arch"] .srf-hero__shade {
  background: linear-gradient(172deg, color-mix(in srgb, var(--srf-hero-scrim) 68%, transparent) 0%, color-mix(in srgb, var(--srf-hero-scrim) 92%, #000) 100%);
}

html[data-hero-layout="panoramic-arch"] .srf-app-layout {
  position: relative;
  z-index: 10;
  border-radius: 30px 30px 0 0;
  background: var(--srf-bg);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.12);
  padding-top: 22px;
}

/* Archetype 2: Split Showcase (UAE, Oman, Lawyers, Doctors, Accountants...) */
html[data-hero-layout="split-showcase"] .srf-hero {
  background: linear-gradient(135deg, var(--srf-primary-strong) 0%, var(--srf-secondary) 100%);
  margin-bottom: 0;
  padding-bottom: 24px;
}

html[data-hero-layout="split-showcase"] .srf-hero__image {
  opacity: 0.16;
  filter: blur(2px);
}

html[data-hero-layout="split-showcase"] .srf-hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  align-items: center;
  gap: 24px;
}

html[data-hero-layout="split-showcase"] .srf-hero__showcase-frame {
  display: block;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.25);
}

html[data-hero-layout="split-showcase"] .srf-hero__showcase-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Archetype 3: Command Dark (Programmers, IT, Engineering, Security, Technicians) */
html[data-hero-layout="command-dark"] .srf-hero {
  background: linear-gradient(145deg, #0b0f19 0%, color-mix(in srgb, var(--srf-secondary) 82%, #000) 60%, color-mix(in srgb, var(--srf-primary) 42%, #0b0f19) 100%);
  border-bottom: 3px solid var(--srf-accent);
  margin-bottom: 0;
  padding-bottom: 24px;
}

html[data-hero-layout="command-dark"] .srf-hero__image {
  opacity: 0.24;
}

html[data-hero-layout="command-dark"] .srf-hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 24px;
}

html[data-hero-layout="command-dark"] .srf-hero__showcase-frame {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--srf-accent) 65%, transparent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45);
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

html[data-hero-layout="command-dark"] .srf-hero__showcase-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 98% center;
  display: block;
}

html[data-hero-layout="command-dark"] .srf-hero__badge {
  border-radius: 10px;
  border-color: color-mix(in srgb, var(--srf-accent) 55%, transparent);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
}

/* Archetype 4: Ribbon Editorial (Kuwait, Bahrain, Lebanon, Morocco, Tourism...) */
html[data-hero-layout="ribbon-editorial"] .srf-hero {
  background: var(--srf-primary-strong);
  padding-bottom: 28px;
  margin-bottom: -16px;
}

html[data-hero-layout="ribbon-editorial"] .srf-app-layout {
  position: relative;
  z-index: 10;
  border-radius: 24px 24px 0 0;
  background: var(--srf-bg);
  padding-top: 20px;
}

/* ==========================================================================
 * 2. POLYMORPHIC GEO DIRECTORY (PHOTO CARDS FOR CITIES IN COUNTRIES & COUNTRIES IN SPECIALTIES)
 * ========================================================================== */
.geo-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}

.geo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: start;
  padding: 0;
  border: 1.5px solid var(--srf-line);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.geo-card:hover {
  transform: translateY(-2px);
  border-color: var(--srf-primary);
  box-shadow: 0 8px 20px var(--srf-primary-ring);
}

.geo-card.active {
  border-color: var(--srf-primary);
  background: var(--srf-primary-soft);
  box-shadow: 0 0 0 3px var(--srf-primary-ring);
}

.geo-card__thumb {
  width: 100%;
  height: 76px;
  object-fit: cover;
  display: block;
  background: var(--srf-primary-tint2);
}

.geo-card__body {
  padding: 8px 10px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.geo-card__name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--srf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geo-card.active .geo-card__name {
  color: var(--srf-primary-strong);
  font-weight: 900;
}

.geo-card__count {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--srf-primary-tint2);
  color: var(--srf-primary-strong);
  border: 1px solid var(--srf-primary-border);
  flex-shrink: 0;
}

.geo-card.is-zero .geo-card__count {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.geo-card--all {
  justify-content: center;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  gap: 6px;
  text-align: center;
  background: linear-gradient(145deg, var(--srf-primary-soft), #ffffff);
}

.geo-card--all .geo-card__icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--srf-primary);
  color: var(--srf-on-primary);
  display: grid;
  place-items: center;
}

/* Geo Style Variant: story-rings (UAE compact horizontal tiles with rounded frame) */
html[data-geo-style="story-rings"] .geo-cards-grid {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 10px;
  padding-bottom: 4px;
}

html[data-geo-style="story-rings"] .geo-card {
  flex: 0 0 128px;
  border-radius: 18px;
  padding: 8px;
  align-items: center;
  text-align: center;
}

html[data-geo-style="story-rings"] .geo-card__thumb {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  border: 2px solid var(--srf-primary-border);
}

html[data-geo-style="story-rings"] .geo-card.active .geo-card__thumb {
  border-color: var(--srf-primary);
}

html[data-geo-style="story-rings"] .geo-card__body {
  flex-direction: column;
  padding: 6px 2px 2px;
  width: 100%;
}

/* Geo Style Variant: architectural-tabs (Saudi & Programmers horizontal cards) */
html[data-geo-style="architectural-tabs"] .geo-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}

html[data-geo-style="architectural-tabs"] .geo-card {
  flex-direction: row;
  align-items: center;
  padding: 6px;
  gap: 8px;
  border-radius: 14px;
  min-height: 58px;
}

html[data-geo-style="architectural-tabs"] .geo-card__thumb {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  flex-shrink: 0;
}

html[data-geo-style="architectural-tabs"] .geo-card__body {
  padding: 0;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

html[data-geo-style="architectural-tabs"] .geo-card--all {
  min-height: 58px;
  flex-direction: row;
  justify-content: flex-start;
  padding: 6px 10px;
}

/* ==========================================================================
 * 3. CARD SHAPE ARCHETYPES & ARCHIVE SUPPLEMENT BADGE
 * ========================================================================== */
html[data-card-style="ledger-sharp"] .feed .job-card {
  border-radius: 14px;
  border-top-width: 3px;
}

html[data-card-style="soft-pill"] .feed .job-card {
  border-radius: 28px;
}

html[data-card-style="split-accent"] .feed .job-card {
  border-radius: 16px;
  border-top-width: 1px;
  border-inline-start: 5px solid var(--accent, var(--srf-primary));
}

.archive-supplement-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  font-size: 11px;
  font-weight: 800;
}

.subtrack-chip-img {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Bottom Fixed App Navigation (unified for any active App Surface) */
.srf-bottom-nav {
  display: none;
}

@media (max-width: 870px) {
  .srf-hero__grid {
    grid-template-columns: 1fr !important;
  }
  .srf-hero__showcase-frame {
    display: none !important;
  }
  .srf-hero__inner {
    padding-inline: 14px;
  }
  .srf-guided-search {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }
  .geo-cards-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    gap: 8px;
    padding-bottom: 4px;
  }
  .geo-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }
  html[data-geo-style="architectural-tabs"] .geo-card {
    flex: 0 0 156px;
  }
  .srf-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--srf-line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.08);
  }
  .srf-bottom-nav > a,
  .srf-bottom-nav > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--srf-muted);
    font-size: 10.5px;
    font-weight: 800;
    text-decoration: none;
    padding: 4px 2px;
  }
  .srf-bottom-nav > a.is-active,
  .srf-bottom-nav > button.is-active {
    background: var(--srf-primary);
    color: var(--srf-on-primary);
  }
  .srf-bottom-nav svg {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 640px) {
  .srf-hero {
    padding-bottom: 28px;
  }
  .srf-topbar {
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .srf-brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    padding: 4px;
  }
  .srf-brand__text strong {
    font-size: 16.5px;
    line-height: 1.25;
    white-space: normal;
  }
  .srf-topbar__actions {
    gap: 6px;
  }
  .srf-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }
  .srf-hero__grid {
    padding-top: 6px;
    padding-bottom: 10px;
  }
  .srf-hero__badge {
    display: none;
  }
  .srf-hero__title {
    margin: 4px 0 5px;
    font-size: clamp(22px, 5.8vw, 28px);
    line-height: 1.18;
  }
  .srf-hero__subtitle {
    font-size: 13px;
    line-height: 1.5;
  }
  .srf-hero__stats {
    gap: 6px;
    margin-top: 8px;
  }
  .srf-hero__stat-pill {
    padding: 4px 9px;
    font-size: 11px;
    border-radius: 10px;
  }
  .srf-guided-search {
    margin-top: 10px;
    padding: 8px;
    gap: 6px;
    border-radius: 16px;
  }
  .srf-guided-input,
  .srf-guided-select,
  .srf-guided-submit {
    min-height: 44px;
  }
}

/* First-fold tightening when App Surface Hero is rendered above .layout */
.srf-app-layout .srf-intro-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px !important;
}
.srf-app-layout .srf-intro-compact .country-geo-pill {
  flex: 1 1 auto;
}
.srf-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.srf-app-layout .mode-intro {
  margin-bottom: 10px !important;
  padding: 10px 14px !important;
}
.srf-app-layout .srf-redundant-search {
  display: none !important;
}
.srf-app-layout .top-tabs {
  margin-top: 4px !important;
}
.srf-adv-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--srf-primary-border);
  background: var(--srf-primary-soft);
  color: var(--srf-primary);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.srf-adv-trigger-btn svg {
  width: 15px;
  height: 15px;
}
