:root {
  --page-bg: #082A46;
  --surface-bg: #103956;
  --surface-hover: #164766;
  --text-primary: #F6F1E5;
  --text-secondary: #C4D0D9;
  --accent: #2A7774;
  --accent-hover: #338985;
  --border-color: rgba(246, 241, 229, 0.18);
  --focus-color: #F2B84B;
  --error-color: #F2A6A6;
  --success-color: #8FD4B5;
  --shadow: 0 22px 44px rgba(0, 0, 0, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--page-bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: var(--page-bg);
  color: var(--text-primary);
  line-height: 1.65;
}

body.profile-modal-open {
  overflow: hidden;
}

img,
svg,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--text-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text-primary);
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}

button,
.button,
input,
select,
textarea,
.nav a {
  min-height: 44px;
}

header,
main,
footer {
  background-color: var(--page-bg);
}

main section,
.section,
.page-section,
.content-section,
.service-section,
.resource-section,
.team-section,
.calculator-section {
  background-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--page-bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text-primary);
  text-decoration: none;
}

.brand img {
  width: 96px;
  height: 48px;
  object-fit: contain;
  padding: 4px;
  border-radius: 4px;
  background: var(--text-primary);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--text-primary);
  font-size: calc(1rem * 1.15);
  line-height: 1.15;
}

.brand small {
  color: var(--text-secondary);
  font-size: calc(0.78rem * 1.15);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 16px;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  color: var(--text-primary);
  font-weight: 760;
}

.nav > a,
.nav-item > a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.nav a:hover,
.nav a.active,
.nav a[aria-current="page"],
.nav-item:hover > a,
.nav-item:focus-within > a {
  background-color: var(--surface-bg);
  color: var(--text-primary);
}

.nav-item {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  z-index: 40;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--accent);
  background-color: var(--surface-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown,
.nav-item.open .dropdown {
  display: grid;
}

.compact {
  min-width: 260px;
  padding: 12px;
}

.compact a,
.mega a {
  display: block;
  padding: 9px 10px;
  color: var(--text-secondary);
  text-decoration: none;
}

.compact a:hover,
.compact a:focus-visible,
.mega a:hover,
.mega a:focus-visible {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.mega {
  right: -170px;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  width: min(980px, 92vw);
  padding: 24px;
  gap: 20px;
}

.mega section {
  display: grid;
  align-content: start;
  padding: 0;
}

.mega h4 {
  margin: 0 0 10px;
  color: var(--text-primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  min-height: 640px;
  padding: clamp(72px, 10vw, 120px) clamp(18px, 6vw, 88px);
}

.page-hero,
.section {
  padding: clamp(54px, 8vw, 90px) clamp(18px, 5vw, 72px);
}

.page-hero p {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.06;
}

.hero-content {
  --hero-body-size: clamp(1rem, 1.2vw, 1.125rem);
}

.hero-content .hero-description {
  max-width: 780px;
  font-size: var(--hero-body-size);
}

.hero-content h1 {
  max-width: 760px;
  font-size: calc(var(--hero-body-size) * 1.2);
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3.5vw, 2.75rem);
  line-height: 1.14;
}

.leader-name {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: clamp(1.65rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
}

h3 {
  margin: 0 0 10px;
}

p,
li,
.form-note,
.meta-text,
.card-description {
  color: var(--text-secondary);
}

.hero p:not(.eyebrow):not(.hero-description) {
  max-width: 780px;
  font-size: 1.12rem;
}

.service-page .page-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.content {
  max-width: 920px;
}

.content p,
.content li {
  font-size: 1.04rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.contact-form button,
.profile-modal .close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 20px;
  color: var(--text-primary);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary,
.primary,
.contact-form button {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.primary:hover,
.primary:focus-visible,
.contact-form button:hover,
.contact-form button:focus-visible {
  border-color: var(--accent-hover);
  background-color: var(--accent-hover);
  color: var(--text-primary);
}

.btn-secondary,
.secondary,
.calc-secondary {
  border-color: var(--text-primary);
  background-color: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover,
.btn-secondary:focus-visible,
.secondary:hover,
.secondary:focus-visible,
.calc-secondary:hover,
.calc-secondary:focus-visible {
  background-color: var(--text-primary);
  color: var(--page-bg);
}

.card,
.info-card,
.service-card,
.team-card,
.resource-card,
.form-panel,
.calculator-panel,
.calc-panel,
.result-panel,
.hero-card,
.notice,
table {
  border: 1px solid var(--border-color);
  background-color: var(--surface-bg);
  color: var(--text-primary);
}

.card,
.hero-card,
.calc-panel,
.result-panel,
.contact-form,
.notice {
  border-radius: 8px;
  padding: 22px;
}

.hero-card {
  box-shadow: var(--shadow);
}

.card:hover,
.service-card:hover,
.team-card:hover,
.resource-card:hover {
  background-color: var(--surface-hover);
}

.hero-card p {
  margin: 0 0 18px;
}

.two-col,
.contact-grid,
.leadership,
.service-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 1.18fr);
  gap: clamp(28px, 7vw, 88px);
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.equal-card {
  min-height: 100%;
}

.link-card {
  display: block;
  min-height: 170px;
  text-decoration: none;
}

.link-card h3,
.link-card p {
  pointer-events: none;
}

.service-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-visual img,
.leadership img {
  display: block;
  width: 100%;
  max-width: 580px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--surface-bg);
}

.service-cta {
  margin-top: 24px;
}

.service-cta p {
  margin-top: 0;
}

.team-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.person-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  text-align: left;
  font: inherit;
}

.person-card picture,
.team-card picture {
  display: block;
  width: 100%;
}

.team-card img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
}

.team-card h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.08rem;
  line-height: 1.25;
}

.team-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

.team-card .role {
  margin: 0;
}

.team-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.team-meta div {
  display: grid;
  gap: 2px;
}

.team-meta dt {
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.team-meta dd {
  margin: 0;
  color: var(--text-secondary);
}

.team-description {
  margin: 0;
}

.team-card .profile-button {
  align-self: flex-start;
  margin-top: auto;
}

.person-card small,
.role,
.contact-line {
  color: var(--text-secondary);
  font-weight: 750;
}

.profile-modal {
  width: min(920px, calc(100% - 36px));
  max-height: 88vh;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 36px clamp(22px, 5vw, 64px);
  background-color: var(--surface-bg);
  color: var(--text-primary);
}

.profile-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.profile-modal .close {
  float: right;
  min-height: 38px;
  border-color: var(--border-color);
  background-color: var(--page-bg);
}

.profile-modal h2,
.profile-modal .role,
.contact-line {
  text-align: center;
}

.profile-modal:not([open]):not(.is-open) {
  display: none;
}

.profile-modal.is-open {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1001;
  display: block;
  overflow: auto;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow);
}

body.profile-modal-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
}

.contact-form {
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 12px;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  font: inherit;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #AABBC7;
}

select option {
  background-color: var(--surface-bg);
  color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-hover);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  box-shadow: 0 0 0 1000px var(--surface-bg) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.hp {
  position: absolute;
  left: -9999px;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkline input {
  width: auto;
  margin-top: 6px;
}

.field-error,
.error-message {
  color: var(--error-color);
  font-size: 0.92rem;
}

.success-message {
  color: var(--success-color);
}

.map {
  padding: 0 clamp(18px, 5vw, 72px) clamp(54px, 8vw, 90px);
}

.map iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.resource-list,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.resource-empty {
  grid-column: 1 / -1;
}

.meta-list {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.calculator-intro {
  margin-bottom: 28px;
}

.calc-alert,
.calc-disclaimer {
  border-left: 4px solid var(--accent);
  background-color: var(--surface-bg);
}

.calc-alert {
  padding: 16px 18px;
  color: var(--text-primary);
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}

.calc-panel {
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.calc-panel h2 {
  font-size: 1.55rem;
}

.calc-panel summary {
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 850;
  list-style: none;
}

.calc-panel summary::-webkit-details-marker {
  display: none;
}

.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.calc-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calc-checks {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.calc-checks label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.calc-checks input {
  width: auto;
  min-height: auto;
  margin-top: 6px;
}

.calc-note,
.calc-notes {
  color: var(--text-secondary);
}

.calc-notes {
  padding-left: 20px;
}

.calc-result {
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow);
}

.calc-tax {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  font-weight: 900;
}

.calc-monthly {
  margin: 8px 0 18px;
}

.calc-summary {
  display: grid;
  gap: 0;
  margin: 20px 0;
}

.calc-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.calc-summary span {
  color: var(--text-secondary);
}

.calc-summary strong {
  white-space: nowrap;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.calc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 0.92rem;
}

.calc-table th,
.calc-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.calc-table th {
  color: var(--text-primary);
  text-align: left;
}

.calc-table th:last-child,
.calc-table td:last-child {
  text-align: right;
}

.calc-table small {
  color: var(--text-secondary);
}

.calc-disclaimer {
  margin-top: 32px;
  padding: 24px;
}

.footer {
  display: grid;
  gap: 18px;
  padding: 34px clamp(18px, 5vw, 72px);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.footer-logo img {
  width: 128px;
  max-height: 68px;
  object-fit: contain;
  padding: 8px;
  border-radius: 4px;
  background-color: var(--text-primary);
}

.footer p {
  max-width: 1040px;
  margin: 0;
}

.footer a {
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

@media (max-width: 1024px) {
  .topbar {
    gap: 16px;
    padding-inline: clamp(18px, 3vw, 36px);
  }

  .nav > a,
  .nav-item > a {
    padding-inline: 9px;
  }

  .mega {
    right: 0;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .five,
  .four,
  .team-grid,
  .resource-list,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-result {
    position: static;
  }
}

@media (max-width: 768px) {
  .topbar {
    align-items: flex-start;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 78px);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--page-bg);
    overflow-y: auto;
  }

  .nav.open {
    display: grid;
  }

  .nav > a,
  .nav-item > a {
    min-height: 46px;
  }

  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
  }

  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown {
    display: none;
  }

  .nav-item.open .dropdown {
    display: grid;
  }

  .mega {
    width: auto;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .hero,
  .two-col,
  .contact-grid,
  .leadership,
  .service-layout,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .brand span {
    display: block;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 76px;
    height: 44px;
  }

  .brand strong {
    font-size: calc(0.8rem * 1.15);
  }

  .brand small {
    font-size: calc(0.624rem * 1.15);
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.25rem);
  }

  .three,
  .four,
  .five,
  .team-grid,
  .resource-list,
  .resource-grid,
  .calc-form-grid,
  .calc-form-grid.three {
    grid-template-columns: 1fr;
  }

  .actions .button,
  .actions button {
    width: 100%;
  }

  .team-grid {
    grid-auto-rows: auto;
  }

  .calc-summary div {
    display: grid;
    gap: 2px;
  }

  .calc-summary strong {
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .topbar {
    gap: 12px;
    padding-inline: 12px;
  }

  .brand img {
    width: 66px;
    height: 40px;
  }

  .brand strong {
    font-size: calc(0.75rem * 1.15);
  }

  .brand small {
    font-size: calc(0.585rem * 1.15);
  }

  .page-hero,
  .section,
  .hero,
  .footer {
    padding-inline: 14px;
  }

  .card,
  .hero-card,
  .calc-panel,
  .result-panel,
  .contact-form,
  .notice {
    padding: 18px;
  }
}

@media print {
  html,
  body,
  header,
  main,
  footer,
  .section,
  .calc-result,
  .calc-panel {
    background: #fff !important;
    color: #111 !important;
  }

  .topbar,
  .footer,
  .actions,
  .menu-toggle {
    display: none !important;
  }

  p,
  li,
  .calc-note,
  .calc-notes,
  .form-note {
    color: #333 !important;
  }

  h1,
  h2,
  h3,
  h4 {
    color: #111 !important;
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }
}
