/* Shared brand stylesheet — loaded alongside each brand's
   per-brand brand.css. Handles layout primitives that should
   behave identically across every brand surface:
     - Responsive header / hamburger
     - Container with safe horizontal padding
     - Hero grid that collapses to single-column on mobile
     - Footer
   Colors come from the brand's CSS custom properties; spacing
   and breakpoints live here. */

/* ===== Container ====================================================== */
.brand-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}

/* ===== Header =========================================================
   Layout: [logo] [— nav links —] [cart] [account] [≡ on mobile]
   On desktop the nav links sit BETWEEN logo and actions with even
   breathing room; the right cluster is visually separated from the nav
   links by a left margin so the cart/account icons don't read as nav
   items. */
.brand-header {
  position: relative;
  border-bottom: 1px solid var(--ink-200, var(--slate-200, #e5e7eb));
  background: var(--surface, white);
}
.brand-header-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 40px;
  box-sizing: border-box;
}
.brand-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
  text-decoration: none;
  /* Keep wordmark aspect ratio — never stretch */
}
.brand-logo img {
  display: block;
  height: auto;
  width: auto;
  /* Constrain by height — width scales via aspect ratio. The intrinsic
     SVG aspect (480:144 for HCRIS wordmark) is preserved because
     width/height are both `auto` here. The MainNav wrapper still passes
     explicit width/height attributes, but those are intrinsic-size
     hints to next/image, not display constraints once CSS kicks in. */
  max-height: 40px;
}
/* "powered by healthparse" tagline under each sub-brand wordmark. Quiet
   by default, slightly punchier on hover so it feels intentional rather
   than legalese. */
.brand-powered-by {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  line-height: 1;
  color: var(--ink-500, var(--slate-500, #64748b));
  white-space: nowrap;
  margin-top: 2px;
}
.brand-powered-by-kicker {
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-powered-by-mark {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -0.01em;
  color: var(--ink-800, var(--slate-800, #1e293b));
}
.brand-powered-by-tick {
  color: var(--volt-700, #5d7c00);
  margin-right: 1px;
}
.brand-logo:hover .brand-powered-by {
  color: var(--ink-700, var(--slate-700, #334155));
}
.brand-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700, var(--slate-700, #374151));
  flex: 1;
  min-width: 0;
  /* No wrap — at narrow widths, the mobile breakpoint kicks in
     and these collapse into the hamburger panel. */
}
.brand-nav-links a {
  color: inherit;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color .12s ease;
  white-space: nowrap;
}
.brand-nav-links a:hover {
  color: var(--ink-950, var(--slate-950, #0a0a0a));
}
.brand-nav-links a.is-active {
  color: var(--ink-950, var(--slate-950, #0a0a0a));
  font-weight: 600;
}
.brand-nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--volt-500, currentColor);
  border-radius: 1px;
}
.brand-nav-links a.is-accent {
  background: var(--volt-100, #f3ffd0);
  color: var(--volt-700, #4d6b1f);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}
.brand-nav-links a.is-accent:hover {
  filter: brightness(0.96);
}
.brand-nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  /* Visual separator from nav links — a thin hairline on its left */
  padding-left: 16px;
  margin-left: auto;
  position: relative;
}
.brand-nav-actions::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--ink-200, var(--slate-200, #e5e7eb));
}

/* Icon-only nav action buttons (cart, account, hamburger) */
.brand-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--ink-600, var(--slate-600, #4b5563));
  cursor: pointer;
  position: relative;
  text-decoration: none;
  padding: 0;
  transition: background .12s ease, color .12s ease;
}
.brand-icon-btn:hover {
  background: var(--surface-2, #f5f5f5);
  color: var(--ink-950, var(--slate-950, #0a0a0a));
}
.brand-icon-btn:focus-visible {
  outline: 2px solid var(--volt-500, #4d6b1f);
  outline-offset: 2px;
}
.brand-icon-btn-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--volt-500, #d4ff3a);
  color: white;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--surface, white);
}

/* Hamburger — hidden on desktop, shown on mobile */
.brand-hamburger {
  display: none;
}

/* Hidden checkbox controls .brand-mobile-panel via :checked ~ selector */
/* ===== Dropdown groups (desktop) ====================================== */
.brand-nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.brand-nav-group > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.brand-nav-caret {
  font-size: 9px;
  opacity: 0.6;
  transition: transform .12s ease, opacity .12s ease;
}
.brand-nav-group:hover .brand-nav-caret,
.brand-nav-group:focus-within .brand-nav-caret {
  opacity: 1;
  transform: translateY(1px);
}
.brand-nav-group-panel {
  position: absolute;
  top: 100%;
  left: -12px;
  margin-top: 6px;
  min-width: 220px;
  padding: 6px;
  background: var(--surface, white);
  border: 1px solid var(--ink-200, var(--slate-200, #e5e7eb));
  border-radius: 8px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.12), 0 2px 6px -2px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
  z-index: 50;
}
.brand-nav-group:hover .brand-nav-group-panel,
.brand-nav-group:focus-within .brand-nav-group-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .12s ease, transform .12s ease, visibility 0s;
}
.brand-nav-group-panel a {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700, var(--slate-700, #374151));
  text-decoration: none;
  white-space: nowrap;
}
.brand-nav-group-panel a:hover {
  background: var(--surface-2, #f5f5f5);
  color: var(--ink-950, var(--slate-950, #0a0a0a));
}
.brand-nav-group-panel a.is-active {
  color: var(--ink-950, var(--slate-950, #0a0a0a));
  font-weight: 600;
  background: var(--surface-2, #f5f5f5);
}

.brand-nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.brand-mobile-panel {
  display: none;
}

/* ===== Mobile breakpoint ============================================== */
@media (max-width: 860px) {
  .brand-header-row {
    padding: 12px 16px;
    gap: 12px;
  }
  .brand-nav-links {
    display: none;
  }
  .brand-nav-actions {
    padding-left: 8px;
    margin-left: auto;
  }
  .brand-nav-actions::before {
    display: none;
  }
  .brand-hamburger {
    display: inline-flex;
  }
  .brand-nav-toggle:checked ~ .brand-mobile-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--ink-200, var(--slate-200, #e5e7eb));
    background: var(--surface, white);
  }
  .brand-mobile-panel a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-800, var(--slate-800, #1f2937));
    text-decoration: none;
    border-bottom: 1px solid var(--ink-100, #f3f4f6);
  }
  .brand-mobile-panel a.is-active {
    color: var(--ink-950, var(--slate-950, #0a0a0a));
    font-weight: 600;
    background: var(--surface-2, #f5f5f5);
  }
  .brand-mobile-panel a.is-accent {
    color: var(--volt-700, #4d6b1f);
    font-weight: 600;
  }
  .brand-mobile-panel a:last-child {
    border-bottom: 0;
  }
  .brand-mobile-panel a.brand-mobile-sublink {
    padding-left: 36px;
    font-size: 14px;
    color: var(--ink-700, var(--slate-700, #374151));
  }
  /* Hide the desktop caret on mobile (parent renders as a flat link) */
  .brand-mobile-panel .brand-nav-caret {
    display: none;
  }
  .brand-logo img {
    max-height: 30px;
  }
}

/* ===== Hero grid ======================================================
   Hero uses the same 1200 container as the header so left edges line up.
   Two-column on desktop, single-column at <900px. */
.brand-hero {
  padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--ink-200, var(--slate-200, #e5e7eb));
  background: var(--surface, white);
}
.brand-hero .brand-container {
  max-width: 1200px;
}
.brand-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.brand-hero-headline {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink-950, var(--slate-950, #0a0a0a));
  margin: 14px 0 0;
  text-wrap: balance;
}
.brand-hero-body {
  margin-top: 20px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--ink-700, var(--slate-700, #374151));
  max-width: 560px;
}
@media (max-width: 900px) {
  .brand-hero-grid {
    grid-template-columns: 1fr;
  }
  .brand-hero-body {
    max-width: none;
  }
}

/* ===== Tabular preview (search/results blocks) ======================== */
.brand-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Sidebar + content split (search, query builder) ================ */
.brand-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .brand-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ===== Section-level padding rescue ===================================
   Brand pages with `padding: "Xpx 32px"` inline on a full-bleed <section>
   overflow on phones because 64px of horizontal padding eats half the
   390px viewport. Override on phones only — inline styles need
   !important since they have higher specificity than external CSS. We
   exclude .brand-hero and .brand-split because those already have
   responsive clamp() padding via the helper classes. */
@media (max-width: 600px) {
  [class$="-root"] section:not(.brand-hero):not(.brand-split):not([data-keep-padding]) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ===== Footer ========================================================= */
.brand-footer {
  border-top: 1px solid var(--ink-200, var(--slate-200, #e5e7eb));
  background: var(--surface, white);
  margin-top: 48px;
}
.brand-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-500, var(--slate-500, #6b7280));
}
.brand-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-footer-links a {
  color: var(--ink-600, var(--slate-600, #4b5563));
  text-decoration: none;
}
.brand-footer-links a:hover {
  color: var(--ink-950, var(--slate-950, #0a0a0a));
  text-decoration: underline;
}
@media (max-width: 600px) {
  .brand-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
</content>
</invoke>
/* Spinner keyframe used by inline loading indicators */
@keyframes hcris-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
