/*
===========================================
GLOBAL NAVIGATION
"The Path of Support"

Canonical ownership:
- This file styles only the shared global navigation.
- Page-specific stylesheets should not own these selectors.
===========================================
*/

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.85rem 2rem;

  background: rgba(253, 251, 247, 0.96);
  border-bottom: 1px solid rgba(58, 50, 44, 0.08);

  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);

  visibility: visible;
  opacity: 1;
}

.site-header .logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header .logo-text {
  display: inline-flex;
  align-items: center;

  color: #596447;
  font-family: "Lora", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .desktop-nav {
  display: block;
  visibility: visible;
  opacity: 1;
}

.site-header .nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 0.25rem;
  margin: 0;
  padding: 0;

  list-style: none;
}

.site-header .nav-list li {
  display: block;
  margin: 0;
  padding: 0;
}

.site-header .nav-link {
  position: relative;

  display: inline-flex;
  align-items: center;

  padding: 0.65rem 0.8rem;

  color: #4d5558;
  border-radius: 999px;

  font-family: "Inter", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  visibility: visible;
  opacity: 1;

  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
  color: #596447;
  background: rgba(89, 100, 71, 0.08);
  outline: none;
}

.site-header .nav-link.active,
.site-header .nav-link[aria-current="page"] {
  color: #596447;
  background: rgba(89, 100, 71, 0.12);
}

.site-header .nav-link.active::after,
.site-header .nav-link[aria-current="page"]::after {
  position: absolute;
  right: 0.8rem;
  bottom: 0.3rem;
  left: 0.8rem;

  height: 1px;

  background: currentColor;
  content: "";
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 700px) {
  body {
    padding-bottom: calc(
      76px + env(safe-area-inset-bottom)
    );
  }

  .site-header {
    min-height: 58px;
    justify-content: center;
    padding: 0.7rem 1rem;
  }

  .site-header .logo-text {
    font-size: 1.12rem;
  }

  .site-header .desktop-nav {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;

    display: flex;
    align-items: stretch;
    justify-content: space-around;

    min-height: 68px;
    padding: 0.45rem 0.4rem;
    padding-bottom: max(
      0.45rem,
      env(safe-area-inset-bottom)
    );

    background: rgba(253, 251, 247, 0.98);
    border-top: 1px solid rgba(58, 50, 44, 0.1);

    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);

    visibility: visible;
    opacity: 1;
  }

  .mobile-bottom-nav .bottom-nav-item {
    position: relative;

    display: flex;
    flex: 1 1 25%;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;
    padding: 0.35rem 0.2rem;

    color: #626a6d;
    border-radius: 10px;

    font-family: "Inter", Arial, sans-serif;
    font-size: 0.67rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;

    visibility: visible;
    opacity: 1;
  }

  .mobile-bottom-nav .bottom-nav-item svg {
    flex: 0 0 auto;
    margin-bottom: 0.2rem;
  }

  .mobile-bottom-nav .bottom-nav-item span {
    display: block;
    overflow: hidden;
    max-width: 100%;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav .bottom-nav-item:hover,
  .mobile-bottom-nav .bottom-nav-item:focus-visible,
  .mobile-bottom-nav .bottom-nav-item.active,
  .mobile-bottom-nav
    .bottom-nav-item[aria-current="page"] {
    color: #596447;
    background: rgba(89, 100, 71, 0.1);
    outline: none;
  }
}

/* SHARED_PULSE_CONTAINMENT_START */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#care-guide-app {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 1200;

  width: 56px;
  height: 56px;

  margin: 0;
  padding: 0;

  pointer-events: none;

  /*
    Prevent animated descendants from contributing to the
    document's page dimensions.
  */
  contain: layout paint size;
}

#care-guide-app .guide-button {
  position: relative;
  isolation: isolate;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  min-width: 56px;
  max-width: 56px;

  height: 56px;
  min-height: 56px;
  max-height: 56px;

  margin: 0;
  padding: 0;

  overflow: hidden;

  border-radius: 50%;

  pointer-events: auto;
  box-sizing: border-box;
}

#care-guide-app .guide-button svg {
  position: relative;
  z-index: 2;

  width: 22px;
  height: 22px;

  flex: 0 0 auto;
}

#care-guide-app .guide-glow {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: block;

  width: 56px;
  height: 56px;

  margin: 0;
  padding: 0;

  border-radius: 50%;

  pointer-events: none;
  transform-origin: center center;

  /*
    Even when animation scales the glow, it remains clipped
    inside the 56px guide button.
  */
  max-width: 56px;
  max-height: 56px;
}

#care-guide-app .guide-panel {
  position: absolute;
  right: 0;
  bottom: 68px;

  width: min(380px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);

  max-height: min(620px, calc(100vh - 7rem));

  overflow: hidden;

  box-sizing: border-box;
  pointer-events: auto;
}

#care-guide-app .guide-panel[hidden] {
  display: none;
}

/*
  Contain legacy pulse listeners and monitor rings that may
  remain in page-specific markup.
*/
.portal-pulse-monitor,
.pulse-monitor,
.status-pulse,
.monitor-ring,
.pulse-ring {
  position: fixed;

  right: 1rem;
  bottom: 1rem;

  width: 56px;
  max-width: 56px;

  height: 56px;
  max-height: 56px;

  overflow: hidden;

  contain: layout paint size;
  pointer-events: none;
}

.monitor-dot,
.portal-pulse-monitor .monitor-dot,
.pulse-monitor .monitor-dot {
  width: 12px;
  max-width: 12px;

  height: 12px;
  max-height: 12px;

  border-radius: 50%;
}

@media (max-width: 700px) {
  #care-guide-app {
    right: 1rem;

    bottom: calc(
      78px + env(safe-area-inset-bottom)
    );
  }

  #care-guide-app .guide-panel {
    width: min(360px, calc(100vw - 2rem));
    max-height: calc(100vh - 10rem);
  }

  .portal-pulse-monitor,
  .pulse-monitor,
  .status-pulse {
    bottom: calc(
      78px + env(safe-area-inset-bottom)
    );
  }
}
/* SHARED_PULSE_CONTAINMENT_END */

/* FINAL_SHARED_UI_AUTHORITY_START */

/* ==========================================================
   HOME PAIN-POINT CARD ALIGNMENT
   ========================================================== */

.pain-grid,
.pain-cards,
.pain-point-grid,
.pain-points-grid,
section:has(.pain-card) > .container,
section:has(.pain-card) .pain-points-container {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(min(100%, 250px), 300px)
    );
  justify-content: center;
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.pain-card {
  width: 100%;
  max-width: 300px;
  margin-right: auto;
  margin-left: auto;
}

/* ==========================================================
   CANONICAL SHARED BUTTON BASE
   Fixes normal state while preserving existing hover behavior.
   ========================================================== */

button,
.btn,
.btn-primary,
.btn-secondary {
  box-sizing: border-box;
  font: inherit;
}

.btn,
button.btn,
#general-update-btn,
#view-caseload-btn,
#schedule-sync-btn,
#pending-reviews-btn,
#reports-btn,
#ask-specific-question-btn,
.ask-specific-question-btn,
.contact-about-client-btn,
.show-all-updates-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  min-height: 44px;
  padding: 0.72rem 1.2rem;

  border: 1px solid transparent;
  border-radius: 999px;

  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.btn-primary,
button.btn-primary,
#general-update-btn,
#view-caseload-btn,
#ask-specific-question-btn,
.ask-specific-question-btn,
.show-all-updates-btn {
  color: #ffffff;
  background: #596447;
  border-color: #596447;
  box-shadow:
    0 8px 20px rgba(89, 100, 71, 0.18);
}

.btn-secondary,
button.btn-secondary,
#schedule-sync-btn,
#pending-reviews-btn,
#reports-btn,
.contact-about-client-btn {
  color: #596447;
  background: rgba(253, 251, 247, 0.96);
  border-color: rgba(89, 100, 71, 0.3);
  box-shadow:
    0 6px 16px rgba(58, 50, 44, 0.06);
}

.btn:focus-visible,
button.btn:focus-visible,
#general-update-btn:focus-visible,
#view-caseload-btn:focus-visible,
#schedule-sync-btn:focus-visible,
#ask-specific-question-btn:focus-visible,
.ask-specific-question-btn:focus-visible,
.contact-about-client-btn:focus-visible,
.show-all-updates-btn:focus-visible {
  outline: 3px solid rgba(89, 100, 71, 0.25);
  outline-offset: 3px;
}

/* ==========================================================
   GLOBAL NAV ACTIVE INDICATOR
   Center the underscore beneath every active label.
   ========================================================== */

.site-header .nav-link {
  position: relative;
}

.site-header .nav-link.active::after,
.site-header .nav-link[aria-current="page"]::after {
  position: absolute;

  right: auto;
  bottom: 0.26rem;
  left: 50%;

  width: 24px;
  height: 1px;

  background: currentColor;
  border-radius: 999px;

  content: "";
  transform: translateX(-50%);
}

/* ==========================================================
   CARE GUIDE
   The app must not use paint containment because that clips
   the panel to the dimensions of the circular chat button.
   ========================================================== */

#care-guide-app {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 1200;

  width: 56px;
  height: 56px;

  margin: 0;
  padding: 0;

  overflow: visible;
  pointer-events: none;

  /*
    Never use paint or size containment here.
    The panel extends beyond the 56px launcher.
  */
  contain: layout style;
}

#care-guide-app .guide-button {
  position: relative;
  z-index: 2;
  isolation: isolate;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  min-width: 56px;
  max-width: 56px;

  height: 56px;
  min-height: 56px;
  max-height: 56px;

  margin: 0;
  padding: 0;

  overflow: hidden;

  color: #ffffff;
  background: #596447;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;

  box-shadow:
    0 12px 28px rgba(58, 50, 44, 0.2);

  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
}

#care-guide-app .guide-button:hover,
#care-guide-app .guide-button:focus-visible {
  background: #4d583e;
  box-shadow:
    0 16px 34px rgba(58, 50, 44, 0.25);
}

#care-guide-app .guide-button:focus-visible {
  outline: 3px solid rgba(89, 100, 71, 0.28);
  outline-offset: 4px;
}

#care-guide-app .guide-button svg {
  position: relative;
  z-index: 3;

  width: 22px;
  height: 22px;

  flex: 0 0 auto;
}

#care-guide-app .guide-glow {
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 56px;
  height: 56px;

  border-radius: 50%;

  pointer-events: none;
  transform-origin: center;
}

#care-guide-app .guide-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  z-index: 4;

  width: min(380px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(620px, calc(100vh - 7rem));

  overflow: hidden;

  background: #fdfbf7;
  border: 1px solid rgba(58, 50, 44, 0.1);
  border-radius: 18px;

  box-shadow:
    0 22px 60px rgba(58, 50, 44, 0.2);

  box-sizing: border-box;
  pointer-events: auto;

  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom right;

  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

#care-guide-app .guide-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#care-guide-app .guide-panel[hidden] {
  display: none;
}

@media (max-width: 700px) {
  #care-guide-app {
    right: 1rem;
    bottom: calc(
      78px + env(safe-area-inset-bottom)
    );
  }

  #care-guide-app .guide-panel {
    width: min(360px, calc(100vw - 2rem));
    max-height: calc(100vh - 10rem);
  }

  .pain-grid,
  .pain-cards,
  .pain-point-grid,
  .pain-points-grid,
  section:has(.pain-card) > .container,
  section:has(.pain-card) .pain-points-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* FINAL_SHARED_UI_AUTHORITY_END */

/* GLOBAL_LOGO_TAGLINE_START */
.site-header .logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header .logo-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  gap: 0.08rem;

  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .logo-lockup .logo-text {
  display: block;

  color: #596447;

  font-family: "Lora", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.site-header .logo-tagline {
  display: block;

  color: #6d7169;

  font-family: "Inter", Arial, sans-serif;
  font-size: 0.63rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.site-header .logo-lockup:hover .logo-text,
.site-header .logo-lockup:focus-visible .logo-text {
  color: #4d583e;
}

.site-header .logo-lockup:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(89, 100, 71, 0.24);
  outline-offset: 5px;
}

@media (max-width: 700px) {
  .site-header .logo-lockup {
    align-items: center;
    text-align: center;
  }

  .site-header .logo-lockup .logo-text {
    font-size: 1.1rem;
  }

  .site-header .logo-tagline {
    font-size: 0.56rem;
    letter-spacing: 0.09em;
  }
}
/* GLOBAL_LOGO_TAGLINE_END */
