/* ==========================================================================
   Maydan landing — design system + components
   Static, dependency-free (Google Fonts + inline SVG only).
   ========================================================================== */

/* ---- Design tokens (from brief) ---------------------------------------- */
:root {
  /* Brand maroon */
  --brand-900: #65112D;
  --brand-800: #7D1235;
  --brand-700: #98133E;
  --brand-600: #B01849;
  --brand-100: #F8E9EE;
  --brand-50:  #FCF5F7;

  /* Neutrals */
  --ink-950: #17151A;
  --ink-800: #302D34;
  --ink-600: #625E67;
  --ink-500: #7B7680;
  --line:    #E6E2E5;
  --surface: #FFFFFF;
  --surface-subtle: #F8F7F8;
  --page:    #FCFBFC;

  /* Safety states */
  --state-normal:   #247A52;
  --state-advisory: #3973B8;
  --state-elevated: #A66A00;
  --state-high:     #C94D23;
  --state-severe:   #B42332;
  --state-resolved: #667085;

  /* Tinted state backgrounds (soft) */
  --state-normal-bg:   #E7F3EC;
  --state-advisory-bg: #E8F0F9;
  --state-elevated-bg: #FaF1DE;
  --state-high-bg:     #FBEBE4;
  --state-severe-bg:   #FaE7E9;
  --state-resolved-bg: #EEF0F3;

  /* Radii */
  --r-control: 11px;
  --r-card: 18px;
  --r-panel: 24px;

  /* Shadows (soft, restrained) */
  --shadow-sm: 0 1px 2px rgba(23,21,26,.05), 0 1px 3px rgba(23,21,26,.04);
  --shadow-md: 0 4px 16px rgba(23,21,26,.06), 0 2px 6px rgba(23,21,26,.04);
  --shadow-lg: 0 18px 48px rgba(101,17,45,.10), 0 6px 18px rgba(23,21,26,.05);

  /* Fonts */
  --font-latin: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  --font: var(--font-latin);

  --maxw: 1240px;
  --header-h: 68px;
}

/* Arabic font stack applied at the root when RTL */
html[dir="rtl"] { --font: var(--font-arabic); }

/* ---- Reset / base ------------------------------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body { line-height: 1.85; }

h1, h2, h3, h4 { color: var(--ink-950); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* tabular numerals for times/dates/counts */
.tnum, time, .metric, .stat-time { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---- Global icon-sizing safeguard -------------------------------------
   Inline SVGs (incl. JS-rendered icon() output with class .ic) declare a
   viewBox but no width/height, so without an explicit size they expand to
   intrinsic/container size and overlap content. This is the low-specificity
   floor: every icon gets a sane fixed box and never grows inside a flex row.
   Per-context rules below override these defaults where a different size is
   wanted. */
svg { flex: none; }                 /* never stretch/grow in a flex layout */
.ic, svg[data-icon] { width: 18px; height: 18px; flex: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 18px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; border-radius: 4px; }

/* Language visibility: elements can carry .lang-en / .lang-ar */
html[lang="en"] .lang-ar { display: none !important; }
html[lang="ar"] .lang-en { display: none !important; }

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand-700); color: #fff; padding: 10px 16px;
  border-radius: var(--r-control); transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: var(--r-control);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .06s ease, box-shadow .18s ease;
  text-align: center; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); box-shadow: var(--shadow-md); }
.btn-primary:focus-visible { outline-offset: 3px; }

.btn-secondary { background: var(--surface); color: var(--brand-700); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand-600); background: var(--brand-50); }

.btn-ghost { background: transparent; color: var(--ink-600); }
.btn-ghost:hover { background: var(--surface-subtle); color: var(--ink-950); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }

.textlink {
  color: var(--brand-700); font-weight: 600; border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.textlink:hover { border-bottom-color: var(--brand-600); }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--header-h); padding-block: 8px;
}

/* Logo lockup */
.logo-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-700); flex: none; }
.logo-lockup .logo-mark { height: 32px; width: auto; display: block; object-fit: contain; }
/* Wordmark: always Arabic (ميدان) on top, English (Maydan) below — both langs,
   both UI modes. DOM order (w-ar first) + flex-column keeps Arabic on top in
   LTR and RTL; align-items:flex-start mirrors to the correct side per dir. */
.logo-lockup .wordmark { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.logo-lockup .wordmark .w-ar,
.logo-lockup .wordmark .w-en { text-align: start; letter-spacing: 0; }
.logo-lockup .wordmark .w-ar { font-family: var(--font-arabic); font-size: 18px; font-weight: 700; color: var(--brand-700); }
.logo-lockup .wordmark .w-en { font-size: 15px; font-weight: 700; color: var(--ink-950); margin-top: 1px; }

.header-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.header-nav a {
  padding: 8px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink-600);
  transition: background .15s ease, color .15s ease;
}
.header-nav a:hover { background: var(--surface-subtle); color: var(--ink-950); }

.header-right { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

/* Regional status indicator (header) */
.region-status {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; line-height: 1.2;
}
.region-status .rs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--state-resolved); flex: none; }
.region-status .rs-text { display: flex; flex-direction: column; }
.region-status .rs-label { font-weight: 600; color: var(--ink-950); }
.region-status .rs-sub { font-size: 11.5px; color: var(--ink-500); }

/* Language switch */
.lang-switch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--r-control);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-800); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.lang-switch:hover { border-color: var(--brand-600); background: var(--brand-50); }
.lang-switch svg { width: 16px; height: 16px; color: var(--ink-500); }

/* Mobile menu button + drawer */
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-control);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-800);
}
.menu-toggle svg { width: 22px; height: 22px; }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(23,21,26,.4); z-index: 150;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; inset-inline-end: 0; z-index: 160;
  width: min(88vw, 340px); height: 100%; background: var(--surface);
  box-shadow: var(--shadow-lg); padding: 20px;
  transform: translateX(100%); transition: transform .24s ease;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
html[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer a { padding: 12px 10px; border-radius: 10px; font-size: 16px; font-weight: 500; color: var(--ink-800); }
.drawer a:hover { background: var(--surface-subtle); }
.drawer .btn { margin-top: 8px; }
.drawer-close { width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; color: var(--ink-600); border-radius: 8px; }
.drawer-close svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
  .header-nav, .header-right .region-status, .header-right .lang-switch, .header-right .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---- Section scaffolding ---------------------------------------------- */
section { scroll-margin-top: calc(var(--header-h) + 12px); }
.section { padding: 64px 0; }
.section-tight { padding: 44px 0; }
@media (max-width: 640px) { .section { padding: 44px 0; } }

.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
.section-head h2 { font-size: 36px; margin-top: 12px; }
.section-head p { font-size: 17px; color: var(--ink-600); margin-top: 12px; }
@media (max-width: 640px) { .section-head h2 { font-size: 28px; } }

/* Subtle geospatial texture background */
.geo-bg { position: relative; }
.geo-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(152,19,62,.05) 0, transparent 42%),
    linear-gradient(rgba(23,21,26,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,21,26,.028) 1px, transparent 1px);
  background-size: 100% 100%, 34px 34px, 34px 34px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0, transparent 92%);
}
.geo-bg > * { position: relative; z-index: 1; }

/* ---- Hero -------------------------------------------------------------- */
.hero { padding-top: 16px; padding-bottom: 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 48px; align-items: start;
}
.hero-eyebrow { margin-bottom: 18px; }
.hero h1 { font-size: 60px; line-height: 1.05; letter-spacing: -.02em; }
.hero h1 .accent { color: var(--brand-700); display: block; }
html[dir="rtl"] .hero h1 { line-height: 1.28; letter-spacing: 0; }
.hero-support { font-size: 18px; color: var(--ink-600); margin: 22px 0 28px; max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { margin-top: 22px; font-size: 14px; color: var(--ink-500); display: flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--state-normal); flex: none; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 { font-size: 46px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 38px; }
  .hero-support { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ---- Live Status Panel ------------------------------------------------- */
.status-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-panel); box-shadow: var(--shadow-lg); overflow: hidden;
}
.sp-top {
  display: flex; align-items: flex-start; gap: 12px; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--surface-subtle);
}
.sp-top-l { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sp-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
html[dir="rtl"] .sp-title { letter-spacing: 0; }
.sp-meta { font-size: 13px; color: var(--ink-600); }
.sp-meta .sep { color: var(--line); margin: 0 6px; }
.sp-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-600); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--surface-subtle); color: var(--ink-950); border-color: var(--brand-600); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.spin svg { animation: none; } }

.sp-body { padding: 18px 20px; }
.sp-summary { display: flex; gap: 14px; align-items: flex-start; }
.sp-summary-txt { flex: 1; min-width: 0; }
.sp-summary-txt .sp-state-name { font-size: 18px; font-weight: 700; color: var(--ink-950); }
.sp-summary-txt .sp-explain { font-size: 14.5px; color: var(--ink-600); margin-top: 4px; }
.sp-scope { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--ink-500); }
.sp-scope .lbl { color: var(--ink-500); }
.sp-scope .val { color: var(--ink-800); font-weight: 600; }

/* Demo / stale notices */
.notice {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 20px 0;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.notice-demo { background: var(--state-advisory-bg); color: #234; border: 1px solid #cdddf0; }
.notice-demo svg { color: var(--state-advisory); }
.notice-stale { background: var(--state-elevated-bg); color: #5a4200; border: 1px solid #ecd9a8; }
.notice-stale svg { color: var(--state-elevated); }
.notice[hidden] { display: none; }

/* Location tabs */
.loc-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 14px 20px 4px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.loc-tabs::-webkit-scrollbar { height: 5px; }
.loc-tabs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.loc-tab {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-600); font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.loc-tab:hover { border-color: var(--brand-600); color: var(--brand-700); }
.loc-tab[aria-selected="true"] { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }

/* Incident rows inside status panel */
.incident-list { padding: 8px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.incident {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.incident:hover { box-shadow: var(--shadow-sm); }
.incident-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.incident-loc { font-weight: 700; color: var(--ink-950); font-size: 14.5px; }
.incident-time { margin-inline-start: auto; font-size: 12px; color: var(--ink-500); }
.incident-summary { font-size: 14px; color: var(--ink-800); margin-top: 8px; }
.incident-detail { font-size: 13px; color: var(--ink-600); margin-top: 6px; display: flex; gap: 7px; align-items: flex-start; }
.incident-detail svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ink-500); }
.incident-detail .dl { font-weight: 600; color: var(--ink-800); }
.incident-foot { display: flex; align-items: center; gap: 12px; margin-top: 11px; flex-wrap: wrap; }
.verify-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--state-normal); font-weight: 600; }
.verify-count svg { width: 15px; height: 15px; }

/* ---- Badges: severity + status ---------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  letter-spacing: .02em; line-height: 1.3; border: 1px solid transparent;
}
html[dir="rtl"] .badge { letter-spacing: 0; }
.badge svg { width: 14px; height: 14px; flex: none; }

.sev-normal   { color: var(--state-normal);   background: var(--state-normal-bg);   border-color: #bfe0cd; }
.sev-advisory { color: var(--state-advisory); background: var(--state-advisory-bg); border-color: #c6dbf2; }
.sev-elevated { color: var(--state-elevated); background: var(--state-elevated-bg); border-color: #ecd9a8; }
.sev-high     { color: var(--state-high);     background: var(--state-high-bg);     border-color: #f2cbb9; }
.sev-severe   { color: var(--state-severe);   background: var(--state-severe-bg);   border-color: #f0bcc1; }
.sev-resolved { color: var(--state-resolved); background: var(--state-resolved-bg); border-color: #d5d9e0; }

/* status pill (Active/Monitoring/Resolved/Unconfirmed) */
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-600); }
.status-pill .st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--state-resolved); }
.status-pill.st-active { color: var(--state-high); }
.status-pill.st-active .st-dot { background: var(--state-high); position: relative; }
.status-pill.st-active .st-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--state-high); opacity: .5; animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.7); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status-pill.st-active .st-dot::after { animation: none; } }
.status-pill.st-monitoring { color: var(--state-advisory); }
.status-pill.st-monitoring .st-dot { background: var(--state-advisory); }
.status-pill.st-resolved { color: var(--state-resolved); }
.status-pill.st-resolved .st-dot { background: var(--state-resolved); }
.status-pill.st-unconfirmed { color: var(--state-elevated); }
.status-pill.st-unconfirmed .st-dot { background: var(--state-elevated); }

/* ---- Severity legend --------------------------------------------------- */
.sev-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.sev-legend .sl-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); }
.sev-legend .sl-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sev-legend .sl-desc { font-size: 13.5px; color: var(--ink-600); }

/* ---- Alerts section ---------------------------------------------------- */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; }
.filter-bar::-webkit-scrollbar { height: 5px; }
.filter-bar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.filter-chip {
  flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-600); font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--brand-600); color: var(--brand-700); }
.filter-chip[aria-pressed="true"] { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }

.alert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }

.alert-card {
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.alert-card .ac-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-card .ac-loc { font-weight: 700; color: var(--ink-950); font-size: 14px; }
.alert-card .ac-title { font-size: 16px; font-weight: 700; color: var(--ink-950); line-height: 1.3; }
.alert-card .ac-line { font-size: 13.5px; color: var(--ink-600); display: flex; gap: 8px; align-items: flex-start; }
.alert-card .ac-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ink-500); }
.alert-card .ac-line .k { font-weight: 600; color: var(--ink-800); }
.alert-card .ac-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.alert-card .ac-time { font-size: 12px; color: var(--ink-500); }

/* Expand / detail drawer inside a card */
.ac-expand { border: none; background: transparent; color: var(--brand-700); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.ac-expand svg { width: 15px; height: 15px; transition: transform .18s ease; }
.ac-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.ac-details { display: none; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-600); flex-direction: column; gap: 10px; }
.ac-details.open { display: flex; }
.ac-details h5 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin: 0 0 4px; }
html[dir="rtl"] .ac-details h5 { letter-spacing: 0; }
.source-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--surface-subtle); }
.source-item svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ink-500); }
.source-item .si-name { font-weight: 600; color: var(--ink-800); }
.source-item .si-meta { font-size: 12px; color: var(--ink-500); }

/* States: empty / loading / error */
.state-box {
  border: 1px dashed var(--line); border-radius: var(--r-card); background: var(--surface-subtle);
  padding: 40px 24px; text-align: center; color: var(--ink-600);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.state-box svg { width: 34px; height: 34px; color: var(--ink-500); }
.state-box h4 { color: var(--ink-800); font-size: 17px; }
.state-box p { font-size: 14px; max-width: 42ch; }

/* Skeletons */
.skeleton-card { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sk { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; border-radius: 6px; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-line { height: 12px; } .sk-line.sh { width: 60%; } .sk-title { height: 18px; width: 80%; } .sk-pill { height: 22px; width: 90px; border-radius: 999px; }

/* ---- Verification methodology ----------------------------------------- */
.verify-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 900px) { .verify-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .verify-steps { grid-template-columns: 1fr; } }
.vstep { position: relative; padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.vstep .vs-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-100); color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.vstep h4 { font-size: 16px; margin-bottom: 6px; }
.vstep p { font-size: 13.5px; color: var(--ink-600); }
.vstep .vs-icon { position: absolute; top: 20px; inset-inline-end: 16px; color: var(--brand-600); opacity: .5; }
.vstep .vs-icon svg { width: 20px; height: 20px; }

.source-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.source-cat { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-700); }
.source-cat svg { width: 15px; height: 15px; color: var(--brand-600); }

/* ---- Product capabilities (interface demos) --------------------------- */
.caps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .caps-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.cap-card { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); padding: 20px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.cap-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-100); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.cap-icon svg { width: 21px; height: 21px; }
.cap-card h3 { font-size: 18px; margin-bottom: 6px; }
.cap-card > p { font-size: 14px; color: var(--ink-600); margin-bottom: 16px; }
.cap-demo { margin-top: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-subtle); padding: 14px; }

/* mini alert demo */
.mini-alert .ma-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mini-alert .ma-loc { font-weight: 700; font-size: 13px; color: var(--ink-950); }
.mini-alert .ma-time { margin-inline-start: auto; font-size: 11px; color: var(--ink-500); }
.mini-alert .ma-line { font-size: 12.5px; color: var(--ink-700); margin-top: 5px; }
.mini-alert .ma-line .k { font-weight: 600; }
.mini-alert .ma-foot { margin-top: 9px; font-size: 11.5px; }

/* travel mini panel */
.mini-travel .mt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-travel .mt-row:last-child { border-bottom: none; }
.mini-travel .mt-code { font-weight: 800; font-size: 15px; color: var(--ink-950); font-variant-numeric: tabular-nums; }
.mini-travel .mt-body { flex: 1; min-width: 0; }
.mini-travel .mt-name { font-size: 12px; color: var(--ink-600); }
.mini-travel .mt-metric { font-size: 11px; color: var(--ink-500); }
.mini-travel .mt-row svg { width: 18px; height: 18px; flex: none; color: var(--ink-500); }
.mini-alert svg { width: 14px; height: 14px; }

/* family circle mini phone */
.mini-family { display: flex; flex-direction: column; gap: 10px; }
.mf-avatars { display: flex; gap: -6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 2px solid var(--surface); margin-inline-start: -8px; }
.avatar:first-child { margin-inline-start: 0; }
.mf-safe-btn { width: 100%; background: var(--state-normal); color: #fff; border: none; border-radius: 10px; padding: 11px; font-family: inherit; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mf-safe-btn svg { width: 17px; height: 17px; }
.mf-status { font-size: 12px; color: var(--ink-600); display: flex; align-items: center; gap: 7px; }
.mf-status svg { width: 15px; height: 15px; color: var(--state-normal); }
.mf-member { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-700); }
.mf-member .avatar { width: 26px; height: 26px; font-size: 11px; margin: 0; }

/* ---- Availability (now vs coming soon) -------------------------------- */
.avail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .avail-grid { grid-template-columns: 1fr; } }
.avail-col { border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); padding: 24px; }
.avail-col.now { border-color: #bfe0cd; background: linear-gradient(180deg, var(--state-normal-bg), var(--surface) 60%); }
.avail-col h3 { font-size: 18px; display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.avail-col .ac-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.avail-col.now .ac-tag { background: var(--state-normal); color: #fff; }
.avail-col.soon .ac-tag { background: var(--state-resolved-bg); color: var(--state-resolved); }
.avail-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.avail-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink-800); }
.avail-list li svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.avail-col.now .avail-list li svg { color: var(--state-normal); }
.avail-col.soon .avail-list li svg { color: var(--ink-500); }
.avail-col.soon .avail-list li { color: var(--ink-600); }

/* ---- Travel status section -------------------------------------------- */
.airport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.airport-card { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 18px; box-shadow: var(--shadow-sm); }
.airport-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.airport-iata { font-size: 22px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.airport-name { font-size: 13.5px; color: var(--ink-600); }
.airport-rows { display: flex; flex-direction: column; gap: 9px; }
.airport-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.airport-row .ar-k { color: var(--ink-500); display: flex; align-items: center; gap: 7px; }
.airport-row .ar-k svg { width: 15px; height: 15px; }
.airport-row .ar-v { font-weight: 600; color: var(--ink-800); }
.travel-reminder { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); font-size: 14px; color: var(--brand-900); }
.travel-reminder svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--brand-700); }

/* ---- Family circle feature section ------------------------------------ */
.family-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .family-section { grid-template-columns: 1fr; gap: 32px; } }
.family-copy h2 { font-size: 34px; margin-bottom: 16px; }
@media (max-width: 640px) { .family-copy h2 { font-size: 26px; } }
.family-copy .privacy-note { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--surface-subtle); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-600); }
.family-copy .privacy-note h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
html[dir="rtl"] .family-copy .privacy-note h4 { letter-spacing: 0; }
.family-copy .privacy-note ul { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 5px; }

/* phone mock */
.phone-mock { justify-self: center; width: 300px; max-width: 100%; background: var(--ink-950); border-radius: 34px; padding: 10px; box-shadow: var(--shadow-lg); }
.phone-screen { background: var(--page); border-radius: 26px; overflow: hidden; padding: 18px 16px; min-height: 480px; }
.phone-notch { width: 110px; height: 22px; background: var(--ink-950); border-radius: 0 0 14px 14px; margin: -10px auto 12px; }
.phone-app-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--brand-700); }
.phone-app-head .logo-mark { height: 22px; width: auto; object-fit: contain; }
.phone-app-head .wordmark { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.phone-app-head .wordmark .w-ar { font-family: var(--font-arabic); font-size: 14px; font-weight: 700; color: var(--brand-700); }
.phone-app-head .wordmark .w-en { font-size: 12px; font-weight: 700; letter-spacing: .01em; color: var(--ink-950); margin-top: 1px; }
.phone-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.phone-card h5 { font-size: 13px; margin-bottom: 10px; color: var(--ink-950); }

/* ---- Final CTA --------------------------------------------------------- */
.final-cta { background: var(--brand-900); color: #fff; border-radius: var(--r-panel); padding: 48px 40px; text-align: center; position: relative; overflow: hidden; }
.final-cta::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,.06) 0, transparent 40%),
                    radial-gradient(circle at 10% 90%, rgba(255,255,255,.05) 0, transparent 45%);
}
.final-cta > * { position: relative; }
.final-cta h2 { color: #fff; font-size: 36px; max-width: 20ch; margin: 0 auto 14px; }
@media (max-width: 640px) { .final-cta { padding: 36px 22px; } .final-cta h2 { font-size: 27px; } }
.final-cta p { color: rgba(255,255,255,.82); font-size: 17px; max-width: 52ch; margin: 0 auto 26px; }
.final-cta .hero-cta { justify-content: center; }
.final-cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.final-cta .btn-secondary:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--surface-subtle); border-top: 1px solid var(--line); padding: 52px 0 32px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: 14px; }
html[dir="rtl"] .footer-col h4 { letter-spacing: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--ink-600); }
.footer-col a:hover { color: var(--brand-700); }
.footer-brand p { font-size: 14px; color: var(--ink-600); margin: 14px 0; max-width: 34ch; }
.footer-contact { font-size: 14px; color: var(--ink-600); }

.disclaimer {
  margin-top: 36px; padding: 18px 20px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink-700);
  display: flex; gap: 12px; align-items: flex-start;
}
.disclaimer svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--brand-700); }
.footer-legal { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-500); }

/* ---- Sticky mobile CTA ------------------------------------------------- */
.mobile-cta-bar {
  display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 90;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
@media (max-width: 720px) { .mobile-cta-bar { display: block; } }

/* ---- utilities --------------------------------------------------------- */
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
[hidden] { display: none !important; }

/* ---- Hormuz Watch band (live from /api/status) ------------------------- */
.hormuz-band { background:var(--brand-900); color:#fff; border-bottom:3px solid var(--brand-600); }
.hormuz-band .hb-inner { display:flex; align-items:center; gap:12px; padding:11px 20px; flex-wrap:wrap; }
.hormuz-band .hb-ic { font-size:18px; line-height:1; }
.hormuz-band .hb-title { font-weight:700; font-size:14px; letter-spacing:.2px; }
.hormuz-band .hb-badge { font-weight:800; font-size:12px; letter-spacing:1px; padding:3px 12px; border-radius:8px; border:1.5px solid #ffffff55; }
.hormuz-band .hb-badge.closed { color:#fff; background:var(--state-severe); border-color:#ffffff44; }
.hormuz-band .hb-badge.open { color:#fff; background:var(--state-normal); border-color:#ffffff44; }
.hormuz-band .hb-sum { flex:1; min-width:200px; font-size:13px; color:#ffffffde; }
.hormuz-band .hb-tag { font-size:10px; font-weight:800; letter-spacing:1px; padding:2px 7px; border-radius:5px; background:#ffffff26; color:#fff; }
html[dir="rtl"] .hormuz-band .hb-inner { direction:rtl; }

/* Market Watch nav entry (free-trial teaser) */
.nav-market { display:inline-flex; align-items:center; gap:6px; }
.nav-free { font-size:9px; font-weight:800; letter-spacing:.5px; padding:2px 6px; border-radius:6px;
  background:var(--brand-600, #98133E); color:#fff; text-transform:uppercase; }
