/* ==========================================================================
   MAGNUS CONNECT — Design System
   Tokens → Base → Layout → Components → Utilities → Responsive
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand colors (from brief) */
  --primary: #4FBDBA;
  --primary-dark: #368E8B;
  --primary-darker: #276866;
  --primary-tint: #E7F6F5;
  --primary-tint-2: #D2EEEC;

  --coral: #F4845F;
  --coral-dark: #D9663F;
  --coral-tint: #FDEAE2;

  --sage: #8AAE92;
  --sage-dark: #6C9075;
  --sage-tint: #EAF2EB;

  --bg: #FAF7F1;
  --surface: #FFFFFF;
  --ink: #1D1D1F;
  --ink-70: #4B4B4E;
  --ink-55: #737376;
  --ink-40: #9A9A9C;
  --border: #ECECEC;
  --border-strong: #DEDEDC;

  /* Fonts */
  --font-heading: 'General Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-numbers: 'Satoshi', 'Inter', -apple-system, sans-serif;

  /* 8px spacing system */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-7: 56px;
  --sp-8: 64px;
  --sp-10: 80px;
  --sp-12: 96px;
  --sp-16: 128px;

  /* Radius — intentional hierarchy, not uniform bubble-roundness */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(29,29,31,0.05);
  --shadow-sm: 0 2px 8px rgba(29,29,31,0.06);
  --shadow-md: 0 12px 32px rgba(29,29,31,0.09);
  --shadow-lg: 0 24px 56px rgba(29,29,31,0.14);
  --shadow-teal: 0 12px 28px rgba(79,189,186,0.28);
  --shadow-coral: 0 12px 28px rgba(244,132,95,0.30);

  /* Layout */
  --container: 1440px;
  --content: 1180px;
  --narrow: 760px;
  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@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; scroll-behavior: auto !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--primary); color: #fff; }

/* Focus visibility — accessibility first */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: var(--r-sm); z-index: 1000; transition: top .15s ease;
  font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 4.4vw, 4rem); font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
p { color: var(--ink-70); }
p + p { margin-top: 1em; }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-70); line-height: 1.6; }
strong { font-weight: 600; color: var(--ink); }
.num { font-family: var(--font-numbers); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--primary-darker);
  margin-bottom: var(--sp-2);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }
.content { max-width: var(--content); margin: 0 auto; padding: 0 var(--sp-4); }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 var(--sp-4); }
.section { padding: var(--sp-10) 0; }
.section-tight { padding: var(--sp-6) 0; }
.section-header { max-width: 640px; margin-bottom: var(--sp-6); }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.grid { display: grid; gap: var(--sp-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem;
  padding: 14px 26px; border-radius: var(--r-full);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap; border: 1.5px solid transparent;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--primary-darker); transform: translateY(-1px); box-shadow: var(--shadow-teal); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); transform: translateY(-1px); box-shadow: var(--shadow-coral); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink-70); padding: 14px 18px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-lg { padding: 17px 34px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--bg); transform: translateY(-1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-full); display: inline-flex;
  align-items: center; justify-content: center; border: 1.5px solid var(--border-strong);
  background: var(--surface); transition: all .15s ease; flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.active { background: var(--coral-tint); border-color: var(--coral); color: var(--coral-dark); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.76rem; font-weight: 600; padding: 5px 12px; border-radius: var(--r-full);
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-primary { background: var(--primary-tint); color: var(--primary-darker); }
.badge-coral { background: var(--coral-tint); color: var(--coral-dark); }
.badge-sage { background: var(--sage-tint); color: var(--sage-dark); }
.badge-ink { background: var(--ink); color: #fff; }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--ink-70); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 500;
  padding: 9px 16px; border-radius: var(--r-full); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--ink-70); transition: all .15s ease;
}
.chip:hover, .chip.is-active { border-color: var(--primary); color: var(--primary-darker); background: var(--primary-tint); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.card-flat { border-radius: var(--r-md); }

/* Service / feature icon tile */
.icon-tile {
  width: 52px; height: 52px; border-radius: var(--r-md); display: flex; align-items: center;
  justify-content: center; background: var(--primary-tint); color: var(--primary-darker); margin-bottom: var(--sp-2);
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.coral { background: var(--coral-tint); color: var(--coral-dark); }
.icon-tile.sage { background: var(--sage-tint); color: var(--sage-dark); }
.icon-tile.ink { background: var(--ink); color: #fff; }
.icon-tile.lg { width: 68px; height: 68px; border-radius: var(--r-lg); }
.icon-tile.lg svg { width: 32px; height: 32px; }

.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.service-card p { font-size: 0.92rem; margin-top: 0; }
.service-card .card-link { margin-top: auto; padding-top: var(--sp-2); font-size: 0.88rem; font-weight: 600; color: var(--primary-darker); display: inline-flex; align-items: center; gap: 6px; }
.service-card .card-link svg { width: 15px; height: 15px; transition: transform .15s ease; }
.service-card:hover .card-link svg { transform: translateX(3px); }

/* Stat card */
.stat-card { text-align: left; }
.stat-card .stat-num { font-family: var(--font-numbers); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; color: var(--ink); display: block; line-height: 1; }
.stat-card .stat-label { font-size: 0.88rem; color: var(--ink-55); margin-top: 6px; }

/* Provider card */
.provider-card { display: flex; gap: var(--sp-2); align-items: flex-start; }
.provider-card .p-logo {
  width: 56px; height: 56px; border-radius: var(--r-md); background: var(--sage-tint); color: var(--sage-dark);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.provider-card .p-body { flex: 1; min-width: 0; }
.provider-card .p-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; }
.provider-card .p-meta { font-size: 0.85rem; color: var(--ink-55); margin-top: 2px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 0.84rem; font-weight: 600; }
.rating svg { width: 14px; height: 14px; color: var(--coral); }
.provider-card .p-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-1) 0; }
.provider-card .p-desc { font-size: 0.88rem; margin-top: 4px; }
.provider-card .p-actions { display: flex; gap: 8px; margin-top: var(--sp-2); align-items: center; }

/* Avatar (initials) */
.avatar {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 600; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--sage));
}
.avatar-sm { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-md { width: 48px; height: 48px; font-size: 0.95rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar.coral { background: linear-gradient(135deg, var(--coral), #f6a583); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2.5px solid var(--surface); margin-left: -12px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Testimonial */
.testimonial { display: flex; flex-direction: column; gap: var(--sp-2); }
.testimonial .quote-mark { font-family: var(--font-heading); font-size: 2.6rem; color: var(--primary-tint-2); line-height: 1; }
.testimonial .t-who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: var(--sp-2); }
.testimonial .t-name { font-weight: 600; font-size: 0.92rem; }
.testimonial .t-role { font-size: 0.82rem; color: var(--ink-55); }

/* Video-style placeholder (success stories) */
.video-card { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/5; }
.video-thumb {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--primary-darker), var(--primary) 55%, var(--sage));
  position: relative;
}
.video-thumb .play-btn {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}
.video-thumb .play-btn svg { width: 22px; height: 22px; color: var(--ink); margin-left: 3px; }
.video-card .v-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp-3); color: #fff; background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent 70%); }
.video-card .v-caption .t-name, .video-card .v-caption .t-role { color: #fff; }
.video-card .v-caption .t-role { color: rgba(255,255,255,0.8); }

/* Photo placeholder (provider hero images, blog thumbs, team) */
.photo-block {
  border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary-darker); position: relative; overflow: hidden;
}
.photo-block svg { width: 30%; height: 30%; opacity: 0.55; }
.photo-block.coral { background: var(--coral-tint); color: var(--coral-dark); }
.photo-block.sage { background: var(--sage-tint); color: var(--sage-dark); }
.photo-block.ink { background: linear-gradient(135deg, var(--ink), #3a3a3d); color: rgba(255,255,255,0.5); }
.photo-block.dots::after {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}

/* ---------- Nav / Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200; background: rgba(250,247,241,0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo svg { width: 34px; height: 34px; }
.logo-text { font-family: var(--font-heading); font-weight: 700; font-size: 1.28rem; line-height: 1; letter-spacing: -0.02em; }
.logo-sub { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.56rem; letter-spacing: 0.22em; color: var(--primary-darker); margin-top: 2px; }
.main-nav { display: flex; align-items: center; gap: var(--sp-4); }
.main-nav ul { display: flex; gap: var(--sp-3); }
.main-nav a:not(.btn) {
  font-size: 0.94rem; font-weight: 500; color: var(--ink-70); padding: 8px 2px; position: relative;
}
.main-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--coral);
  transform: scaleX(0); transition: transform .18s ease; border-radius: 2px;
}
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a:not(.btn):hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.nav-toggle svg { width: 24px; height: 24px; }

.mobile-drawer {
  position: fixed; inset: 0; z-index: 300; background: var(--surface);
  transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
  display: flex; flex-direction: column;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--border); height: var(--header-h); }
.mobile-drawer nav { padding: var(--sp-3); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mobile-drawer nav a { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; padding: 14px 8px; border-bottom: 1px solid var(--border); }
.mobile-drawer .drawer-actions { padding: var(--sp-3); display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-8) 0 var(--sp-10); position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: center; }
.hero h1 { margin-bottom: var(--sp-2); }
.hero .lede { margin-bottom: var(--sp-4); max-width: 480px; }
.hero .hero-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.hero-trustline { display: flex; align-items: center; gap: 12px; font-size: 0.86rem; color: var(--ink-55); }

.network-bg {
  position: absolute; top: -10%; right: -12%; width: 62%; height: 130%; z-index: 0; opacity: 0.55; pointer-events: none;
}
.page-hero { padding: var(--sp-7) 0 var(--sp-6); text-align: left; position: relative; }
.page-hero.center { text-align: center; }
.page-hero.center .lede { margin-left: auto; margin-right: auto; }
.page-hero .lede { max-width: 620px; }

/* Search widget (hero signature element) */
.search-widget {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: var(--sp-4); max-width: 430px; position: relative;
}
.search-widget .sw-badge {
  position: absolute; top: -14px; right: 28px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--coral); border: 3px solid var(--bg);
}
.search-widget h4 { font-size: 1.02rem; margin-bottom: var(--sp-2); }
.sw-input {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  padding: 13px 16px; margin-bottom: var(--sp-2);
}
.sw-input svg { width: 18px; height: 18px; color: var(--ink-40); flex-shrink: 0; }
.sw-input input { border: none; outline: none; background: none; width: 100%; font-size: 0.94rem; }
.sw-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-55); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-3); }
.sw-chip { font-size: 0.82rem; padding: 7px 13px; border-radius: var(--r-full); background: var(--bg); border: 1px solid var(--border); color: var(--ink-70); }
.sw-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.sw-foot .sw-count { font-size: 0.82rem; color: var(--ink-55); }

/* ---------- How it works / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); position: relative; }
.step { text-align: left; position: relative; }
.step .step-num {
  font-family: var(--font-numbers); font-weight: 700; font-size: 0.85rem; color: var(--surface);
  background: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-2);
}
.step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step p { font-size: 0.9rem; }
.step-arrow { display: none; }

/* ---------- FAQ (native details/summary) ---------- */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: var(--sp-3) 0; display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-2); font-family: var(--font-heading); font-weight: 600; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { width: 20px; height: 20px; flex-shrink: 0; transition: transform .2s ease; color: var(--ink-55); }
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--coral); }
.faq-item .faq-a { padding: 0 0 var(--sp-3); max-width: 720px; }
.faq-item .faq-a p { font-size: 0.96rem; }

/* ---------- Tabs ---------- */
.tabs-nav { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 14px 2px; font-weight: 600; font-size: 0.94rem; color: var(--ink-55); border-bottom: 2.5px solid transparent;
  white-space: nowrap; flex-shrink: 0;
}
.tab-btn[aria-selected="true"] { color: var(--ink); border-color: var(--coral); }
.tab-panel { padding-top: var(--sp-5); }
.tab-panel[hidden] { display: none; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--sp-3); }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; }
.form-group .hint { font-size: 0.8rem; color: var(--ink-55); margin-top: 6px; }
.form-control {
  width: 100%; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 13px 16px;
  font-size: 0.96rem; background: var(--surface); transition: border-color .15s ease;
}
.form-control:focus { border-color: var(--primary); outline: none; }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--ink-70); }
.check-row input { margin-top: 3px; flex-shrink: 0; width: 17px; height: 17px; accent-color: var(--primary); }
select.form-control { 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='%236b6b6f' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.form-success { display: none; align-items: center; gap: 10px; background: var(--sage-tint); color: var(--sage-dark); padding: 14px 18px; border-radius: var(--r-md); font-weight: 600; font-size: 0.92rem; }
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }
fieldset { border: none; }
legend { font-weight: 700; font-family: var(--font-heading); margin-bottom: var(--sp-2); font-size: 0.95rem; }
.range-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; accent-color: var(--primary); }

/* ---------- Filters (find providers) ---------- */
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-3); }
.filter-group { padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; }
.filter-group summary { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.92rem; cursor: pointer; list-style: none; padding: 4px 0; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary .chev { width: 16px; height: 16px; transition: transform .2s; color: var(--ink-55); }
.filter-group[open] summary .chev { transform: rotate(180deg); }
.filter-body { padding-top: var(--sp-2); display: flex; flex-direction: column; gap: 10px; }
.filter-check { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; }
.filter-check input { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ink-55); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs svg { width: 13px; height: 13px; color: var(--ink-40); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Alerts / callouts ---------- */
.callout { display: flex; gap: 14px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--primary-tint); border: 1px solid var(--primary-tint-2); }
.callout svg { width: 22px; height: 22px; color: var(--primary-darker); flex-shrink: 0; margin-top: 2px; }
.callout.coral { background: var(--coral-tint); border-color: #f8d3c0; }
.callout.coral svg { color: var(--coral-dark); }
.callout p { font-size: 0.92rem; margin: 0; }
.callout strong { display: block; margin-bottom: 4px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6); text-align: center; position: relative; overflow: hidden; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.72); }
.cta-band .cta-actions { display: flex; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-4); flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: var(--sp-10) 0 var(--sp-4); margin-top: var(--sp-10); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-4); padding-bottom: var(--sp-8); }
.footer-brand .logo-text, .footer-brand p { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.55); margin-top: var(--sp-2); max-width: 280px; font-size: 0.9rem; }
.footer-col h5 { color: #fff; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.62); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: var(--sp-3); }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: rgba(255,255,255,0.1); }
.footer-social svg { width: 17px; height: 17px; }
.newsletter-row { display: flex; gap: 8px; margin-top: var(--sp-2); max-width: 340px; }
.newsletter-row input { flex: 1; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; }
.newsletter-row input::placeholder { color: rgba(255,255,255,0.4); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.84rem; flex-wrap: wrap; gap: var(--sp-2); }
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.price-card.featured { border-color: var(--ink); box-shadow: var(--shadow-md); }
.price-card .price-tag { display: flex; align-items: baseline; gap: 6px; margin: var(--sp-2) 0; font-family: var(--font-numbers); }
.price-card .price-num { font-size: 2.4rem; font-weight: 700; }
.price-card .price-period { font-size: 0.85rem; color: var(--ink-55); }
.price-card ul { display: flex; flex-direction: column; gap: 12px; margin: var(--sp-3) 0; flex: 1; }
.price-card li { display: flex; gap: 10px; font-size: 0.9rem; align-items: flex-start; }
.price-card li svg { width: 17px; height: 17px; color: var(--sage-dark); flex-shrink: 0; margin-top: 2px; }
.price-card .featured-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); }

/* ---------- Table ---------- */
.compare-table { width: 100%; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.compare-table th { background: var(--bg); font-family: var(--font-heading); font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; }

/* ---------- Article / blog ---------- */
.article-card { display: flex; flex-direction: column; }
.article-card .a-thumb { aspect-ratio: 16/10; border-radius: var(--r-md); margin-bottom: var(--sp-2); }
.article-card .a-cat { font-size: 0.76rem; font-weight: 700; color: var(--primary-darker); text-transform: uppercase; letter-spacing: 0.05em; }
.article-card h3 { font-size: 1.08rem; margin: 6px 0; }
.article-card .a-meta { font-size: 0.8rem; color: var(--ink-55); margin-top: auto; padding-top: var(--sp-2); }
.article-featured { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: center; }
.article-featured .a-thumb { aspect-ratio: 4/3; margin-bottom: 0; }

.prose { max-width: 720px; }
.prose h2 { margin-top: var(--sp-6); margin-bottom: var(--sp-2); }
.prose h3 { margin-top: var(--sp-4); margin-bottom: var(--sp-1); }
.prose p { margin-top: var(--sp-2); font-size: 1.02rem; }
.prose ul, .prose ol { margin: var(--sp-2) 0; padding-left: 1.4em; }
.prose li { margin-bottom: 8px; font-size: 1.02rem; color: var(--ink-70); }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose blockquote { border-left: 3px solid var(--coral); padding-left: var(--sp-3); font-style: italic; color: var(--ink); font-size: 1.1rem; margin: var(--sp-4) 0; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-3); }
.toc h5 { margin-bottom: var(--sp-2); font-family: var(--font-heading); }
.toc ol { display: flex; flex-direction: column; gap: 9px; padding-left: 1.1em; }
.toc a { font-size: 0.9rem; }
.toc a:hover { color: var(--primary-darker); }
.author-box { display: flex; gap: 14px; align-items: center; padding: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.author-box .a-name { font-weight: 600; font-size: 0.95rem; }
.author-box .a-role { font-size: 0.82rem; color: var(--ink-55); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: var(--sp-6); }
.pagination a, .pagination span { width: 40px; height: 40px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--ink); }
.pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Team / careers ---------- */
.team-card { text-align: left; }
.team-card .photo-block { aspect-ratio: 1; margin-bottom: var(--sp-2); }
.job-card { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.job-card .job-meta { display: flex; gap: 14px; font-size: 0.85rem; color: var(--ink-55); margin-top: 6px; flex-wrap: wrap; }
.job-card .job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-card .job-meta svg { width: 14px; height: 14px; }
.value-card .icon-tile { margin-bottom: var(--sp-2); }

/* ---------- Map placeholder (find providers) ---------- */
.map-block {
  border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--border); position: relative; overflow: hidden;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
}
.map-pin { position: absolute; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; background: var(--coral); transform: rotate(-45deg); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; }
.map-pin.primary { background: var(--ink); }
.map-pin span { transform: rotate(45deg); color: #fff; font-size: 0.68rem; font-weight: 700; font-family: var(--font-numbers); }

/* ---------- Community ---------- */
.community-tab-card { text-align: center; padding: var(--sp-4) var(--sp-2); }
.post-card { display: flex; gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.post-card:last-child { border-bottom: none; }
.post-card .post-meta { display: flex; gap: 14px; font-size: 0.82rem; color: var(--ink-55); margin-top: 6px; }

/* ---------- Portal preview mock (marketing showcase only) ---------- */
.portal-mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.portal-mock .pm-bar { display: flex; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.portal-mock .pm-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.portal-mock .pm-body { display: grid; grid-template-columns: 200px 1fr; min-height: 340px; }
.portal-mock .pm-side { background: var(--bg); border-right: 1px solid var(--border); padding: var(--sp-3) var(--sp-2); }
.portal-mock .pm-side .pm-item { padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.84rem; font-weight: 500; color: var(--ink-70); display: flex; align-items: center; gap: 9px; margin-bottom: 2px; }
.portal-mock .pm-side .pm-item svg { width: 16px; height: 16px; }
.portal-mock .pm-side .pm-item.active { background: var(--ink); color: #fff; }
.portal-mock .pm-main { padding: var(--sp-3); }
.pm-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: var(--sp-3); }
.pm-stat { background: var(--bg); border-radius: var(--r-md); padding: 14px; }
.pm-stat .num { font-size: 1.3rem; font-weight: 700; display: block; }
.pm-stat .lbl { font-size: 0.74rem; color: var(--ink-55); }
.pm-chart { height: 110px; border-radius: var(--r-md); background: var(--bg); position: relative; overflow: hidden; }
.pm-bars { position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: flex-end; gap: 6px; height: 100%; padding: 0 14px 14px; }
.pm-bars i { flex: 1; background: linear-gradient(180deg, var(--primary), var(--primary-tint-2)); border-radius: 4px 4px 0 0; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: var(--sp-12) 0; }
.error-num { font-family: var(--font-numbers); font-size: clamp(4rem, 12vw, 8rem); font-weight: 700; color: var(--primary-tint-2); line-height: 1; }

/* ---------- Utilities ---------- */
.mt-1{margin-top:var(--sp-1)} .mt-2{margin-top:var(--sp-2)} .mt-3{margin-top:var(--sp-3)} .mt-4{margin-top:var(--sp-4)} .mt-6{margin-top:var(--sp-6)}
.mb-1{margin-bottom:var(--sp-1)} .mb-2{margin-bottom:var(--sp-2)} .mb-3{margin-bottom:var(--sp-3)} .mb-4{margin-bottom:var(--sp-4)}
.text-center{text-align:center} .text-muted{color:var(--ink-55)}
.hide-mobile { display: initial; }
.show-mobile { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; row-gap: var(--sp-6); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero-split { grid-template-columns: 1fr; }
  .hero .lede { max-width: 100%; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .article-featured { grid-template-columns: 1fr; }
  .portal-mock .pm-body { grid-template-columns: 1fr; }
  .portal-mock .pm-side { display: none; }
  .hide-mobile { display: none; }
  .show-mobile { display: initial; }
}
@media (max-width: 680px) {
  :root { --sp-8: 48px; --sp-10: 56px; --sp-12: 64px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .article-featured { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.82rem; }
  .compare-table th, .compare-table td { padding: 10px; }
  .pm-stat-row { grid-template-columns: 1fr; }
}
