html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--tc-ink);
  background: var(--tc-surface);
  font-family: var(--tc-font);
  line-height: 1.5;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--tc-accent);
  color: var(--tc-accent-contrast);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--tc-radius);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-container {
  width: 100%;
  max-width: var(--tc-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tc-surface-raised);
  border-bottom: 1px solid var(--tc-border);
  min-height: var(--tc-header-h);
}

.site-header .navbar {
  min-height: var(--tc-header-h);
  padding-block: 0.5rem;
}

.site-header .navbar-brand {
  font-weight: 700;
  color: var(--tc-ink) !important;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
}

.site-header .navbar-brand .site-logo,
.site-footer .site-logo {
  display: block;
  height: 2.25rem;
  width: auto;
}

.site-footer__brand {
  display: inline-block;
  text-decoration: none;
}

.site-header .header-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0;
}

/* Reference layout: logo | nav …… phone / Sign in / Demo */
@media (min-width: 992px) {
  .site-header .navbar-brand {
    order: 1;
    margin-right: 0.25rem;
  }

  .site-header .navbar-collapse {
    order: 2;
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
  }

  .header-toolbar-end {
    order: 3;
    margin-left: 0.5rem;
  }

  .site-header .site-header__nav {
    margin-left: 0.75rem;
  }

  .site-header .site-header__actions {
    margin-left: auto;
  }
}

/* Phone link base — icon + number on desktop; toolbar overrides for mobile icon-only */
.site-header .header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  color: var(--tc-ink) !important;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0.5rem;
  min-height: 2.5rem;
}

.site-header .header-phone__icon {
  color: var(--tc-accent);
}

.site-header .header-phone:hover,
.site-header .header-phone:focus-visible {
  color: var(--tc-accent-hover) !important;
  background: transparent;
}

.site-header .header-phone:hover .header-phone__icon,
.site-header .header-phone:focus-visible .header-phone__icon {
  color: var(--tc-accent-hover);
}

/* Desktop CTA phone — icon + number (no outline pill) */
.site-header .header-phone--cta {
  display: inline-flex;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-header .header-phone--cta .header-phone__label {
  color: inherit;
}

/* Temporarily hide header Sign in / Sign up (restore by removing this rule) */
.site-header .btn-signin {
  display: none !important;
}

/* Sign in — accent outline, rounded (reference ~8–10px) */
.site-header .btn-signin,
.ehr-close-cta .btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--tc-accent);
  background: transparent;
  color: var(--tc-accent) !important;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  min-height: 33px;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
}

.site-header .btn-signin:hover,
.site-header .btn-signin:focus-visible,
.ehr-close-cta .btn-signin:hover,
.ehr-close-cta .btn-signin:focus-visible {
  background: color-mix(in srgb, var(--tc-accent) 12%, #fff);
  color: var(--tc-accent-hover) !important;
  border-color: var(--tc-accent-hover);
}

/* Phone + auth chip + hamburger stay as one right-aligned group on wrap */
.header-toolbar-end {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-left: auto;
  gap: 0.15rem;
}


/* Compact icon chip beside hamburger — mobile/tablet only */
.site-header .header-phone--toolbar {
  display: none;
  margin-right: 0.25rem;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.45rem;
  font-size: 0;
  line-height: 0;
}

.site-header .header-phone__icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  flex-shrink: 0;
}

.site-header .navbar-toggler {
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 0.4rem 0.55rem;
  color: var(--tc-ink);
}

.site-header .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--tc-focus) 35%, transparent);
}

/* Explicit hamburger — Bootstrap icon only paints with navbar-light/dark */
.site-header .navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26,43,43,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-header .nav-link {
  color: var(--tc-ink) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
}

.site-header .nav-link:hover {
  color: var(--tc-accent) !important;
}

/* Hover/click must not show a black focus rectangle on Products/Solutions.
   Keyboard users still get a green focus-visible ring. */
.site-header .navbar-nav .nav-link:focus,
.site-header .navbar-nav .nav-link:focus:not(:focus-visible) {
  color: var(--tc-accent) !important;
  outline: none !important;
  box-shadow: none !important;
}

.site-header .navbar-nav .nav-link:focus-visible {
  color: var(--tc-accent) !important;
  outline: 2px solid var(--tc-focus) !important;
  outline-offset: 2px;
}

.site-header .nav-link.disabled,
.site-header .nav-link[aria-disabled="true"] {
  /* Keep readable contrast (avoid opacity washout) while signaling unavailable */
  color: var(--tc-muted) !important;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

.site-header .dropdown-menu {
  border-color: var(--tc-border);
  border-radius: var(--tc-radius);
  box-shadow: none;
}

.site-header .dropdown-item:focus,
.site-header .dropdown-item:hover {
  background: var(--tc-surface);
  color: var(--tc-accent);
}

.site-main {
  min-height: 60vh;
}

.site-footer {
  border-top: 1px solid var(--tc-border);
  padding: 2.5rem 0 1.5rem;
  background: var(--tc-surface);
  color: var(--tc-muted);
  margin-top: 2rem;
}

body:has(.product-page--face-analysis) .site-footer {
  margin-top: 0;
}

.site-footer a {
  color: var(--tc-ink);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--tc-accent);
  text-decoration: none;
}

.site-footer__grid {
  display: grid;
  gap: 1.75rem 1.25rem;
  grid-template-columns: 1fr;
  padding-bottom: 1.75rem;
}

.site-footer__brand-name {
  margin: 0 0 0.75rem;
  color: var(--tc-accent);
  font-size: 1.35rem;
  font-weight: 800;
}

.site-footer__meta,
.site-footer__mission {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--tc-muted);
}

.site-footer__login {
  margin: 0 0 1rem;
}

.site-footer__login a {
  color: var(--tc-accent) !important;
  font-weight: 600;
}

.site-footer__heading {
  margin: 0 0 0.85rem;
  color: var(--tc-ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.site-footer__heading--spaced {
  margin-top: 1.25rem;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.site-footer__list a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: #3d4a63;
  font-size: 0.92rem;
}

.site-footer__list a::before {
  content: "›";
  color: var(--tc-accent);
  font-weight: 700;
  line-height: 1.2;
}

.site-footer__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.site-footer__store img {
  display: block;
  height: 2.35rem;
  width: auto;
}

.site-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.site-footer__contact li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.65rem;
  align-items: start;
  color: #3d4a63;
  font-size: 0.92rem;
  line-height: 1.4;
}

.site-footer__contact-icon {
  color: var(--tc-accent);
  display: inline-flex;
  margin-top: 0.1rem;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e6ef;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: #5a6478;
  text-align: center;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.site-footer__social-label {
  color: #5a6478;
  font-size: 0.95rem;
}

.site-footer__social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer__social-link {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
}

.site-footer__social-link--fb { background: #1877f2; }
.site-footer__social-link--x { background: #111; }
.site-footer__social-link--ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.site-footer__social-link--yt { background: #ff0000; }
.site-footer__social-link--in { background: #0a66c2; }

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__bottom {
    flex-direction: row;
  }

  .site-footer__copy {
    text-align: left;
  }
}

@media (min-width: 992px) {
  .site-footer__grid {
    grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
  }

  .site-footer__col:not(:last-child) {
    border-right: 1px solid #e8ebf2;
    padding-right: 1rem;
  }
}

/* Clearance for fixed home community CTA over footer (live techsacare.com pattern) */
body:has(.site-home__cta-bar) .site-footer {
  padding-bottom: 6.75rem;
}

body:has(.product-page--ipregli .cta-bar) .site-footer,
body:has(.product-page--ovulation .cta-bar) .site-footer,
body:has(.product-page--weight .cta-bar) .site-footer,
body:has(.product-page--heart-rate .cta-bar) .site-footer,
body:has(.product-page--ichums .cta-bar) .site-footer {
  padding-bottom: 6.75rem;
}

@media (max-width: 767.98px) {
  body:has(.site-home__cta-bar) .site-footer {
    padding-bottom: 7.5rem;
  }

  body:has(.product-page--ipregli .cta-bar) .site-footer,
  body:has(.product-page--ovulation .cta-bar) .site-footer,
  body:has(.product-page--weight .cta-bar) .site-footer,
  body:has(.product-page--heart-rate .cta-bar) .site-footer,
  body:has(.product-page--ichums .cta-bar) .site-footer {
    padding-bottom: 7.5rem;
  }
}

@media (max-width: 991.98px) {
  .site-header .site-container {
    flex-wrap: nowrap;
  }

  .site-header .navbar-brand {
    margin-right: 0.5rem !important;
    min-width: 0;
  }

  .site-header .navbar-brand .site-logo {
    max-width: min(160px, 42vw);
    height: auto;
  }

  .site-header .header-phone--toolbar {
    display: inline-flex;
    border: 0;
    border-radius: 0;
    background: transparent;
    width: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem;
    margin-right: 0;
    gap: 0;
  }

  .site-header .header-phone--toolbar:hover,
  .site-header .header-phone--toolbar:focus-visible {
    background: transparent;
  }

  .site-header .header-phone--cta {
    display: none;
  }

  .site-header .navbar-toggler {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.35rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }

  .site-header .navbar-toggler:focus,
  .site-header .navbar-toggler:focus-visible {
    box-shadow: none;
  }

  .header-toolbar-end {
    gap: 0.1rem;
  }

  .header-auth-toolbar {
    margin-inline: 0;
  }

  .header-auth-toolbar .header-auth-trigger {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem;
    gap: 0;
  }

  .header-auth-toolbar .header-auth-avatar {
    width: 1.35rem;
    height: 1.35rem;
    background: transparent;
    color: #333;
  }

  .header-auth-toolbar .header-auth-avatar svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .header-auth-toolbar .header-auth-trigger__chevron {
    display: none;
  }

  .nav-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
  }

  .nav-drawer-overlay[hidden] {
    display: none !important;
  }

  .site-header .navbar-collapse#primaryNav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 1050;
    width: min(280px, 86vw);
    max-width: 280px;
    height: 100vh;
    margin: 0;
    padding: 1rem 1rem 1.5rem;
    background: var(--tc-surface-raised);
    border: 0;
    border-left: 1px solid var(--tc-border);
    box-shadow: -12px 0 40px rgba(7, 16, 24, 0.18);
    transform: translateX(100%);
    transition: transform 0.22s ease-out;
    overflow-y: auto;
    display: block !important;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header .navbar-collapse#primaryNav.collapsing {
    height: 100vh !important;
    transition: transform 0.22s ease-out;
  }

  .site-header .navbar-collapse#primaryNav.show {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    padding-top: 1rem;
    border-top: 0;
    margin-top: 0;
  }

  body.nav-drawer-open {
    overflow: hidden;
  }

  .site-header .navbar-nav {
    gap: 0.25rem;
  }

  .site-header .navbar-nav .btn-cta,
  .site-header .navbar-nav .btn-primary {
    display: inline-flex;
    width: fit-content;
    margin: 0.5rem 0 0.25rem;
  }

  .site-header .header-cta-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .header-cta-group .btn-primary,
  .site-header .header-cta-group .btn-signin {
    width: 100%;
  }
}

#auth-popup {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 28rem);
  width: 100%;
}

/* Demo request modal — wide on laptop+ to avoid scroll; sheet on mobile */
#demo-request-popup {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  width: min(96vw, 52rem);
  max-width: 52rem;
  max-height: min(94dvh, 48rem);
  overflow: hidden;
}

#demo-request-popup::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.demo-popup__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: inherit;
  overflow: hidden;
}

.demo-popup__card {
  background: #fff;
  border: 1px solid var(--tc-border, #ccc);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(7, 16, 24, 0.18);
  padding: 2.5rem 1.75rem 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: min(94dvh, 48rem);
}

.demo-popup__form-error {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.demo-popup__thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.demo-popup__panel--thanks {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.demo-popup__heading {
  text-align: center;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

.demo-popup__heading h2 {
  margin: 0 0 0.5rem;
  color: #181c32;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 700;
}

.demo-popup__lead {
  margin: 0;
  color: var(--tc-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.demo-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
}

.demo-popup__close:hover,
.demo-popup__close:focus-visible {
  color: var(--tc-ink);
  background: color-mix(in srgb, var(--tc-accent) 10%, #fff);
}

#demo-request-popup .lead-form .row {
  margin-left: 0;
  margin-right: 0;
}

#demo-request-popup .lead-form .row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

#demo-request-popup .lead-form textarea {
  resize: vertical;
  min-height: 5.5rem;
  max-height: 12rem;
}

#demo-request-popup .lead-form {
  position: relative;
  max-width: none;
  margin-top: 0.25rem;
}

#demo-request-popup .lead-form .btn-primary {
  width: 100%;
  min-height: 2.75rem;
}

@media (min-width: 576px) {
  #demo-request-popup .lead-form .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  #demo-request-popup .lead-form .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #demo-request-popup .lead-form .btn-primary {
    width: auto;
    min-width: 12rem;
  }
}

/* Laptop / large screens: wide dialog, prefer no inner scroll */
@media (min-width: 992px) {
  #demo-request-popup {
    width: min(92vw, 56rem);
    max-width: 56rem;
    max-height: none;
  }

  .demo-popup__card {
    max-height: none;
    overflow-y: visible;
    padding: 2.5rem 2.75rem 2rem;
  }

  #demo-request-popup .lead-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
  }

  #demo-request-popup .lead-form > * {
    grid-column: 1 / -1;
  }

  #demo-request-popup .lead-form > .demo-field--half {
    grid-column: span 1;
  }

  #demo-request-popup .lead-form .mb-3 {
    margin-bottom: 0.85rem !important;
  }

  #demo-request-popup .lead-form textarea {
    min-height: 4.5rem;
    max-height: 8rem;
  }
}

/* Phone/tablet: full visual-viewport sheet; form pane is the scroller */
@media (max-width: 991.98px) {
  #demo-request-popup {
    position: fixed;
    inset: auto 0 0 0;
    top: var(--demo-vvt, 0px);
    width: 100%;
    max-width: none;
    height: var(--demo-vvh, 100dvh);
    max-height: var(--demo-vvh, 100dvh);
    margin: 0;
    overflow: hidden;
  }

  .demo-popup__shell {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .demo-popup__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    border-radius: 0;
    padding: 3rem 1.25rem 1rem;
  }

  .demo-popup__panel[data-demo-panel="form"] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .demo-popup__heading {
    flex: 0 0 auto;
  }

  #demo-request-popup .lead-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Phone + email stack on narrow viewports */
@media (max-width: 575.98px) {
  .demo-popup__card {
    padding: 2.75rem 1rem 1rem;
  }

  #demo-request-popup .lead-form .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #demo-request-popup .lead-form .form-control,
  #demo-request-popup .lead-form .form-select {
    font-size: 16px; /* avoid iOS zoom on focus */
    min-height: 2.75rem;
  }
}

#auth-popup::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.auth-popup__shell {
  position: relative;
  padding: 0.5rem 0 0;
}

.auth-popup__card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  padding: 2rem 1.75rem 1.5rem;
}

.auth-popup__heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-popup__heading h1,
.auth-popup__heading h2 {
  margin: 0;
  color: #181c32;
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-popup__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  z-index: 2;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #5e6278;
  cursor: pointer;
}

.auth-popup__error {
  color: #f1416c;
  font-size: 0.9rem;
  margin: 0 0 1rem;
  text-align: left;
}

.auth-popup__field {
  position: relative;
  margin-bottom: 1.15rem;
}

.auth-popup__field input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 1.1rem 0.85rem 0.35rem;
  border: 1px solid #30ce30;
  border-radius: 0.475rem;
  background: #fff;
  color: #181c32;
  font: inherit;
}

.auth-popup__field--password input {
  padding-right: 3rem;
}

.auth-popup__field label {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  color: #a1a5b7;
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}

.auth-popup__field input:focus + label,
.auth-popup__field input:not(:placeholder-shown) + label {
  top: 0.55rem;
  transform: none;
  font-size: 0.7rem;
  color: #5e6278;
}

.auth-popup__field input:focus {
  outline: 0;
  border-color: #06cc06;
  box-shadow: 0 0 0 0.2rem rgba(119, 182, 36, 0.15);
}

.auth-popup__eye {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

.auth-popup__row-end {
  display: flex;
  justify-content: flex-end;
  margin: -0.35rem 0 1rem;
}

.auth-popup__forgot {
  color: #cc2d2d !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-popup__forgot:hover {
  text-decoration: underline;
}

.auth-popup__actions {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 1rem;
}

.auth-popup__submit {
  min-width: 10.5rem;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 0.475rem;
  background: #06cc06;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.auth-popup__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-popup__switch {
  margin: 0.75rem 0 0;
  text-align: center;
  color: #181c32;
  font-size: 1rem;
  font-weight: 600;
}

.auth-popup__link {
  border: 0;
  background: transparent;
  color: #06cc06;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.auth-popup__link:hover {
  text-decoration: underline;
}

.auth-popup__remember {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: #5e6278;
}

.auth-popup__continue {
  text-align: center;
  margin-top: 0.75rem;
}

.header-auth-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.header-auth-toolbar {
  display: none;
  align-items: center;
  flex-shrink: 0;
  margin-inline: 0.35rem 0.15rem;
  position: relative;
  z-index: 1031;
}

.header-auth-toolbar.is-active {
  display: inline-flex;
}

@media (min-width: 992px) {
  .header-auth-toolbar {
    display: none !important;
  }
}

.header-auth-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.55rem 0.28rem 0.28rem;
  border: 1px solid #d8dee4;
  border-radius: 999px;
  background: #fff;
  color: #5c6670;
  font: inherit;
  cursor: pointer;
  max-width: none;
  min-height: 2.25rem;
}

.header-auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e8f5e0;
  color: #2f6b1f;
}

.header-auth-avatar svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.header-auth-trigger__icon {
  /* alias kept for tests / markup */
}

.header-auth-trigger__chevron {
  width: 0;
  height: 0;
  margin-right: 0.15rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8b949e;
  opacity: 1;
  flex-shrink: 0;
}

.site-header .header-cta-group .btn-primary,
.site-header .header-cta-group .header-phone--cta {
  flex-shrink: 0;
}

.header-auth-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: auto;
  z-index: 1050;
  min-width: 15.5rem;
  max-width: min(15.5rem, calc(100vw - 2rem));
  padding: 1rem;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

/* Keep signed-in menu inside the viewport when the chip sits near either edge */
.header-auth-menu.is-clamped-left {
  right: auto;
  left: 0;
}

.header-auth-user:hover .header-auth-menu,
.header-auth-user:focus-within .header-auth-menu,
.header-auth-user.is-open .header-auth-menu {
  display: block;
}

.header-auth-menu__identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
}

.header-auth-menu__identity .header-auth-avatar {
  width: 2.35rem;
  height: 2.35rem;
}

.header-auth-menu__identity .header-auth-avatar svg {
  width: 1.25rem;
  height: 1.25rem;
}

.header-auth-menu__identity-text {
  min-width: 0;
}

.header-auth-menu__name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a1a;
  line-height: 1.25;
}

.header-auth-menu__username {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #757575;
  line-height: 1.2;
}

.header-auth-menu__badge {
  display: inline-flex;
  margin: 0 0 0.85rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e8f5e0;
  color: #2f6b1f;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.header-auth-menu__edit,
.header-auth-menu__signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.header-auth-menu__edit {
  margin-bottom: 0.5rem;
  border: 1px solid #d8dee4;
  background: #fff;
  color: #1a1a1a !important;
}

.header-auth-menu__edit:hover {
  background: #f6f8fa;
  color: #1a1a1a !important;
}

.header-auth-menu__signout {
  border: 1px solid #e57373;
  background: #fce8e6;
  color: #c62828;
}

.header-auth-menu__signout:hover {
  filter: brightness(0.98);
}

.header-auth-menu__btn-icon {
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
}

.header-auth-menu__btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Legacy class hooks kept so old inject tests / styles degrade safely */
.header-auth-menu__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid #d8dee4;
  background: #fff;
  color: #1a1a1a !important;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.header-auth-menu__quiet {
  display: none;
}

@media (max-width: 991.98px) {
  .header-auth-trigger {
    min-width: 44px;
    min-height: 44px;
    padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  }

  .header-auth-toolbar .header-auth-trigger {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem;
  }

  .header-auth-menu {
    min-width: min(15.5rem, calc(100vw - 2rem));
  }

  /* Prefer right-edge alignment from the toolbar chip; clamp class flips if needed */
  .header-auth-toolbar .header-auth-menu {
    right: 0;
    left: auto;
  }

  .header-auth-toolbar .header-auth-menu.is-clamped-left {
    right: auto;
    left: 0;
  }
}

