/*
 * Site03 R3 shared shell.
 * The values below are a scoped port of the approved Home header, footer and
 * expert-request dialog. The file is loaded last so page-specific prototype
 * styles cannot replace the public site chrome.
 */

.site-header,
.site-footer,
#expert-dialog,
.context-tooltip,
.community-prototype-page > .skip-link {
  --homepage-navy: #13294b;
  --homepage-brand-blue: #1d57a5;
  --homepage-lime: #93da49;
  --homepage-white: #fff;
  --homepage-text: #333;
  --homepage-line: #d7dbe7;
  --homepage-surface: #f8fafd;
  --homepage-control-border: #7a8796;
  --homepage-shadow-sm: 0 12px 28px rgba(19, 41, 75, .08);
  --homepage-shadow-lg: 0 32px 80px rgba(5, 22, 47, .22);
  --homepage-transition: 260ms cubic-bezier(.2, .7, .2, 1);
  font-family: "Montserrat", Arial, sans-serif;
}

/* Keep the review notice below the canonical sticky header and mobile menu. */
.prototype-banner { z-index: 900; }

/* The Community prototype has a page-wide focus rule; the shared shell keeps Home's focus treatment. */
.community-prototype-page .site-header :focus-visible,
.community-prototype-page .site-footer :focus-visible,
.community-prototype-page #expert-dialog :focus-visible,
.community-prototype-page > .skip-link:focus-visible {
  outline: 3px solid #3f6de4;
  outline-offset: 3px;
}

.site-header a,
.site-footer a,
#expert-dialog a { text-decoration: none; }

/* Approved Home header */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  height: 76px;
  min-height: 0;
  padding: 0;
  line-height: 1.55;
  overflow-wrap: normal;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(19, 41, 75, .1);
  backdrop-filter: blur(16px);
}

.header-shell {
  width: min(1540px, calc(100% - 48px));
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin-inline: auto;
}

.site-header .brand {
  height: 54px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.site-header .brand img { width: 181px; height: auto; }

.primary-nav {
  --nav-item-spacing: clamp(34px, 3.1vw, 44px);
  --nav-layout-gap: clamp(10px, 1vw, 16px);
  display: flex;
  align-items: center;
  gap: var(--nav-layout-gap);
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

.primary-nav > a:not([class]) {
  position: relative;
  margin-inline-end: calc(var(--nav-item-spacing) - var(--nav-layout-gap));
  padding: 27px 0 25px;
}

.primary-nav > a:not([class])::after,
.nav-group > a::after,
.nav-group > span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  background: var(--homepage-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--homepage-transition);
}

.primary-nav > a:hover::after,
.nav-group:hover > a::after,
.nav-group:focus-within > a::after,
.nav-group:hover > span::after,
.nav-group:focus-within > span::after { transform: scaleX(1); }

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline-end: calc(var(--nav-item-spacing) - var(--nav-layout-gap) - 44px);
}

.nav-group > a,
.nav-group > span {
  position: relative;
  display: flex;
  align-items: center;
  padding: 27px 0 25px;
  white-space: nowrap;
}

.nav-expander {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header .nav-group > button.nav-expander {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
}

.nav-expander::after { display: none !important; }
.nav-expander span {
  display: block;
  color: var(--homepage-brand-blue);
  transition: transform var(--homepage-transition);
}
.nav-group:hover .nav-expander span,
.nav-group:focus-within .nav-expander span,
.nav-group.is-open .nav-expander span { transform: rotate(180deg); }

.nav-submenu {
  position: absolute;
  top: calc(100% - 12px);
  left: -22px;
  width: 218px;
  display: grid;
  padding: 12px;
  background: var(--homepage-white);
  border: 1px solid var(--homepage-line);
  border-radius: 10px;
  box-shadow: var(--homepage-shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity var(--homepage-transition), transform var(--homepage-transition);
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu,
.nav-group.is-open .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-submenu a { padding: 10px 12px; border-radius: 6px; }
.nav-submenu a:hover { color: var(--homepage-brand-blue); background: var(--homepage-surface); }

.nav-secondary,
.nav-primary {
  width: 236px;
  min-width: 236px;
  max-width: 236px;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  text-wrap: nowrap;
  cursor: pointer;
}

.primary-nav > .nav-secondary {
  color: var(--homepage-white);
  background: var(--homepage-brand-blue);
  border: 1px solid var(--homepage-brand-blue);
}

.site-header .primary-nav > button.nav-primary {
  color: var(--homepage-brand-blue);
  background: var(--homepage-white);
  border: 1px solid var(--homepage-control-border);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
}

.primary-nav > .nav-secondary:hover {
  color: var(--homepage-brand-blue);
  background: var(--homepage-surface);
  border-color: var(--homepage-brand-blue);
}

.site-header .primary-nav > button.nav-primary:hover {
  color: var(--homepage-white);
  background: var(--homepage-navy);
  border-color: var(--homepage-navy);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  padding: 10px;
  background: var(--homepage-white);
  border: 1px solid var(--homepage-line);
  border-radius: 7px;
}

.menu-toggle > span:not(.sr-only) {
  width: 100%;
  height: 2px;
  display: block;
  margin: 5px 0;
  background: var(--homepage-navy);
  transition: var(--homepage-transition);
}

/* Approved Home footer */
.site-footer {
  padding: 0;
  color: #a2c650;
  background: #13294b;
  border-top: 1px solid rgba(162, 198, 80, .28);
}

.footer-shell {
  width: min(1460px, calc(100% - 64px));
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  margin-inline: auto;
}

.footer-brand-social,
.footer-social,
.footer-column { display: flex; align-items: center; }
.footer-brand-social { flex: 0 0 auto; gap: 15px; }
.footer-brand { display: flex; align-items: center; }
.footer-brand img { width: auto; height: 38px; display: block; }
.footer-social { gap: 7px; }
.footer-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  line-height: 1;
}
.footer-social svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.footer-social a:hover,
.footer-social a:focus-visible {
  color: #13294b;
  background: #a2c650;
  border-color: #a2c650;
}
.footer-legal {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.footer-legal span { display: block; white-space: nowrap; }
.footer-column { flex: 0 0 auto; gap: 18px; }
.footer-column a {
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  opacity: 1;
  white-space: nowrap;
}
.footer-column a:hover,
.footer-column a:focus-visible { color: #a2c650; }

/* Approved Home Request dialog */
.site-dialog {
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--homepage-text);
  background: transparent;
  border: 0;
  border-radius: 14px;
}
.site-dialog::backdrop { background: rgba(4, 15, 29, .78); backdrop-filter: blur(8px); }
.dialog-card {
  position: relative;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0 38px;
  overflow: hidden;
  background: var(--homepage-white);
  border-top: 5px solid var(--homepage-lime);
  border-radius: 12px;
  box-shadow: var(--homepage-shadow-lg);
}
.expert-dialog-header { position: relative; padding: 31px 0 18px; }
.expert-request-body { min-height: 0; overflow-y: auto; padding: 0 2px 22px 0; }
.expert-dialog-footer { padding: 14px 0 24px; background: var(--homepage-white); border-top: 1px solid #e2e8ef; }
.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  color: #657182;
  background: #f0f3f6;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.expert-dialog-header > img { width: 42px; height: 42px; object-fit: contain; }
.expert-dialog-header > span {
  display: block;
  margin-top: 18px;
  color: var(--homepage-brand-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.dialog-card h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 44px); }
#expert-dialog-title:focus { outline: none; }
.expert-dialog-intro { max-width: 780px; margin: 12px 0 0; color: #667385; font-size: 16px; line-height: 1.65; }
.expert-request-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}
.expert-request-column { min-width: 0; }
.expert-request-column-main,
.expert-request-column-side { display: grid; gap: 0; align-content: start; }
.expert-contact-head { display: grid; gap: 4px; }
.expert-contact-head h3 { margin: 0; color: #33465c; font-size: 18px; }
.expert-contact-head p { margin: 0; color: #667385; font-size: 13px; line-height: 1.45; }
.expert-options { margin: 24px 0 0; padding: 0; border: 0; }
.expert-options legend { margin-bottom: 3px; color: #475669; font-size: 14px; font-weight: 800; }
.expert-options-support { margin: 7px 0 14px !important; color: #667385 !important; font-size: 14px !important; line-height: 1.5 !important; }
.expert-option-row {
  min-height: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 0;
  color: #33465c;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e2e8ef;
  cursor: pointer;
}
.expert-options .expert-option-row:last-of-type { border-bottom: 0; }
.expert-option-row:has(input:checked) { color: #1b6031; }
.expert-option-row input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: #2d8f49; }
.expert-option-row span { display: block; font-size: 14px; line-height: 1.45; }
.expert-message {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-top: 0;
  color: #475669;
  font-size: 14px;
  font-weight: 700;
}
.expert-message textarea {
  width: 100%;
  min-height: 180px;
  padding: 11px 12px;
  color: #293a4e;
  background: var(--homepage-white);
  border: 1px solid var(--homepage-control-border);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}
.expert-contact {
  display: grid;
  grid-template-columns: minmax(200px, .84fr) minmax(250px, 1.16fr);
  gap: 10px;
  margin-top: 18px;
}
.expert-field { min-width: 0; }
.expert-contact label { display: grid; gap: 5px; color: #475669; font-size: 14px; font-weight: 700; }
.expert-label-with-info > label { display: block; }
.expert-contact input,
.expert-contact select {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  color: #293a4e;
  background: var(--homepage-white);
  border: 1px solid var(--homepage-control-border);
  border-radius: 4px;
  font-size: 14px;
}
.expert-label-with-info { display: flex; align-items: center; gap: 7px; }
.expert-field-info {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--homepage-brand-blue);
  background: #eef4fa;
  border: 1px solid #9cb7d7;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  cursor: help;
}
.expert-full-trial-conditions {
  margin-top: 18px;
  padding: 12px 14px;
  color: #33465c;
  background: #f6f8fa;
  border: 1px solid #d4dde7;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.55;
}
.expert-full-trial-conditions[hidden] { display: none; }
.expert-full-trial-conditions summary { min-height: 44px; display: flex; align-items: center; color: #33465c; font-weight: 800; cursor: pointer; }
.expert-full-trial-conditions p { margin: 6px 0 2px; }
.expert-full-trial-conditions a,
.expert-consent a { color: var(--homepage-brand-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.expert-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  padding: 11px 0;
  color: #33465c;
  font-size: 14px;
  line-height: 1.45;
  border-top: 1px solid #e2e8ef;
}
.expert-consent input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: #2d8f49; }
.expert-captcha {
  display: grid;
  gap: 5px;
  margin-top: 15px;
  padding: 12px 14px;
  color: #566474;
  background: #f6f8fa;
  border: 1px dashed #c8d2dc;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.45;
}
.expert-captcha strong { color: #33465c; font-size: 13px; }
.expert-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.dialog-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--homepage-white);
  background: var(--homepage-navy);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
}
.expert-submit-row .dialog-cta { margin-top: 0; border: 0; cursor: pointer; }
.expert-submit-row .dialog-cta[disabled] { opacity: .72; cursor: progress; }
.expert-submit-row .expert-success-close { min-height: 44px; padding: 0 18px; color: #33465c; background: #f5f7f9; border: 1px solid #d4dce5; }
.expert-submit-row .expert-success-close[hidden] { display: none; }
.expert-submit-row small { color: var(--homepage-readable-muted, #596678); font-size: 12px; }
.expert-form-status {
  margin-top: 13px !important;
  padding: 10px 12px;
  color: #245f38 !important;
  background: #edf7e9;
  border: 1px solid #b6d7a7;
  border-radius: 4px;
  font-size: 12px !important;
}
.expert-form-status[data-status-tone="pending"] { color: #5b5a1e !important; background: #fff6d8; border-color: #e0cc7e; }
.expert-form-status[data-status-tone="error"] { color: #8f2f2f !important; background: #faecec; border-color: #e3b0b0; }
.expert-form-status[hidden] { display: none; }
.expert-form-status a { min-height: 44px; display: inline-flex; align-items: center; margin-left: 4px; color: #174d75; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.context-tooltip {
  position: fixed;
  z-index: 4000;
  max-width: min(320px, calc(100vw - 24px));
  padding: 9px 11px;
  color: var(--homepage-white);
  background: #102b4d;
  border: 1px solid rgba(147, 218, 73, .78);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
}
.context-tooltip[hidden] { display: none; }

@media (min-width: 1181px) {
  .footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
  }
  .footer-brand-social { grid-column: 1; justify-self: start; }
  .footer-legal { grid-column: 2; justify-self: center; width: max-content; max-width: 100%; }
  .footer-column { grid-column: 3; justify-self: end; }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .footer-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .footer-brand-social { grid-column: 1; justify-self: start; }
  .footer-column { grid-column: 2; justify-self: end; }
  .footer-legal { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: max-content; max-width: 100%; }
}

@media (max-width: 1240px) {
  .footer-shell { width: min(1180px, calc(100% - 48px)); }
}

@media (max-width: 1020px) {
  .site-header { height: 68px; }
  .header-shell { width: calc(100% - 32px); }
  .footer-shell { width: min(940px, calc(100% - 40px)); }
  .site-header .brand { height: 48px; }
  .site-header .brand img { width: 158px; }
  .menu-toggle { display: block; }
  .primary-nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 68px);
    padding: 20px;
    overflow-y: auto;
    background: var(--homepage-white);
    border-bottom: 1px solid var(--homepage-line);
    box-shadow: var(--homepage-shadow-lg);
  }
  .primary-nav.is-open { display: grid; }
  .primary-nav > a:not([class]),
  .nav-group > a,
  .nav-group > span { margin-inline-end: 0; padding: 10px 0; }
  .nav-group { display: grid; grid-template-columns: 1fr auto; margin-inline-end: 0; }
  .nav-expander { width: 44px; height: 44px; padding: 0 !important; }
  .nav-expander span { transform: none; }
  .nav-group:hover .nav-expander span,
  .nav-group:focus-within .nav-expander span,
  .nav-group.is-open .nav-expander span { transform: rotate(180deg); }
  .nav-group .nav-submenu {
    position: static;
    width: auto;
    display: none;
    grid-column: 1 / -1;
    padding: 3px 0 3px 18px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }
  .nav-group:hover .nav-submenu { display: none; }
  .nav-group.is-open .nav-submenu { display: grid; pointer-events: auto; }
  .primary-nav > .nav-secondary,
  .primary-nav > .nav-primary { width: 100%; min-width: 0; max-width: none; }
}

@media (max-width: 860px) {
  .expert-request-layout,
  .expert-contact { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .footer-shell {
    width: calc(100% - 28px);
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  .footer-brand-social { flex: 1 1 auto; }
  .footer-legal { flex-basis: 100%; justify-items: center; text-align: center; }
  .footer-legal span { white-space: normal; }
  .site-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .dialog-card { max-height: calc(100dvh - 16px); padding: 0 20px; }
  .expert-dialog-header { padding: 24px 52px 15px 0; }
  .expert-dialog-header > img { width: 36px; height: 36px; }
  .expert-dialog-header > span { margin-top: 12px; }
  .expert-dialog-header h2 { font-size: clamp(26px, 8vw, 34px); }
  .expert-dialog-intro { font-size: 14px; line-height: 1.5; }
  .expert-request-body { padding-right: 0; padding-bottom: 18px; }
  .expert-request-layout { grid-template-columns: 1fr; gap: 24px; }
  .expert-contact { grid-template-columns: 1fr; }
  .expert-field-info { width: 44px; height: 44px; margin: -10px 0; }
  .expert-dialog-footer { padding: 12px 0 16px; }
  .expert-submit-row { align-items: stretch; flex-direction: column; margin-top: 0; }
  .expert-submit-row .dialog-cta,
  .expert-submit-row .expert-success-close { width: 100%; min-height: 44px; }
}

@media (max-width: 430px) {
  .site-header .brand img { width: 145px; }
  .footer-shell { min-height: 0; align-items: flex-start; gap: 13px; padding: 18px 0 20px; }
  .footer-brand-social { width: 100%; flex-wrap: wrap; gap: 11px 14px; }
  .footer-brand img { height: 34px; }
  .footer-social a { width: 34px; height: 34px; }
  .footer-column { order: 2; gap: 16px; }
  .footer-legal { order: 3; font-size: 12px; }
}

@media print {
  .site-header,
  .site-footer { display: block !important; }
}

.form-system-required-communications {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cbd8e5;
  border-radius: 12px;
  background: #f4f8fc;
}
.form-system-required-communications p {
  margin: 0;
  color: #314760;
  font-size: 14px;
  line-height: 1.55;
}
.form-system-required-communications .form-system-check {
  padding: 0;
  border: 0;
  background: transparent;
}
.form-system-required-communications a { color: #15549a; font-weight: 700; }

/* Shared dark navigation approved for the static site shell. */
.site-header {
  background: #061525 !important;
  border-bottom-color: rgba(255, 255, 255, .08);
  backdrop-filter: none;
}
.primary-nav { color: #fff; }
.primary-nav > a:not([class]) { color: #fff; }
.primary-nav > .nav-secondary,
.primary-nav > .nav-primary {
  width: 196px;
  min-width: 196px;
  max-width: 196px;
}
.primary-nav > .nav-secondary {
  color: #fff;
  background: #1765b6;
  border-color: #1765b6;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .18);
}
.site-header .primary-nav > button.nav-primary {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  padding-inline: 20px;
  color: #14558e;
  background: #fff;
  border-color: #d5e0eb;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .16);
}
.primary-nav > .nav-secondary:hover {
  color: #fff;
  background: #0f559b;
  border-color: #2b78c4;
}
.site-header .primary-nav > button.nav-primary:hover {
  color: #0b3155;
  background: #edf5fb;
  border-color: #fff;
}
.menu-toggle {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
}
.menu-toggle > span:not(.sr-only) { background: currentColor; }

@media (max-width: 1020px) {
  .primary-nav {
    color: #fff;
    background: #061525;
    border-bottom-color: rgba(255, 255, 255, .12);
  }
  .primary-nav > .nav-secondary,
  .site-header .primary-nav > button.nav-primary {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}
