/* Caresnex — Shared Stylesheet v4.0  (Geist / Indigo design system) */
/* ── CX Icon system ──────────────────────────────────────────────────── */
.cx-icon { display:inline-block; vertical-align:middle; flex-shrink:0; }
.icon-chip .cx-icon { width:16px; height:16px; }
.tip-icon .cx-icon  { width:18px; height:18px; }
.rec-icon .cx-icon  { width:20px; height:20px; }
.gc-mi-icon .cx-icon { width:18px; height:18px; }
.tab-btn .cx-icon   { width:15px; height:15px; margin-right:5px; vertical-align:-2px; }
.db-icon .cx-icon   { width:22px; height:22px; }
/* ────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Brand palette ── */
  --ind:        #4F46E5;
  --ind2:       #6366F1;
  --ind-dark:   #3730A3;
  --ind-light:  #818CF8;
  --cyan:       #38BDF8;
  --ind-bg:     #EEF0FF;
  --ind-bg2:    #F5F3FF;

  /* Legacy aliases — so old pages using var(--teal/--navy) still render OK */
  --teal:       #4F46E5;
  --teal-dark:  #3730A3;
  --teal-light: #818CF8;
  --mint:       #C7C9F8;
  --mint-2:     #EEF0FF;
  --navy:       #15171C;
  --navy-2:     #1E2028;

  /* ── Neutral ink ── */
  --ink:        #15171C;
  --ink2:       #525761;
  --ink3:       #7A7F89;
  --muted:      #6B7280;

  /* ── Surface & borders ── */
  --cream:      #F7F8FC;
  --white:      #ffffff;
  --text:       #15171C;
  --line:       #E7EAF3;
  --bdr:        #E7EAF3;
  --bdr2:       #ECEFF6;

  /* ── Semantic ── */
  --orange:     #F59E0B;
  --orange-2:   #FEF3C7;
  --danger:     #DC2626;
  --success:    #16a34a;

  /* ── Gradients ── */
  --grad-teal:   linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  --grad-teal-v: linear-gradient(180deg, #5B52EE 0%, #4F46E5 100%);
  --grad-navy:   linear-gradient(135deg, #15171C 0%, #1E2028 100%);
  --grad-orange: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --grad-hero:   linear-gradient(135deg, #EEF0FF 0%, #F7F8FC 55%, #F0F4FF 100%);
  --grad-card:   linear-gradient(145deg, #ffffff 0%, #F9FAFF 100%);

  /* ── Shadows — indigo-tinted ── */
  --shadow-xs:   0 1px 3px rgba(79,70,229,.07);
  --shadow-sm:   0 2px 8px rgba(79,70,229,.08), 0 1px 3px rgba(21,23,28,.04);
  --shadow:      0 4px 16px rgba(79,70,229,.10), 0 2px 6px rgba(21,23,28,.05);
  --shadow-md:   0 8px 28px rgba(79,70,229,.13), 0 3px 8px rgba(21,23,28,.06);
  --shadow-lg:   0 20px 52px rgba(79,70,229,.14), 0 8px 18px rgba(21,23,28,.07);
  --shadow-teal: 0 8px 28px rgba(79,70,229,.30);
  --glow-teal:   0 0 0 3px rgba(79,70,229,.18);

  /* ── Spacing & shape ── */
  --radius:    20px;
  --radius-sm: 13px;
  --radius-xs: 8px;

  /* ── Motion ── */
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out:    cubic-bezier(0, 0, .2, 1);
  --t:           .18s var(--ease);
  --t-fast:      .10s var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif !important;
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* ── Global luminous wash (matches roadmap lx-wash) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,.10) 0%, rgba(56,189,248,.04) 45%, transparent 70%);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════
   TOP NAV  — glassmorphism
═══════════════════════════════════════ */
.site-nav {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(231, 234, 243, .80);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 16px rgba(79,70,229,.06);
  transition: box-shadow var(--t);
}
.site-nav:hover {
  box-shadow: 0 2px 24px rgba(79,70,229,.09);
}

.snav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.03em;
  margin-right: 12px;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}
.snav-brand:hover { opacity: .85; }
.snav-brand img { height: 28px; }
.snav-brand .wordmark { color: var(--ind); }

.snav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.snav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.snav-link:hover { background: var(--ind-bg); color: var(--ind-dark); }
.snav-link.active { color: var(--ind-dark); background: var(--ind-bg); }
.snav-link .arrow { font-size: 10px; opacity: .45; transition: transform var(--t); }

/* Dropdown */
.snav-dropdown { position: relative; }
.snav-dropdown.open .dropdown-menu { display: grid; }
.snav-dropdown.open .arrow { transform: rotate(180deg); opacity: .7; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  padding: 8px;
  z-index: 200;
  grid-template-columns: 1fr;
  gap: 2px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  transition: background var(--t-fast);
  letter-spacing: -.01em;
}
.dropdown-item:hover { background: var(--ind-bg); }
.dropdown-item .di-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ind-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-fast);
}
.dropdown-item .di-icon svg { stroke: var(--ind); width: 16px; height: 16px; flex-shrink: 0; }
.dropdown-item:hover .di-icon {
  background: var(--mint);
  transform: scale(1.08);
}
.dropdown-item:hover .di-icon svg { stroke: var(--ind2); }
.dropdown-item .di-text b { display: block; font-size: 13px; color: var(--ink); }
.dropdown-item .di-text span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

.snav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.snav-city-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ind-dark);
  background: var(--ind-bg);
  border-radius: 99px;
  padding: 5px 12px;
  border: 1px solid rgba(79,70,229,.15);
  letter-spacing: .01em;
}
.snav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}
.snav-user-btn:hover {
  border-color: var(--ind);
  box-shadow: var(--glow-teal);
}
.snav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
.snav-avatar img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.snav-username {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.01em;
}

/* Mobile hamburger */
.snav-hamburger {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
  color: var(--ink);
  font-size: 22px;
}

/* Mobile menu overlay */
.snav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21,23,28,.45);
  backdrop-filter: blur(4px);
  z-index: 200;
}
.snav-mobile-menu.open { display: block; }
.snav-mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: #fff;
  padding: 24px 20px;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0,0,0,.12);
}
.snav-mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}
.snav-mobile-section { margin-bottom: 20px; }
.snav-mobile-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.snav-mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: background var(--t-fast);
}
.snav-mobile-link:hover { background: var(--ind-bg); }
.snav-mobile-link .ml-icon { width: 28px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.snav-mobile-link .ml-icon svg { stroke: var(--ink2); width: 16px; height: 16px; flex-shrink: 0; }
.snav-mobile-link:hover .ml-icon svg { stroke: var(--ind); }

/* ═══════════════════════════════════════
   PAGE HERO  (unified — matches legal-aid style)
═══════════════════════════════════════ */
.page-hero {
  background: transparent;
  text-align: center;
  padding: 40px 24px 32px;
  position: relative;
  z-index: 1;
}
.page-hero::before { display: none; }
.page-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; }
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  color: #4338CA; background: #EEF0FF;
  padding: 4px 12px; border-radius: 99px;
  margin-bottom: 14px; letter-spacing: .04em; text-transform: uppercase;
}
.page-hero h1 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 800;
  color: var(--ink); margin: 0 0 12px;
  line-height: 1.1; letter-spacing: -.03em;
}
.page-hero p { color: var(--ink2); font-size: 15px; max-width: 560px; line-height: 1.6; margin: 0 auto; }

/* ═══════════════════════════════════════
   TOOL HERO  (unified — matches legal-aid style)
═══════════════════════════════════════ */
.tool-hero {
  background: transparent;
  text-align: center;
  padding: 40px 24px 32px;
  position: relative;
  z-index: 1;
}
.tool-hero::before { display: none; }
.tool-hero::after  { display: none; }
.tool-hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EEF0FF; border-radius: 99px;
  padding: 4px 12px;
  font-size: 11px; font-weight: 700; color: #4338CA;
  letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 14px;
}
.tool-hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  color: var(--ink, #15171C);
  margin: 0 0 12px;
  line-height: 1.1; letter-spacing: -.03em;
}
.tool-hero h1 br { display: none; }
.tool-hero h1 em { font-style: normal; color: #4F46E5; }
.tool-hero-sub {
  font-size: 15px;
  color: var(--ink2, #525761);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .tool-hero { padding: 28px 20px 24px; }
  .tool-hero h1 { font-size: 26px; }
}

/* Page content wrapper */
.page-body { max-width: 1100px; margin: 0 auto; padding: 32px; }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--grad-card);
  border: 1px solid rgba(231,234,243,.9);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(79,70,229,.15);
}
.card-sm {
  border-radius: var(--radius-sm);
  padding: 18px;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow var(--t), transform var(--t), background var(--t-fast);
  font-family: inherit;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) !important; }

.btn-primary {
  background: var(--grad-teal);
  color: #fff;
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(79,70,229,.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--ind-bg);
  color: var(--ind-dark);
  border: 1.5px solid rgba(79,70,229,.15);
}
.btn-secondary:hover {
  background: var(--mint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-orange {
  background: var(--grad-orange);
  color: #fff;
  box-shadow: 0 8px 24px rgba(245,158,11,.35);
}
.btn-orange:hover {
  box-shadow: 0 12px 28px rgba(245,158,11,.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ind);
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--ind-bg); }

.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 15px; }
.btn-sm { padding: 7px 13px; font-size: 12px; border-radius: 9px; }

/* ═══════════════════════════════════════
   BADGES / TAGS
═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: .02em;
}
.badge-green  { background: #ECFDF5; color: #065F46; border: 1px solid rgba(16,185,129,.2); }
.badge-orange { background: #FFFBEB; color: #92400E; border: 1px solid rgba(245,158,11,.2); }
.badge-blue   { background: var(--ind-bg); color: var(--ind-dark); border: 1px solid rgba(79,70,229,.15); }
.badge-gray   { background: var(--cream); color: var(--muted); border: 1px solid var(--line); }
.badge-red    { background: #FEF2F2; color: #991B1B; border: 1px solid rgba(220,38,38,.12); }

/* ═══════════════════════════════════════
   FORM FIELDS
═══════════════════════════════════════ */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 7px;
}
.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.field-input:focus {
  border-color: var(--ind);
  box-shadow: var(--glow-teal);
}
.field-input:hover:not(:focus) {
  border-color: #b8bfdb;
}
.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ═══════════════════════════════════════
   DIVIDERS & STAT ROWS
═══════════════════════════════════════ */
.section-divider {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: background var(--t-fast);
}
.stat-row:last-of-type { border-bottom: 0; }
.stat-row .lbl { color: var(--muted); }
.stat-row .val { font-weight: 800; color: var(--ink); letter-spacing: -.01em; }

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.site-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .22s var(--ease), transform .22s var(--ease-spring);
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  letter-spacing: -.01em;
}
.site-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.site-toast.success { background: var(--ind); box-shadow: var(--shadow-teal); }
.site-toast.error   { background: #991B1B; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 860px) {
  .snav-links { display: none; }
  .snav-hamburger { display: flex; }
  .snav-right .snav-city-chip { display: none; }
  .page-hero { padding: 28px 18px 24px; }
  .page-hero h1 { font-size: 26px; }
  .page-body { padding: 18px; }
}

/* ═══════════════════════════════════════
   TOOL-PAGE NAV  (.site-nav / .nav-inner / .nav-links)
   Used by: h1b-finder, gc-calculator, tax-guide,
            form-wizard, deadline-tracker, welcome, etc.
═══════════════════════════════════════ */
.site-nav {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bdr);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 12px rgba(79,70,229,.05);
}
.nav-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--ink);
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img { height: 26px; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 7px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink3);
  text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-links a:hover  { background: var(--ind-bg); color: var(--ind-dark); }
.nav-links a.active { background: var(--ind-bg); color: var(--ind-dark); font-weight: 700; }

/* Mobile: hide nav links, show hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px; margin: -6px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--ink2); border-radius: 99px; transition: all .2s;
}

/* Mobile drawer */
.nav-drawer {
  display: none; position: fixed; inset: 0; z-index: 200;
}
.nav-drawer.open { display: block; }
.nav-drawer-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
}
.nav-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(280px, 85vw);
  background: #fff; padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  overflow-y: auto;
}
.nav-drawer-close {
  align-self: flex-end; margin-bottom: 12px;
  background: var(--bdr2); border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 18px; cursor: pointer; color: var(--ink2);
}
.nav-drawer-panel a {
  display: block; padding: 12px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink2);
  text-decoration: none; transition: background .12s;
}
.nav-drawer-panel a:hover  { background: var(--ind-bg); color: var(--ind-dark); }
.nav-drawer-panel a.active { background: var(--ind-bg); color: var(--ind-dark); }
.nav-drawer-panel .nav-drawer-logo {
  font-size: 16px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.nav-drawer-panel .nav-drawer-logo img { height: 24px; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { height: 52px; }
  .nav-logo img { height: 22px; }

  /* Hero adjustments */
  .page-hero { padding: 24px 16px 20px; }
  .page-hero h1 { font-size: 24px; }
  .hero-icon { font-size: 28px; }
  .hero-sub { font-size: 13px; }
}

/* ═══════════════════════════════════════
   PWA INSTALL PROMPT BANNER
═══════════════════════════════════════ */
#pwa-prompt {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: #fff; border-top: 1.5px solid var(--bdr);
  box-shadow: 0 -4px 24px rgba(79,70,229,.12);
  padding: 14px 20px;
  display: none; /* shown by JS */
  align-items: center; gap: 14px;
  animation: slideUp .3s var(--ease-out);
}
#pwa-prompt.show { display: flex; }
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#pwa-prompt .pp-icon { font-size: 32px; flex-shrink: 0; }
#pwa-prompt .pp-text { flex: 1; }
#pwa-prompt .pp-title { font-size: 13px; font-weight: 800; color: var(--ink); }
#pwa-prompt .pp-sub   { font-size: 11px; color: var(--ink3); line-height: 1.4; margin-top: 2px; }
#pwa-prompt .pp-btn {
  background: var(--ind); color: #fff;
  border: none; border-radius: 10px; padding: 9px 16px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
#pwa-prompt .pp-btn:hover { background: #4338CA; }
#pwa-prompt .pp-dismiss {
  background: none; border: none; color: var(--ink3);
  font-size: 18px; cursor: pointer; padding: 4px; flex-shrink: 0;
  line-height: 1;
}
/* App icon in prompt */
#pwa-prompt .pp-appicon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
/* iOS instruction line */
#pwa-prompt .pp-ios-hint {
  font-size: 11px; color: var(--ind); margin-top: 4px; font-weight: 600;
}

/* ── Deep-link return widget ───────────────────────────────── */
#pwa-return-widget {
  position: fixed; bottom: 80px; left: 12px; right: 12px; z-index: 900;
  transform: translateY(20px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}
#pwa-return-widget.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.prw-inner {
  background: #1E1F26; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.prw-text  { flex: 1; min-width: 0; }
.prw-label { display: block; font-size: 11px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.prw-page  { font-size: 14px; font-weight: 700; color: #F9FAFB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.prw-time  { font-size: 11px; font-weight: 400; color: #6B7280; }
.prw-btn {
  background: #4F46E5; color: #fff; text-decoration: none;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.prw-btn:hover { background: #4338CA; }
.prw-dismiss {
  background: none; border: none; color: #6B7280; font-size: 18px;
  cursor: pointer; padding: 2px; flex-shrink: 0; line-height: 1;
}

/* ═══════════════════════════════════════
   SAFE-AREA (notch / home bar)
═══════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-nav, .snav-links { padding-top: env(safe-area-inset-top, 0); }
  #pwa-prompt {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
  }
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
}
