/* ==========================================================================
   VEG26 SAS (France) — Solar Consulting, AI Energy & Client Portal
   Design system. Palette is taken from the logo: navy hexagon, sky-blue
   panels, emerald network mesh and the gold sun.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Navy (structure, dark panels) */
  --navy-950: #050d1a;
  --navy-900: #0a192f;
  --navy-800: #0b1d36;
  --navy-700: #12294a;
  /* Sky (primary) */
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  /* Emerald (energy / success) */
  --emerald-100: #dcfce7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  /* Gold (sun / premium accent) */
  --gold-100: #fef3c7;
  --gold-300: #fcd34d;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-700: #b45309;
  --gold-800: #92400e;
  /* Danger */
  --danger-50: #fef2f2;
  --danger-500: #ef4444;
  --danger-700: #b91c1c;

  /* Semantic names (kept for backwards compatibility with the components) */
  --topbar-bg: var(--navy-950);
  --header-bg: var(--navy-900);
  --header-text: #ffffff;
  --dark-panel: var(--navy-800);
  --bg-light: #f4f7fb;
  --section-alt: #e8eff7;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d4e0ed;
  --accent: var(--sky-500);
  --accent-light: var(--sky-400);
  --accent-dark: var(--sky-700); /* AA-safe on white for small text */
  --emerald: var(--emerald-500);
  --gold: var(--gold-500);
  --btn-text: #ffffff;

  /* Filled-button colours (all pass WCAG AA with white text) */
  --primary: #0277bd;
  --primary-hover: #01579b;

  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.14);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* One shared gutter so topbar, header, hero, sections and footer align */
  --gutter: max(1.25rem, 5vw, calc((100vw - 1240px) / 2));
  --header-h: 72px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: inherit; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--sky-50);
  color: var(--sky-700);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
}
::selection { background: rgba(14, 165, 233, 0.28); }
h1, h2, h3, h4 { text-wrap: balance; }

/* ---------- 3. Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  background: var(--gold-400);
  color: #1c1304;
  font-weight: 800;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--sky-400); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .nav-tab:focus-visible { outline-color: var(--gold-400); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 4. Topbar ---------- */
.topbar {
  background: var(--topbar-bg);
  color: #cbd5e1;
  font-size: 0.76rem;
  padding: 0.45rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-left { display: flex; align-items: center; gap: 0.7rem; min-width: 0; flex: 1; }
.topbar-left > span:not(.topbar-pill) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar-pill {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid var(--sky-500);
  color: var(--sky-300);
  padding: 0.12rem 0.55rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.topbar-cta {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #1c1304;
  border: none;
  padding: 0.26rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.2s;
}
.topbar-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45); }

/* ---------- 5. Header & navigation ---------- */
header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0.75rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #fff; flex-shrink: 0; min-width: 0; }
.brand-logo-img, .logo-tile {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 11px;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}
.brand-title { font-size: 1.35rem; font-weight: 900; letter-spacing: 0.5px; line-height: 1.1; }
.brand-title span { color: var(--sky-400); }
.brand-sub { display: block; font-size: 0.65rem; font-weight: 600; color: #94a3b8; letter-spacing: 0.7px; text-transform: uppercase; }

header nav { display: flex; gap: 0.35rem; align-items: center; }
.nav-tab {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid transparent;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-tab:hover { color: var(--sky-300); background: rgba(255, 255, 255, 0.06); }
.nav-tab.active { background: rgba(14, 165, 233, 0.18); border-color: var(--sky-500); color: var(--sky-300); }
header nav .btn { margin-left: 0.4rem; white-space: nowrap; }
/* on laptop widths the subtitle would squeeze the nav, so keep just the logo + wordmark */
@media (max-width: 1400px) { .brand-sub { display: none; } }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Buttons ---------- */
.btn {
  background: var(--primary);
  color: var(--btn-text);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.25;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(2, 119, 189, 0.35); }
.btn:active { transform: translateY(0); }
.btn-emerald { background: var(--emerald-700); }
.btn-emerald:hover { background: #065f46; box-shadow: 0 6px 18px rgba(4, 120, 87, 0.35); }
.btn-gold { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #1c1304; }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-400), var(--gold-500)); box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4); }
.btn-dark { background: var(--navy-900); }
.btn-dark:hover { background: var(--navy-700); box-shadow: 0 6px 18px rgba(10, 25, 47, 0.35); }
.btn-gradient { background: linear-gradient(135deg, var(--sky-600), var(--emerald-700)); }
.btn-gradient:hover { background: linear-gradient(135deg, var(--sky-700), #065f46); }
.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.2); box-shadow: none; }
.btn-soft { background: var(--sky-100); color: var(--sky-700); }
.btn-soft:hover { background: #bae6fd; box-shadow: none; }
.btn-danger-soft { background: #fee2e2; color: var(--danger-700); }
.btn-danger-soft:hover { background: #fecaca; box-shadow: none; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.7; cursor: progress; transform: none; box-shadow: none; }
/* every disabled button in the app is a "submitting" state: show a spinner */
.btn:disabled::before {
  content: "";
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-color: var(--navy-900);
  color: #fff;
  padding: clamp(3rem, 6vw, 5.2rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(5, 13, 26, 0.92) 0%, rgba(10, 25, 47, 0.76) 55%, rgba(10, 25, 47, 0.52) 100%);
  z-index: 1;
}
.hero > * { position: relative; z-index: 2; min-width: 0; }
.badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold-300);
  border: 1px solid rgba(251, 191, 36, 0.55);
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2rem, 1.2rem + 2.8vw, 3rem); line-height: 1.14; margin-bottom: 1.1rem; font-weight: 800; letter-spacing: -0.015em; }
.hero p { color: #e2e8f0; font-size: 1.05rem; margin-bottom: 1.8rem; max-width: 640px; }
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 2rem; }
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.3rem;
}
.trust-strip > div { border-left: 2px solid rgba(251, 191, 36, 0.75); padding-left: 0.75rem; line-height: 1.4; }
.trust-strip strong { color: #fff; display: block; font-size: 0.96rem; margin-bottom: 0.1rem; }

.hero-card {
  background: rgba(8, 20, 38, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 3px solid var(--sky-500);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}
.hero-card h3 { color: var(--sky-300); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.9rem; }
.hero-card .lead { font-size: 0.82rem; color: #cbd5e1; margin-bottom: 0.95rem; line-height: 1.55; }
.hero-card .btn { width: 100%; margin-top: 0.9rem; }
.hero-card .btn-solo { margin-top: 0; }
.hero-person { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; padding-bottom: 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.hero-person img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--sky-400); flex-shrink: 0; background: var(--navy-700); }
.hero-person.is-emerald img { border-color: var(--emerald-500); }
.hero-person small { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--sky-300); font-weight: 700; }
.hero-person.is-emerald small { color: var(--emerald-400); }
.hero-person strong { display: block; font-weight: 800; font-size: 0.96rem; color: #fff; }
.hero-person span { font-size: 0.75rem; color: #cbd5e1; }
.stat-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.72rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.88rem; }
.stat-row:last-of-type { border-bottom: none; }
.stat-val { font-weight: 800; font-size: 0.95rem; color: #fff; text-align: right; }

/* ---------- 8. Certification strip ---------- */
.cert-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1.15rem var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem 1.25rem;
  align-items: center;
}
.cert-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; font-weight: 700; color: var(--text); line-height: 1.35; min-width: 0; }
.cert-item svg { width: 26px; height: 26px; flex-shrink: 0; }
.cert-item span { display: block; font-size: 0.68rem; font-weight: 500; color: var(--muted); }

/* ---------- 9. Sections, cards, grids ---------- */
.section { padding: clamp(3rem, 6vw, 4.6rem) var(--gutter); scroll-margin-top: calc(var(--header-h) + 8px); }
.section-alt { background: var(--section-alt); }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 2.8rem; }
.section-title .eyebrow {
  color: var(--sky-700);
  font-weight: 800;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: block;
  margin-bottom: 0.5rem;
}
/* tri-colour mark echoing the logo: sky · emerald · gold */
.section-title .eyebrow::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 0 auto 0.75rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sky-500) 0 34%, var(--emerald-500) 34% 67%, var(--gold-500) 67% 100%);
}
.section-title h2 { font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.1rem); margin-bottom: 0.7rem; line-height: 1.22; font-weight: 800; letter-spacing: -0.01em; }
.section-title p { color: var(--muted); font-size: 1rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1.6rem; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card.is-featured { border: 2px solid var(--sky-500); }
.card.is-emerald { border: 2px solid var(--emerald-500); }
.card.is-gold { border: 2px solid var(--gold-500); }
.card-img { width: 100%; height: 220px; object-fit: cover; display: block; border-bottom: 2px solid var(--sky-500); background-color: #dbe6f1; }
.card-body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-tag { color: var(--sky-700); font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 0.45rem; line-height: 1.4; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; font-weight: 800; line-height: 1.3; }
.card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; flex: 1; }
.card .btn { margin-top: 1rem; width: 100%; }
.spec-list { list-style: none; border-top: 1px solid var(--border); padding-top: 0.85rem; font-size: 0.85rem; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; }
.spec-list li span { color: var(--muted); }
.spec-list li strong { font-weight: 700; text-align: right; }

.price-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--sky-100);
  color: var(--sky-700);
  border: 1px solid rgba(2, 132, 199, 0.22);
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.28rem 0.75rem;
  border-radius: 6px;
  margin: 0.2rem 0 0.8rem;
}
.price-badge.is-green { background: var(--emerald-100); color: #166534; border-color: rgba(22, 101, 52, 0.25); }
.price-badge.is-gold { background: var(--gold-100); color: var(--gold-800); border-color: rgba(146, 64, 14, 0.25); }

/* ---------- 10. Install features & timeline ---------- */
.install-feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 auto 2rem;
  max-width: 1240px;
}
.install-feature img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; display: block; background-color: #dbe6f1; }
.install-content { padding: clamp(1.4rem, 3vw, 2.3rem); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.install-content h3 { font-size: 1.45rem; margin-bottom: 0.75rem; font-weight: 800; line-height: 1.25; }
.install-content p { color: var(--muted); margin-bottom: 1.15rem; font-size: 0.95rem; }
.step-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.step-badge { background: #fff; border: 1px solid var(--border); padding: 0.85rem 1rem; border-radius: 10px; font-size: 0.88rem; line-height: 1.5; color: #1e293b; font-weight: 600; box-shadow: var(--shadow-sm); }
.step-badge strong { display: block; color: var(--sky-700); font-size: 0.8rem; font-weight: 800; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.4px; }
.timeline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 1.35rem; margin-top: 2rem; }
.timeline-step { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--sky-500); border-radius: 11px; padding: 1.45rem; box-shadow: var(--shadow-sm); min-width: 0; transition: transform 0.2s, box-shadow 0.2s; }
.timeline-step:nth-child(3n + 2) { border-top-color: var(--emerald-500); }
.timeline-step:nth-child(3n) { border-top-color: var(--gold-500); }
.timeline-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step-num { display: inline-block; background: var(--dark-panel); color: var(--sky-300); font-size: 0.7rem; font-weight: 800; padding: 0.22rem 0.7rem; border-radius: 50px; letter-spacing: 0.8px; margin-bottom: 0.6rem; line-height: 1.4; }
.timeline-step h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.4rem; }
.timeline-step p { font-size: 0.87rem; color: var(--muted); margin-bottom: 0.6rem; }
.step-meta { font-size: 0.76rem; font-weight: 700; color: var(--sky-700); border-top: 1px dashed var(--border); padding-top: 0.5rem; display: block; }

/* ---------- 11. Calculators ---------- */
.calc-box {
  background: #fff;
  border: 2px solid var(--sky-500);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.3rem);
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 3vw, 2.2rem);
  align-items: center;
  box-shadow: var(--shadow-md);
}
.calc-field { margin-bottom: 1.3rem; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; line-height: 1.45; }
.calc-field label span { color: var(--sky-700); font-weight: 800; }
.calc-out { background: var(--dark-panel); color: #fff; padding: clamp(1.25rem, 3vw, 1.8rem); border-radius: 10px; border-top: 3px solid var(--gold-500); min-width: 0; }
.calc-metric { padding: 0.72rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.calc-metric:last-of-type { border-bottom: none; margin-bottom: 1rem; }
.calc-metric span { font-size: 0.78rem; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.6px; }
.calc-metric strong { font-size: 1.28rem; line-height: 1.3; color: var(--sky-300); display: block; margin-top: 0.15rem; overflow-wrap: anywhere; }
.calc-out .btn { width: 100%; }

/* custom range slider (track uses the logo's sky → emerald) */
input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--sky-500), var(--emerald-500)); cursor: pointer; margin: 0.4rem 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--sky-600); box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45); transition: transform 0.15s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--sky-600); box-shadow: 0 2px 8px rgba(2, 132, 199, 0.45); }

/* ---------- 12. Shared form controls ---------- */
select,
.calc-field select,
.form-group select,
.cta-form select {
  -webkit-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  padding-right: 2.3rem !important;
  text-overflow: ellipsis;
}
.calc-field select, .form-group select, .table-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cta-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23cbd5e1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.calc-field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background-color: var(--bg-light);
  font-weight: 600;
}
.calc-field select:focus { outline: none; border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22); }
option { color: #0f172a; background: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-group { margin-bottom: 0.95rem; min-width: 0; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background-color: #f8fafc;
  color: var(--text);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #94a3b8; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--sky-500);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22);
}

/* ---------- 13. Call-to-action boxes (dark) ---------- */
.cta-box {
  background: var(--dark-panel);
  background-image: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.16), transparent 55%), radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.12), transparent 50%);
  color: #fff;
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold-500);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.2rem);
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.cta-box > * { min-width: 0; }
.cta-box h2 { font-size: clamp(1.4rem, 1rem + 1.5vw, 1.95rem); margin-bottom: 0.75rem; line-height: 1.22; }
.cta-box .lead { color: #cbd5e1; font-size: 0.94rem; margin-bottom: 1rem; }
.cta-form { display: grid; gap: 0.8rem; }
.cta-form input, .cta-form select {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.cta-form input::placeholder { color: #a5b4c8; }
.cta-form input:focus, .cta-form select:focus { outline: none; border-color: var(--sky-400); background-color: rgba(255, 255, 255, 0.13); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28); }
.cta-msg, .success-box {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid var(--emerald-500);
  color: #ecfdf5;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.success-box .success-title { display: block; color: var(--emerald-400); font-weight: 800; font-size: 1rem; margin-bottom: 0.4rem; }
.success-box h3 { color: var(--emerald-400); font-size: 1.05rem; margin-bottom: 0.45rem; line-height: 1.35; }
.success-box p { color: #e2e8f0; font-size: 0.88rem; margin-bottom: 0.85rem; }
.success-box strong { color: #fff; }
.success-box .btn { width: 100%; }
.ref-link-box { background: rgba(255, 255, 255, 0.08); border: 1px dashed var(--sky-400); padding: 0.85rem 1rem; border-radius: 8px; font-family: var(--mono); font-size: 0.84rem; color: #fff; overflow-wrap: anywhere; margin-top: 0.6rem; line-height: 1.5; }

/* ---------- 14. Referral tiers ---------- */
.tier-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 1.8rem; text-align: center; min-width: 0; transition: transform 0.2s, box-shadow 0.2s; }
.tier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tier-card.featured { border-color: var(--sky-500); box-shadow: var(--shadow-md); position: relative; }
.tier-card.featured::before { content: "★ " attr(data-flag); position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #1c1304; font-size: 0.7rem; font-weight: 800; padding: 0.2rem 0.75rem; border-radius: 50px; letter-spacing: 0.6px; text-transform: uppercase; white-space: nowrap; }
.tier-card h3 { font-size: 1.15rem; font-weight: 800; margin: 0.2rem 0; }
.tier-reward { font-size: 2.25rem; font-weight: 900; color: var(--sky-700); margin: 0.5rem 0 0.9rem; letter-spacing: -0.02em; }
.tier-card .spec-list { text-align: left; }

/* ---------- 15. Founder card ---------- */
.founder-card {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-md);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}
.founder-photo-wrap { text-align: center; }
.founder-photo { width: 100%; height: 340px; object-fit: cover; object-position: center top; border-radius: var(--radius); border: 3px solid var(--sky-100); box-shadow: 0 8px 24px rgba(2, 132, 199, 0.16); background-color: #dbe6f1; }
.founder-badge { display: inline-block; margin-top: 0.7rem; background: var(--navy-900); color: var(--sky-300); font-size: 0.74rem; font-weight: 800; padding: 0.32rem 0.8rem; border-radius: 50px; border: 1px solid rgba(56, 189, 248, 0.4); line-height: 1.4; }
.founder-content { min-width: 0; }
.founder-content .eyebrow { display: block; color: var(--sky-700); font-weight: 800; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 1.2px; }
.founder-content h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 1.85rem); font-weight: 900; color: var(--text); margin: 0.25rem 0; line-height: 1.2; }
.founder-title { font-size: 0.88rem; font-weight: 600; color: #475569; margin-bottom: 0.85rem; line-height: 1.55; }
.founder-content p.about { color: #334155; margin-bottom: 1.2rem; font-size: 0.94rem; line-height: 1.7; }
.founder-content .step-badges { margin-bottom: 1.2rem; }
.founder-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* ---------- 16. Footer ---------- */
footer { position: relative; background: var(--topbar-bg); color: #94a3b8; padding: 3rem var(--gutter) 2rem; font-size: 0.84rem; line-height: 1.6; }
footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--sky-500) 0 34%, var(--emerald-500) 34% 67%, var(--gold-500) 67% 100%); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem 3rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; min-width: 0; }
.footer-brand strong.name { color: #fff; font-size: 1.02rem; line-height: 1.4; display: block; margin-bottom: 0.3rem; }
.footer-brand strong { color: #e2e8f0; }
.footer-contact { text-align: right; }
.footer-contact strong { color: #e2e8f0; }
.footer-contact a { color: var(--sky-300); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-links a { color: #cbd5e1; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--gold-300); }
.footer-copy { grid-column: 1 / -1; font-size: 0.76rem; color: #8da0b7; }

/* ---------- 17. Portal / admin ---------- */
.portal-wrap { padding: clamp(2rem, 5vw, 3.2rem) var(--gutter); min-height: 76vh; }
.auth-wrap { max-width: 560px; margin: clamp(1.5rem, 4vw, 2.5rem) auto; padding: 0 1.25rem; min-height: 60vh; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.page-head > div { min-width: 0; flex: 1 1 360px; }
.page-head > .btn { flex-shrink: 0; }
.page-head h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 1.95rem); font-weight: 800; line-height: 1.25; }
.page-head p { color: var(--muted); font-size: 0.9rem; }
.pill-row { margin-bottom: 0.5rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.kpi-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--sky-500); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-sm); min-width: 0; }
.kpi-card.is-emerald { border-left-color: var(--emerald-500); }
.kpi-card.is-gold { border-left-color: var(--gold-500); }
.kpi-card.is-navy { border-left-color: var(--navy-700); }
.kpi-card span { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.8px; }
.kpi-card strong { display: block; font-size: 1.85rem; font-weight: 900; color: var(--text); margin-top: 0.25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.kpi-card strong.is-sm { font-size: 1.3rem; }
.kpi-card strong.is-ok { color: var(--emerald-700); }
.kpi-card strong.is-code { color: var(--sky-700); font-family: var(--mono); }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 1.8rem; align-items: start; }
.admin-grid > * { min-width: 0; }
.panel-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow-sm); margin-bottom: 1.6rem; }
.panel-box.is-sky { border-top: 4px solid var(--sky-500); }
.panel-box.is-emerald { border-top: 4px solid var(--emerald-500); }
.panel-box.is-navy { border-top: 4px solid var(--navy-900); }
.panel-box.is-dark { background: var(--dark-panel); color: #fff; border-color: rgba(255, 255, 255, 0.08); border-top: 4px solid var(--gold-500); }
.panel-box.is-dark h3 { color: var(--sky-300); }
.panel-box.is-dark .sub { color: #cbd5e1; }
.panel-box.is-dark .spec-list { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.12); }
.panel-box.is-dark .spec-list li span { color: #94a3b8; }
.panel-box h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.35rem; color: var(--text); line-height: 1.3; }
.panel-box .sub { font-size: 0.84rem; color: var(--muted); margin-bottom: 1.2rem; display: block; }
.panel-box .id-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.panel-box .id-row img { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -0.25rem; padding: 0 0.25rem; }
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.84rem; }
.data-table th { text-align: left; padding: 0.7rem 0.6rem; background: var(--bg-light); color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.6px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #f8fbfe; }
.cell-sub { display: block; font-size: 0.75rem; color: var(--muted); line-height: 1.45; }
.cell-code { display: block; font-size: 0.73rem; color: var(--sky-700); font-family: var(--mono); }
.cell-money { font-size: 0.75rem; color: var(--emerald-700); font-weight: 700; display: block; }
.table-select { padding: 0.3rem 0.5rem; border-radius: 6px; border: 1px solid var(--border); font-size: 0.78rem; font-weight: 700; background-color: #fff; background-position: right 0.5rem center; background-size: 10px; padding-right: 1.6rem !important; max-width: 100%; }
.data-table .btn { white-space: nowrap; }
.data-table td:first-child { white-space: nowrap; }
.auth-title { font-size: 1.65rem; font-weight: 800; margin-bottom: 0.35rem; line-height: 1.25; }
.auth-lead { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.4rem; }
.login-creds {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--sky-50);
  border: 1px solid var(--sky-300);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text);
}
.login-creds span { white-space: nowrap; }
.login-creds strong { color: var(--muted); font-weight: 600; }
.login-creds .btn { margin-left: auto; flex-shrink: 0; }
.empty-state { text-align: center; color: var(--muted); font-size: 0.86rem; padding: 2rem 1rem; }

.reg-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.reg-table tr { border-bottom: 1px solid var(--border); }
.reg-table tr:last-child { border-bottom: none; }
.reg-table td { padding: 0.65rem 0.3rem; vertical-align: top; overflow-wrap: anywhere; }
.reg-table td:first-child { color: var(--muted); font-weight: 600; width: 40%; }
.reg-table td:last-child { font-weight: 700; color: var(--text); text-align: right; }
.reg-table .is-money { color: var(--emerald-700); }

.status-pill { display: inline-block; padding: 0.22rem 0.65rem; border-radius: 14px; font-size: 0.72rem; font-weight: 700; line-height: 1.4; background: var(--sky-100); color: var(--sky-700); }
.status-pill.paid, .status-pill.active { background: var(--emerald-100); color: #166534; }
.status-pill.warn { background: var(--gold-100); color: var(--gold-800); }
.status-pill.danger { background: #fee2e2; color: var(--danger-700); }

.alert { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid; font-size: 0.85rem; font-weight: 600; line-height: 1.5; margin-bottom: 1rem; }
.alert > div { flex: 1; min-width: 0; }
.alert-error { background: var(--danger-50); border-color: var(--danger-500); color: var(--danger-700); }
.alert-info { background: var(--sky-50); border-color: var(--sky-500); color: var(--sky-700); }
.alert-ok { background: #ecfdf5; border-color: var(--emerald-500); color: #166534; }

/* segmented control (client portal sign-in / register) */
.seg { display: inline-flex; gap: 0.35rem; background: #e2e8f0; padding: 0.35rem; border-radius: 10px; margin-top: 1.1rem; max-width: 100%; }
.seg button { padding: 0.6rem 1.25rem; border-radius: 7px; border: none; background: transparent; color: #334155; font-weight: 800; font-size: 0.86rem; transition: background 0.2s, color 0.2s; }
.seg button[aria-selected="true"] { background: var(--navy-900); color: #fff; box-shadow: 0 2px 8px rgba(10, 25, 47, 0.25); }
.seg button.is-sky[aria-selected="true"] { background: var(--primary); }

/* ---------- 17b. Admin sidebar layout ---------- */
.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h) - 40px);
}
.admin-nav {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  z-index: 10;
}
.admin-nav-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-nav-profile img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sky-400);
  flex-shrink: 0;
  background: #dbe6f1;
}
.admin-nav-profile strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.admin-nav-profile span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-nav-links {
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.admin-nav-btn:hover { background: var(--bg-light); color: var(--text); }
.admin-nav-btn.active {
  background: var(--sky-50);
  color: var(--primary);
  font-weight: 700;
}
.admin-nav-btn.active svg { stroke: var(--primary); }
.admin-nav-btn svg { flex-shrink: 0; color: inherit; }
.admin-nav-btn span { flex: 1; }
.admin-nav-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
}
.admin-nav-logout {
  margin: auto 0.75rem 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}
.admin-nav-logout:hover { color: var(--danger-700); background: var(--danger-50); }

.admin-main {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-light);
  overflow-y: auto;
}
.admin-page-header {
  margin-bottom: 1.75rem;
}
.admin-page-header h2 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.admin-page-header span {
  font-size: 0.88rem;
  color: var(--muted);
}
.admin-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.8rem;
  align-items: start;
}

/* ---------- 18. Gmail-style mailbox ---------- */
.gmail-wrap { margin-bottom: 1.5rem; }
.gmail-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.gmail-search {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #edf2f7;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.gmail-search:focus-within {
  background: #fff;
  border-color: var(--sky-400);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}
.gmail-search svg { flex-shrink: 0; color: var(--muted); }
.gmail-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
}
.gmail-search input::placeholder { color: #94a3b8; }
.gmail-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.gmail-toolbar-info {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.gmail-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s;
}
.gmail-icon-btn:hover { background: #edf2f7; color: var(--text); }

.gmail-shell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 200px 340px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
}
.gmail-shell > * { min-width: 0; }

/* Folder sidebar */
.gmail-folders {
  padding: 1rem 0.65rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.gmail-compose-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 4px rgba(2, 119, 189, 0.35);
  transition: box-shadow 0.2s, transform 0.15s;
}
.gmail-compose-btn:hover {
  box-shadow: 0 4px 14px rgba(2, 119, 189, 0.4);
  transform: translateY(-1px);
}
.gmail-compose-btn svg { flex-shrink: 0; }
.gmail-folder-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: 0 16px 16px 0;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.gmail-folder-btn:hover { background: #edf2f7; }
.gmail-folder-btn.active {
  background: var(--sky-100);
  color: var(--primary);
  font-weight: 700;
}
.gmail-folder-label { flex: 1; }
.gmail-folder-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.08rem 0.5rem;
  border-radius: 50px;
}
.gmail-folder-count {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

/* Message list */
.gmail-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 640px;
}
.gmail-msg {
  display: grid;
  grid-template-columns: 28px minmax(120px, 0.4fr) minmax(0, 1fr) auto;
  gap: 0 0.6rem;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.12s;
  background: #fff;
}
.gmail-msg:hover { background: #f8fafc; }
.gmail-msg.unread { background: #fff; }
.gmail-msg.unread .gmail-msg-sender { font-weight: 800; color: var(--text); }
.gmail-msg.unread .gmail-msg-subject { font-weight: 700; color: var(--text); }
.gmail-msg.selected { background: var(--sky-50); }

.gmail-msg-star {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
}
.gmail-msg-star:hover { background: #f1f5f9; }
.gmail-msg-sender {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gmail-msg-content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--muted);
}
.gmail-msg-subject {
  font-weight: 600;
  color: #374151;
}
.gmail-msg-snippet { color: #9ca3af; }
.gmail-msg-date {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Reader pane */
.gmail-reader {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
  max-height: 640px;
}
.gmail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: auto;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
.gmail-message {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}
.gmail-message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.gmail-message-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.gmail-message-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.gmail-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sky-500);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gmail-message-from {
  flex: 1;
  min-width: 0;
}
.gmail-message-from strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.gmail-message-from > div:first-child span {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 0.4rem;
}
.gmail-message-to {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.gmail-message-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.gmail-reader-frame {
  width: 100%;
  min-height: 200px;
  height: 320px;
  border: none;
  border-radius: 0;
  background: #fff;
  display: block;
  flex: 1;
}
.gmail-message-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.gmail-message-actions .btn { gap: 0.4rem; }

/* Compose view */
.gmail-compose {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gmail-compose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.gmail-compose-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.gmail-compose-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 55px;
}
.gmail-compose-field input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  padding: 0.35rem 0;
}
.gmail-compose-to {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}
.gmail-compose-to input { min-width: 0; }
.gmail-compose-body {
  margin-top: 0.75rem;
  flex: 1;
}
.gmail-compose-body textarea {
  width: 100%;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  resize: vertical;
  line-height: 1.6;
  min-height: 180px;
}
.gmail-compose-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
}
.gmail-send-result {
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--sky-50);
  border: 1px solid var(--sky-300);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--sky-700);
}

/* ---------- 19. Skeleton loaders ---------- */
.skeleton {
  display: block;
  background: linear-gradient(90deg, #e3ebf4 25%, #f3f7fb 40%, #e3ebf4 60%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.is-dark .skeleton { background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.16) 40%, rgba(255, 255, 255, 0.08) 60%); }
.skeleton-stack { display: grid; gap: 0.6rem; }
.skeleton-row { display: grid; gap: 1rem; align-items: center; padding: 0.9rem 0.6rem; border-bottom: 1px solid var(--border); }

/* ---------- 20. Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); } 50% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); } }
@keyframes floatSlow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.anim-fade-up { animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-float { animation: floatSlow 5s ease-in-out infinite; }
.btn-pulse { animation: pulseGlow 2.6s infinite; }

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

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Navigation collapses before it can collide with the logo */
@media (max-width: 1240px) {
  .nav-toggle { display: inline-flex; }
  header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.85rem var(--gutter) 1.25rem;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  header nav.open { display: flex; }
  .nav-tab { text-align: left; padding: 0.8rem 0.9rem; font-size: 0.95rem; min-height: 44px; }
  header nav .btn { margin: 0.5rem 0 0; min-height: 46px; }
  .topbar-left > span:not(.topbar-pill) { display: none; }
  .topbar-left { flex: 0 1 auto; }
}

@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-settings-grid { grid-template-columns: minmax(0, 1fr); }
  /* Admin sidebar collapses */
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-nav {
    position: relative;
    top: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    gap: 0.25rem;
  }
  .admin-nav-profile { border-bottom: none; padding: 0.5rem 0.75rem; }
  .admin-nav-links { flex-direction: row; flex-wrap: wrap; padding: 0; gap: 0.15rem; }
  .admin-nav-btn { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .admin-nav-logout { margin: 0; border-top: none; border-radius: 8px; }
  /* Gmail mailbox stacks */
  .gmail-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .gmail-folders {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    gap: 0.35rem;
  }
  .gmail-compose-btn { margin-bottom: 0; margin-right: 0.5rem; }
  .gmail-folder-btn { border-radius: 8px; padding: 0.45rem 0.75rem; }
  .gmail-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 300px; }
  .gmail-msg { grid-template-columns: 28px minmax(80px, 0.3fr) minmax(0, 1fr) auto; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero::before { background: linear-gradient(180deg, rgba(5, 13, 26, 0.93) 0%, rgba(10, 25, 47, 0.84) 100%); }
  .hero p { max-width: none; }
  .install-feature, .calc-box, .cta-box, .founder-card, .registry-grid { grid-template-columns: minmax(0, 1fr); }
  .install-feature img { min-height: 0; height: 250px; order: -1; }
  .founder-photo-wrap { max-width: 320px; margin: 0 auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { text-align: left; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .topbar { justify-content: center; }
  .topbar-pill { display: none; }
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn { width: 100%; }
  .anim-float { animation: none; }
  .badge { border-radius: 14px; }
  .step-badges { grid-template-columns: minmax(0, 1fr); }
  .reader-title { flex-direction: column; }
  .reader-title .status-pill { max-width: 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; padding: 0.6rem 0.5rem; }
  .brand-sub { display: none; }
  .reg-table td { display: block; width: 100% !important; text-align: left !important; padding: 0.15rem 0.3rem; }
  .reg-table td:first-child { padding-top: 0.65rem; font-size: 0.78rem; }
  .reg-table td:last-child { padding-bottom: 0.65rem; }
  .login-creds { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .login-creds .btn { margin-left: 0; width: 100%; }
  .admin-nav-links { gap: 0.1rem; }
  .admin-nav-btn svg { display: none; }
  .admin-page-header h2 { font-size: 1.35rem; }
  .gmail-toolbar { flex-direction: column; align-items: stretch; }
  .gmail-toolbar-info { display: none; }
  .gmail-reader { max-height: none; }
  .gmail-list { max-height: 250px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .card-img { height: 190px; }
  .spec-list li { flex-direction: column; gap: 0.1rem; }
  .spec-list li strong { text-align: left; }
  .stat-row { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .stat-val { text-align: left; }
  .trust-strip { grid-template-columns: minmax(0, 1fr); }
  .brand-title { font-size: 1.2rem; }
  .brand-logo-img, .logo-tile { width: 40px; height: 40px; }
  .portal-wrap { padding-left: 1rem; padding-right: 1rem; }
  .auth-wrap { padding: 0 0.75rem; }
  .auth-title { font-size: 1.35rem; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .kpi-card { padding: 0.85rem 1rem; }
  .kpi-card strong { font-size: 1.45rem; }
  .admin-main { padding: 1rem; }
  .admin-nav { padding: 0.35rem 0.5rem; }
  .admin-nav-profile { padding: 0.35rem; gap: 0.5rem; }
  .admin-nav-profile img { display: none; }
  .admin-nav-profile strong { font-size: 0.78rem; }
  .admin-nav-profile span { display: none; }
  .admin-nav-btn { padding: 0.4rem 0.6rem; font-size: 0.76rem; }
  .admin-page-header h2 { font-size: 1.2rem; }
  .admin-page-header span { font-size: 0.8rem; }
  .panel-box { padding: 1rem; }
  .gmail-shell { border-radius: 8px; }
  .gmail-folders { padding: 0.5rem; gap: 0.25rem; }
  .gmail-compose-btn { padding: 0.55rem 0.85rem; font-size: 0.82rem; border-radius: 12px; }
  .gmail-folder-btn { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
  .gmail-msg { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 0.5rem 0.65rem; }
  .gmail-msg-content { display: none; }
  .gmail-msg-sender { font-size: 0.8rem; }
  .gmail-msg-date { font-size: 0.7rem; }
  .gmail-compose-to { flex-direction: column; }
  .gmail-compose { padding: 1rem; }
  .gmail-message { padding: 1rem; }
  .gmail-message-header { flex-direction: column; }
  .gmail-message-header h3 { font-size: 1.05rem; }
  .gmail-message-meta { flex-wrap: wrap; }
  .gmail-message-date { width: 100%; margin-top: 0.25rem; }
  .gmail-message-actions { flex-direction: column; }
  .gmail-message-actions .btn { width: 100%; }
  .gmail-reader-frame { min-height: 150px; height: 220px; }
  .founder-card { padding: 1rem; }
  .founder-photo { height: 260px; }
  .founder-actions .btn { width: 100%; }
  .login-creds { padding: 0.65rem 0.85rem; font-size: 0.78rem; }
  .data-table { min-width: 480px; font-size: 0.78rem; }
}

/* ==========================================================================
   20 · MOBILE RESPONSIVENESS FIXES
   ========================================================================== */

/* ---- Base overflow prevention (all widths) ---- */
html { overflow-x: hidden; }
main, footer, .hero, .section, .portal-wrap, .auth-wrap, .admin-shell {
  max-width: 100vw; overflow-x: hidden;
}
input, select, textarea { max-width: 100%; box-sizing: border-box; }
.calc-box { overflow: hidden; }
.calc-field select, .cta-form select, .cta-form input { max-width: 100%; }
.calc-field label { overflow-wrap: anywhere; }

/* ---- Touch-target minimums on coarse pointers ---- */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .nav-tab { min-height: 44px; }
  .gmail-icon-btn { min-width: 44px; min-height: 44px; }
  .gmail-msg-star { min-width: 44px; min-height: 44px; }
  .admin-nav-btn { min-height: 44px; }
  .gmail-folder-btn { min-height: 44px; }
}

/* ---- 1100px: Gmail touch & folder labels ---- */
@media (max-width: 1100px) {
  .gmail-compose-btn { min-height: 44px; }
  .gmail-folder-btn { min-height: 44px; }
  .gmail-search { min-height: 44px; }
  .gmail-search input { min-height: 36px; font-size: 16px; }
  .gmail-folder-label { display: none; }
  .gmail-folder-btn svg { margin: 0; }
}

/* ---- 980px: Select overflow on tablets ---- */
@media (max-width: 980px) {
  .calc-field select, .cta-form select {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.84rem;
  }
  .calc-metric strong { font-size: 1.1rem; }
}

/* ---- 720px: Tablets & small laptops ---- */
@media (max-width: 720px) {
  /* Calc & CTA boxes */
  .calc-box { padding: 1rem; gap: 1.25rem; }
  .calc-out { padding: 1rem; }
  .calc-metric strong { font-size: 1.05rem; }
  .calc-field label { font-size: 0.84rem; line-height: 1.45; }
  .calc-field select {
    font-size: 0.82rem; white-space: normal; line-height: 1.4;
    padding: 0.6rem 2.3rem 0.6rem 0.75rem;
  }
  .cta-box { padding: 1.15rem; gap: 1.25rem; }
  .cta-box h2 { font-size: 1.25rem; }
  .cta-form input, .cta-form select { font-size: 0.84rem; padding: 0.65rem 0.8rem; }
  .cta-form select { padding-right: 2.2rem; white-space: normal; line-height: 1.4; }
  .cta-form .btn { font-size: 0.82rem; padding: 0.6rem 0.8rem; }
  .price-badge { font-size: 0.78rem; padding: 0.22rem 0.6rem; word-break: break-word; }
  .ref-link-box { font-size: 0.76rem; word-break: break-all; padding: 0.7rem 0.85rem; }
  input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
  input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; }

  /* Founder card */
  .founder-content h2 { font-size: 1.3rem; }
  .founder-title { font-size: 0.82rem; }
  .founder-content p.about { font-size: 0.88rem; }
  .founder-badge { font-size: 0.7rem; padding: 0.25rem 0.65rem; }

  /* Tier cards (referral) */
  .tier-card { padding: 1.2rem; }
  .tier-reward { font-size: 1.75rem; margin: 0.3rem 0 0.65rem; }

  /* Hero card stats */
  .hero-card { padding: 1.1rem; }
  .hero-card .stat-row { font-size: 0.82rem; padding: 0.55rem 0; }
  .hero-card .stat-val { font-size: 0.86rem; }

  /* Register / Portal page */
  .section-title h2 { font-size: 1.35rem; }
  .section-title p { font-size: 0.88rem; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h2 { font-size: 1.3rem; }
  .page-head p { font-size: 0.82rem; }
  .status-pill { font-size: 0.65rem; padding: 0.18rem 0.5rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Gmail compose fields */
  .gmail-msg { min-height: 52px; padding: 0.65rem 0.75rem; }
  .gmail-msg-star { width: 44px; height: 44px; }
  .gmail-msg-sender { font-size: 0.86rem; }
  .gmail-msg-date { font-size: 0.72rem; }
  .gmail-compose-field { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .gmail-compose-field label { min-width: unset; }
  .gmail-compose-field input { min-height: 44px; font-size: 16px; padding: 0.5rem 0; }
  .gmail-compose-body textarea { font-size: 16px; min-height: 200px; }
  .gmail-compose-actions .btn { min-height: 44px; }
  .gmail-icon-btn { width: 44px; height: 44px; }
  .gmail-message-actions .btn { min-height: 44px; }
}

/* ---- 600px: Admin panel compaction ---- */
@media (max-width: 600px) {
  .admin-nav { padding: 0.35rem 0.5rem; gap: 0.15rem; }
  .admin-nav-profile { width: 100%; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 0.15rem; }
  .admin-nav-profile div { overflow: hidden; }
  .admin-nav-links { width: 100%; justify-content: stretch; }
  .admin-nav-btn { flex: 1 1 auto; justify-content: center; text-align: center; padding: 0.45rem 0.4rem; font-size: 0.76rem; min-width: 0; }
  .admin-nav-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-nav-badge { padding: 0.05rem 0.35rem; font-size: 0.62rem; min-width: 16px; }
  .admin-nav-logout { width: 100%; justify-content: center; padding: 0.4rem; margin-top: 0.15rem; border-top: 1px solid var(--border); }
  .admin-main { padding: 0.85rem; }
  .admin-page-header { margin-bottom: 1.25rem; }
  .admin-page-header h2 { font-size: 1.15rem; }
  .admin-page-header span { font-size: 0.78rem; }
  .admin-settings-grid { gap: 1rem; }
  .data-table { min-width: 520px; font-size: 0.78rem; }
  .data-table th, .data-table td { padding: 0.55rem 0.4rem; }
  .data-table th { font-size: 0.66rem; }
  .panel-box { padding: 0.85rem; margin-bottom: 1rem; }
  .panel-box h3 { font-size: 1rem; }
  .panel-box .sub { font-size: 0.78rem; margin-bottom: 0.85rem; }
}

/* ---- 480px: Phone portrait ---- */
@media (max-width: 480px) {
  :root { --gutter: max(1rem, 4vw); }

  /* Topbar */
  .topbar-cta { font-size: 0.68rem; padding: 0.22rem 0.6rem; }

  /* Hero */
  .hero { padding: 2rem var(--gutter) 1.8rem; min-height: 0; }
  .hero h1 { font-size: 1.55rem; margin-bottom: 0.85rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 1.2rem; }
  .hero-actions { gap: 0.6rem; margin-bottom: 1.2rem; }
  .badge { font-size: 0.65rem; padding: 0.3rem 0.7rem; letter-spacing: 0.5px; white-space: normal; text-align: center; }

  /* Hero card */
  .hero-card { padding: 1rem; }
  .hero-card h3 { font-size: 0.76rem; margin-bottom: 0.65rem; }
  .hero-card .lead { font-size: 0.78rem; margin-bottom: 0.7rem; }
  .hero-card .stat-row { font-size: 0.78rem; padding: 0.45rem 0; }

  /* Trust strip */
  .trust-strip { gap: 0.75rem; padding-top: 1rem; font-size: 0.78rem; }
  .trust-strip strong { font-size: 0.88rem; }

  /* Section titles */
  .section { padding-top: 2rem; padding-bottom: 2rem; }
  .section-title { margin-bottom: 1.5rem; }
  .section-title h2 { font-size: 1.2rem; margin-bottom: 0.4rem; }
  .section-title p { font-size: 0.82rem; }

  /* Cards */
  .card-body { padding: 1.1rem; }
  .card-body h3, .card h3 { font-size: 1.05rem; }
  .card p { font-size: 0.85rem; }
  .card-tag { font-size: 0.66rem; letter-spacing: 0.6px; }
  .grid-3 { gap: 1rem; }

  /* Calc boxes */
  .calc-box { padding: 1rem; gap: 1rem; border-width: 1px; }
  .calc-field { margin-bottom: 1rem; }
  .calc-field label { font-size: 0.82rem; margin-bottom: 0.35rem; }
  .calc-field select { font-size: 0.82rem; padding: 0.55rem 0.65rem; padding-right: 1.8rem !important; background-position: right 0.55rem center; }
  .calc-out { padding: 1rem; border-radius: 8px; }
  .calc-metric span { font-size: 0.72rem; }
  .calc-metric strong { font-size: 1rem; }
  .calc-metric:last-of-type { margin-bottom: 0.6rem; }

  /* CTA boxes */
  .cta-box { padding: 1rem; gap: 1rem; border-radius: 12px; }
  .cta-box h2 { font-size: 1.15rem; }
  .cta-box .lead { font-size: 0.85rem; }
  .cta-form { gap: 0.6rem; }
  .cta-form input, .cta-form select { padding: 0.6rem 0.7rem; font-size: 0.84rem; }
  .ref-link-box { font-size: 0.75rem; padding: 0.65rem 0.8rem; }
  .cta-msg { font-size: 0.82rem; padding: 0.75rem 0.85rem; }

  /* Tier cards (referral) */
  .tier-card { padding: 1rem; }
  .tier-card h3 { font-size: 1rem; }
  .tier-reward { font-size: 1.5rem; }
  .tier-card .card-tag { font-size: 0.66rem; }

  /* Founder card */
  .founder-card { border-left-width: 3px; gap: 1rem; }
  .founder-photo { height: 220px; }
  .founder-photo-wrap { max-width: 100%; }
  .founder-badge { font-size: 0.68rem; max-width: 100%; }
  .founder-content .eyebrow { font-size: 0.7rem; letter-spacing: 0.8px; }
  .founder-content h2 { font-size: 1.15rem; }
  .founder-title { font-size: 0.78rem; line-height: 1.5; }
  .founder-content p.about { font-size: 0.84rem; line-height: 1.6; }
  .step-badge { padding: 0.7rem 0.8rem; font-size: 0.82rem; overflow-wrap: anywhere; }
  .step-badge strong { font-size: 0.74rem; }
  .founder-content .step-badges { margin-bottom: 1rem; }

  /* Timeline */
  .timeline-step { padding: 1rem; }
  .timeline-step h4 { font-size: 0.95rem; }

  /* Install features */
  .install-feature img { min-height: 0; height: 200px; }
  .install-content h3 { font-size: 1.15rem; }

  /* Cert strip */
  .cert-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.85rem var(--gutter); gap: 0.6rem; }
  .cert-item { font-size: 0.72rem; }

  /* Register / Portal */
  .panel-box.is-navy, .panel-box.is-sky, .panel-box.is-emerald, .panel-box.is-dark { padding: 1rem 0.85rem; }
  .panel-box h3 { font-size: 1.02rem; }
  .panel-box .sub { font-size: 0.78rem; margin-bottom: 0.85rem; }
  .form-group input, .form-group select, .form-group textarea { font-size: 0.84rem; padding: 0.6rem 0.7rem; }
  .form-group select { padding-right: 2rem !important; }
  .form-group label { font-size: 0.78rem; }
  .kpi-card strong.is-sm { font-size: 1.05rem; word-break: break-word; }
  .kpi-card span { font-size: 0.68rem; letter-spacing: 0.4px; }
  .reg-table { font-size: 0.8rem; }
  .reg-table td:first-child { font-size: 0.72rem; }
  .seg button { font-size: 0.76rem; padding: 0.55rem 0.35rem; }
  .login-creds span { white-space: normal; word-break: break-all; }
  .panel-box .id-row { gap: 0.5rem; }
  .panel-box .id-row img { width: 30px; height: 30px; }
  .page-head > .btn { width: 100%; font-size: 0.82rem; }
  .panel-box.is-dark .spec-list li { font-size: 0.8rem; }

  /* Gmail */
  .gmail-wrap { margin-bottom: 0.75rem; }
  .gmail-search { padding: 0.4rem 0.65rem; border-radius: 6px; }
  .gmail-empty { padding: 1.5rem 1rem; }
  .gmail-empty svg { width: 36px; height: 36px; }
  .gmail-empty span { font-size: 0.82rem; }
  .gmail-message-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  .gmail-message-from strong { font-size: 0.82rem; }
  .gmail-message-from > div:first-child span { display: none; }
  .gmail-message-to { font-size: 0.72rem; }
  .gmail-send-result { font-size: 0.78rem; overflow-wrap: anywhere; }
  .gmail-compose h3 { font-size: 0.95rem; }
  .gmail-compose-actions { flex-wrap: wrap; }
  .gmail-compose-actions .btn { flex: 1; }

  /* Footer */
  .footer-brand .logo-tile { display: none; }
  .footer-brand strong.name { font-size: 0.9rem; }
  footer { padding: 2rem var(--gutter) 1.5rem; font-size: 0.78rem; }

  /* Table wrap */
  .table-wrap { margin-left: -0.5rem; margin-right: -0.5rem; padding: 0 0.5rem; }
}

/* ---- 360px: Very small phones ---- */
@media (max-width: 360px) {
  :root { --gutter: 0.75rem; }
  .topbar-cta { display: none; }

  /* Hero */
  .hero h1 { font-size: 1.35rem; }
  .hero p { font-size: 0.84rem; }
  .badge { font-size: 0.6rem; padding: 0.25rem 0.6rem; }
  .brand-title { font-size: 1.1rem; }
  .section-title h2 { font-size: 1.1rem; }
  .calc-metric strong { font-size: 1rem; }
  .cert-strip { grid-template-columns: minmax(0, 1fr); }

  /* Founder */
  .founder-card { padding: 0.75rem; border-left-width: 3px; border-radius: 10px; }
  .founder-photo { height: 180px; border-radius: 8px; }
  .founder-content h2 { font-size: 1.05rem; }
  .founder-title { font-size: 0.75rem; }
  .founder-content p.about { font-size: 0.8rem; }
  .step-badge { padding: 0.6rem 0.7rem; font-size: 0.78rem; }
  .step-badge strong { font-size: 0.7rem; letter-spacing: 0.2px; }
  .founder-actions { gap: 0.5rem; }
  .founder-actions .btn { font-size: 0.8rem; padding: 0.55rem 0.75rem; }

  /* Register */
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .seg { flex-direction: column; }
  .seg button { width: 100%; }
  .page-head h2 { font-size: 1.15rem; }
  .login-creds { font-size: 0.72rem; }

  /* Admin */
  .admin-nav-btn { padding: 0.35rem 0.3rem; font-size: 0.7rem; }
  .admin-main { padding: 0.65rem; }
  .kpi-card { padding: 0.7rem 0.85rem; }
  .kpi-card strong { font-size: 1.25rem; }
  .admin-page-header h2 { font-size: 1.05rem; }
  .panel-box { padding: 0.7rem; border-radius: 8px; }
  .data-table { min-width: 440px; font-size: 0.72rem; }
  .table-select { font-size: 0.7rem; padding: 0.2rem 0.35rem; padding-right: 1.2rem !important; }
  .form-group label { font-size: 0.76rem; }
  .form-group input, .form-group select, .form-group textarea { padding: 0.55rem 0.7rem; font-size: 0.82rem; }
}
