/* =============================================================
   SARA — Design tokens
   Palette: white canvas, hospital-green gradient header/footer,
   warm brass accent for calls-to-action, deep pine for text on green.
   Type: "Fraunces" (display serif, warm/editorial) + "Inter" (body/UI)
   ============================================================= */
:root {
  --pine-900: #0b3d33;
  --pine-800: #0f4a3d;
  --green-700: #146356;
  --green-600: #1c7a67;
  --green-500: #218a73;
  --green-300: #7fc2a8;
  --green-100: #e6f3ee;
  --brass-500: #c19a4b;
  --brass-600: #a8823a;
  --white: #ffffff;
  --bg-soft: #f7faf8;
  --ink-900: #1c2723;
  --ink-700: #3d4a45;
  --ink-500: #647069;
  --line: #e3ebe7;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(11, 61, 51, 0.07);
  --shadow-md: 0 12px 30px rgba(11, 61, 51, 0.12);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, span, a, li, td, th, label, .lede {
  overflow-wrap: break-word;
  word-break: break-word;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--pine-900);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-700); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
.hero__grid, .footer-grid, .form-grid, .hero__stats, .hero__cta, .nav, .topbar .container { min-width: 0; }
.hero__grid > *, .footer-grid > *, .form-grid > *, .hero__stats > * { min-width: 0; }
.card, .pipeline-card, .form-card { min-width: 0; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-600);
  font-weight: 700;
  margin-bottom: 14px;
}
.lede { font-size: 1.12rem; color: var(--ink-500); max-width: 620px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--brass { background: var(--brass-500); color: #2a2109; }
.btn--brass:hover { background: var(--brass-600); box-shadow: var(--shadow-sm); }
.btn--outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,.12); }
.btn--ghost { background: transparent; border-color: var(--green-600); color: var(--green-700); }
.btn--ghost:hover { background: var(--green-100); }
.btn--block { width: 100%; }

/* =============================================================
   Header / Navigation
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: linear-gradient(120deg, var(--pine-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  border: 1px solid rgba(255,255,255,.35);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; letter-spacing: .02em; }
.brand__sub { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); }

.nav__links { display: flex; align-items: center; gap: 1px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  color: rgba(255,255,255,.92);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: .94rem;
  font-weight: 500;
  transition: background .15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__links a:hover, .nav__links a.active { background: rgba(255,255,255,.15); } 
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle {
  display: none;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  width: 44px; height: 40px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav__toggle span, .nav__toggle::before, .nav__toggle::after {
  content: ''; display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle::before { position: absolute; transform: translateY(-6px); }
.nav__toggle::after { position: absolute; transform: translateY(6px); }
.nav__toggle.is-open span { background: transparent; }
.nav__toggle.is-open::before { transform: rotate(45deg); }
.nav__toggle.is-open::after { transform: rotate(-45deg); }

.topbar {
  background: var(--pine-900);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
}
.topbar .container { display: flex; justify-content: space-between; padding: 7px 24px; gap: 16px; flex-wrap: wrap;}
.topbar a { color: #fff; }
.topbar__offices { display: flex; gap: 18px; flex-wrap: wrap; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  background: linear-gradient(160deg, var(--pine-900) 0%, var(--green-700) 48%, var(--green-500) 100%);
  color: #fff;
  padding: 72px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 85% 15%, rgba(193,154,75,.18), transparent 60%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero__lede { color: rgba(255,255,255,.85); font-size: 1.12rem; max-width: 540px; }
.hero__cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 30px; margin-top: 42px; flex-wrap: wrap; }
.hero__stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; }
.hero__stat span { font-size: .82rem; color: rgba(255,255,255,.7); }

/* Pipeline signature graphic */
.pipeline-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.pipeline-card h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; opacity: .85;}
.pipeline { display: flex; flex-direction: column; }
.pipeline__step { display: flex; align-items: flex-start; gap: 14px; position: relative; padding-bottom: 20px; }
.pipeline__step:last-child { padding-bottom: 0; }
.pipeline__step::before {
  content: '';
  position: absolute; left: 11px; top: 26px; bottom: -2px; width: 2px;
  background: rgba(255,255,255,.25);
}
.pipeline__step:last-child::before { display: none; }
.pipeline__dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brass-500); color: #2a2109;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0; z-index: 1;
}
.pipeline__label { font-size: .92rem; color: #fff; padding-top: 2px; }
.pipeline__label small { display: block; color: rgba(255,255,255,.65); font-size: .78rem; }

/* =============================================================
   Cards / Grids
   ============================================================= */
.grid { display: grid; gap: 26px; min-width: 0; }
.grid > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--green-100); color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 1.3rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: .95rem; }

.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.service-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .95rem; color: var(--ink-700);
}
.service-list li::before {
  content: '✓'; color: var(--green-600); font-weight: 700; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--green-100);
  display: flex; align-items: center; justify-content: center; font-size: .7rem; margin-top: 2px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-100); color: var(--green-700);
  padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}

/* Timeline (process pages) */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 14px; }
.timeline__item { position: relative; padding: 0 0 34px 30px; }
.timeline__item::before {
  content: attr(data-step);
  position: absolute; left: -15px; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
}
.timeline__item:last-child { padding-bottom: 0; }

/* Table (dashboard/admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 600px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); color: var(--pine-900); font-weight: 600; }
tr:last-child td { border-bottom: none; }
.status-pill { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--green-100); color: var(--green-700); }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink-900); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem; background: #fcfdfc; color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100);
}
.field--full { grid-column: 1 / -1; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .92rem; margin-bottom: 20px; }
.alert--success { background: #e8f6ee; color: #1c6b3f; border: 1px solid #bfe6cd; }
.alert--error { background: #fdecec; color: #a3312a; border: 1px solid #f5c6c3; }

/* Quiz / assessment */
.quiz-progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.quiz-progress__bar { height: 100%; background: linear-gradient(90deg, var(--green-600), var(--brass-500)); }
.quiz-options { display: grid; gap: 10px; margin-top: 14px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.quiz-option:hover { border-color: var(--green-500); background: var(--green-100); }
.quiz-option input { accent-color: var(--green-600); }

/* Footer */
.site-footer {
  background: linear-gradient(160deg, var(--pine-900) 0%, var(--green-700) 100%);
  color: rgba(255,255,255,.82);
  padding: 64px 0 24px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 0.9fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: rgba(255,255,255,.78); font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.72); font-size: .92rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .82rem; color: rgba(255,255,255,.6);
}
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}

/* Mobile menu: slide-in side panel + dimmed backdrop */
.mobile-menu__backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 290;
  background: rgba(11, 61, 51, 0.45);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-menu__backdrop.is-open { display: block; opacity: 1; }

.mobile-menu {
  display: flex;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 300;
  width: min(320px, 82vw);
  background: linear-gradient(160deg, var(--pine-900) 0%, var(--green-700) 100%);
  padding: 80px 26px 30px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  box-shadow: -18px 0 40px rgba(0,0,0,.25);
  transform: translateX(100%);
  transition: transform .28s ease;
  pointer-events: none;
}
.mobile-menu.is-open { transform: translateX(0); pointer-events: auto; }
.mobile-menu a {
  color: #fff; padding: 14px 4px; font-size: 1.02rem; border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-menu .btn { margin-top: 20px; }
.mobile-menu__close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.mobile-menu__close:hover { background: rgba(255,255,255,.22); }

@media (max-width: 380px) {
  .mobile-menu { width: 88vw; padding-left: 20px; padding-right: 20px; }
}

/* =============================================================
   Responsive breakpoints
   ============================================================= */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .nav__links, .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: flex; }
  .topbar__offices { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .nav__actions .btn--brass {
    padding: 6px 16px !important;
    font-size: .82rem !important;
  }
  .brand__logo { height: 64px; }
}

/* Specific fix for the header action button on mobile */
@media (max-width: 1100px) {
  .site-header .nav__actions .btn--brass {
    white-space: nowrap;      /* Prevents "Apply" and "Now" from splitting */
    padding: 6px 12px !important; /* Slightly snugger padding so it fits the remaining space */
  }
}

/* Shrink the Apply Now button further on narrow phones instead of the logo */
@media (max-width: 480px) {
  .nav { padding: 12px 16px; }
  .nav__actions { gap: 6px; }
  .site-header .nav__actions .btn--brass {
    padding: 6px 10px !important;
    font-size: .74rem !important;
  }
  .nav__toggle { width: 38px; height: 36px; }
}

@media (max-width: 380px) {
  .site-header .nav__actions .btn--brass {
    padding: 5px 8px !important;
    font-size: .7rem !important;
  }
}

/* =============================================================
   Admin console layout
   ============================================================= */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar {
  background: linear-gradient(180deg, var(--pine-900), var(--green-700));
  color: #fff; padding: 26px 18px;
}
.admin-sidebar .brand__name { color: #fff; }
.admin-nav { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; }
.admin-nav a { display: block; padding: 11px 14px; border-radius: 10px; color: rgba(255,255,255,.85); font-size: .92rem; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.admin-main { padding: 34px 36px; background: var(--bg-soft); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px;}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--pine-900); }
.stat-card span { font-size: .82rem; color: var(--ink-500); }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 22px 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .hero__stats { gap: 20px; }
  .form-card { padding: 22px; }
  table { min-width: 520px; }
}

.brand__logo {
  height: 64px;      /* adjust until name + tagline are legible */
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}


.footer-brand .brand__logo { filter: brightness(0) invert(1); }