:root {
  --card-navy: #0b2436;
  --card-navy-soft: #12324a;
  --card-blue: #2878b5;
  --card-gold: #c59b52;
  --card-gold-light: #e1bf82;
  --card-ivory: #f7f4ee;
}

body.contact-card-page {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(40, 120, 181, .26), transparent 29rem),
    radial-gradient(circle at 8% 92%, rgba(197, 155, 82, .16), transparent 25rem),
    linear-gradient(145deg, #071c2a, var(--card-navy) 55%, #123b55);
}

.contact-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.contact-backdrop span {
  position: absolute;
  border: 1px solid rgba(225, 191, 130, .13);
  border-radius: 50%;
}

.contact-backdrop span:nth-child(1) { width: 22rem; height: 22rem; top: -13rem; right: -8rem; }
.contact-backdrop span:nth-child(2) { width: 14rem; height: 14rem; right: -6rem; bottom: 8%; }
.contact-backdrop span:nth-child(3) { width: 9rem; height: 9rem; left: -5rem; top: 42%; }

.contact-card-main {
  position: relative;
  z-index: 1;
  width: min(100%, 1020px);
  margin-inline: auto;
  padding: max(18px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
}

.contact-card {
  overflow: hidden;
  border: 1px solid rgba(225, 191, 130, .35);
  border-radius: 26px;
  background: rgba(9, 34, 51, .94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .035);
}

.card-logo-link {
  display: block;
  width: 150px;
  border-radius: 10px;
}

.card-logo-link img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
}

.official-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f0d6a5;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

.official-mark svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-layout { display: grid; }

.card-identity,
.card-contact { padding: 28px 22px; }

.card-identity {
  position: relative;
  background:
    linear-gradient(160deg, rgba(40, 120, 181, .16), transparent 52%),
    var(--card-navy-soft);
}

.identity-top {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.portrait-frame {
  width: 88px;
  height: 88px;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--card-gold-light);
  border-radius: 50%;
  background: #173e58;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 5%;
}

.card-eyebrow {
  margin: 0 0 7px;
  color: var(--card-gold-light);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.identity-copy h1 {
  margin: 0;
  color: #fff;
  font: 600 clamp(1.65rem, 8vw, 2.45rem)/1.06 "Manrope", sans-serif;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.card-role {
  margin: 10px 0 0;
  color: #dce9f0;
  font-weight: 600;
  line-height: 1.42;
}

.card-credentials {
  margin: 7px 0 0;
  color: #a9c6d7;
  font-size: .82rem;
  line-height: 1.5;
}

.identity-statement {
  margin-top: 25px;
  padding: 18px 0 0 17px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-left: 3px solid var(--card-gold);
}

.identity-statement span {
  color: #fff;
  font: 600 .94rem "Manrope", sans-serif;
}

.identity-statement p {
  margin: 6px 0 0;
  color: #c0d2dc;
  font-size: .9rem;
  line-height: 1.58;
}

.card-contact {
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
}

.card-service-paths {
  display: grid;
  margin-top: 27px;
  border-top: 1px solid rgba(225, 191, 130, .22);
}

.card-sharing { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.card-sharing a, .card-sharing button, .card-share-fallback button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 15px; border: 1px solid rgba(225,191,130,.45);
  border-radius: 10px; background: transparent; color: var(--card-ivory);
  font: 600 .82rem/1.3 system-ui, sans-serif; font-family: inherit;
  text-decoration: none; cursor: pointer;
}
.card-sharing .card-sharing-primary { background: var(--card-gold-light); color: var(--card-navy); font-weight: 700; }
.card-sharing a:focus-visible, .card-sharing button:focus-visible, .card-share-fallback button:focus-visible { outline: 2px solid var(--card-gold-light); outline-offset: 4px; }
.card-share-status { margin: 8px 0 0; color: #bcd0dc; font-size: .75rem; }
.card-share-status:empty { display: none; }
.card-share-fallback[hidden] { display: none; }
.card-share-fallback { margin-top: 12px; }
.card-share-fallback label { display: block; color: #bcd0dc; font-size: .78rem; margin-bottom: 7px; }
.card-share-fallback input { width: 100%; padding: 10px; border: 1px solid #7892a1; border-radius: 8px; background: #0b2436; color: var(--card-ivory); font: inherit; font-size: .8rem; }
.card-share-fallback button { margin-top: 8px; }

.card-service-paths a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(225, 191, 130, .22);
  color: var(--card-ivory);
  text-decoration: none;
}

.card-service-paths strong,
.card-service-paths small { display: block; }
.card-service-paths strong { font-size: .88rem; font-weight: 600; }
.card-service-paths small { margin-top: 5px; color: #bcd0dc; font-size: .76rem; }
.card-service-paths a > span:last-child { color: var(--card-gold-light); font-size: 1.25rem; }
.card-service-paths a:hover strong { color: var(--card-gold-light); }
.card-service-paths a:focus-visible { outline: 2px solid var(--card-gold-light); outline-offset: 4px; }

.contact-heading h2 {
  margin: 0;
  color: #fff;
  font: 600 clamp(1.75rem, 7vw, 2.35rem)/1.08 "Manrope", sans-serif;
  letter-spacing: -.035em;
}

.contact-heading > p:last-child {
  margin: 12px 0 0;
  color: #bcd0dc;
  font-size: .9rem;
  line-height: 1.58;
}

.contact-actions {
  display: grid;
  gap: 11px;
  margin-top: 23px;
  font-style: normal;
}

.contact-action-grid { display: grid; gap: 11px; }

.contact-action,
.save-contact {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .055);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.contact-action > svg,
.save-contact > svg {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-action span,
.save-contact span { min-width: 0; }

.contact-action strong,
.contact-action small,
.save-contact strong,
.save-contact small { display: block; }

.contact-action strong,
.save-contact strong {
  font-size: .92rem;
  line-height: 1.35;
}

.contact-action small,
.save-contact small {
  margin-top: 2px;
  overflow: hidden;
  color: #bcd0dc;
  font-size: .76rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-action-primary {
  min-height: 70px;
  border-color: transparent;
  color: #102b3e;
  background: linear-gradient(135deg, #e6c68e, var(--card-gold));
  box-shadow: 0 14px 28px rgba(197, 155, 82, .2);
}

.contact-action-primary small { color: #3e4d55; }

.action-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 1.3rem;
}

.save-contact {
  border-color: rgba(225, 191, 130, .58);
  color: #f2d9aa;
  background: rgba(197, 155, 82, .07);
}

.contact-action:hover,
.contact-action:focus-visible,
.save-contact:hover,
.save-contact:focus-visible {
  border-color: var(--card-gold-light);
  background-color: rgba(255, 255, 255, .1);
  transform: translateY(-2px);
}

.contact-action-primary:hover,
.contact-action-primary:focus-visible {
  color: #102b3e;
  background: linear-gradient(135deg, #f0d7a8, #d0a45a);
}

.card-sync-status {
  min-height: 1.3em;
  margin: 15px 0 0;
  color: #91adbd;
  font-size: .72rem;
  text-align: center;
}

.card-footer {
  display: grid;
  gap: 12px;
  padding: 17px 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #adc3cf;
  background: #071c2a;
  font-size: .76rem;
}

.card-footer-main,
.card-footer-assets {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-footer-main { justify-content: space-between; }
.card-footer-assets { justify-content: center; color: #849dab; font-size: .68rem; }

.card-footer a {
  color: #f0d6a5;
  font-weight: 700;
  text-decoration: none;
}

.card-footer-assets a {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .15);
  color: #adc3cf;
  letter-spacing: .06em;
}

.contact-card-page .privacy-settings {
  color: #adc3cf;
  text-align: right;
}

.page-note {
  margin: 17px 0 0;
  color: #9fb7c5;
  font-size: .75rem;
  text-align: center;
}

@media (min-width: 540px) {
  .contact-card-main { padding-inline: 24px; }
  .card-header { padding-inline: 24px; }
  .card-logo-link { width: 178px; }
  .card-identity, .card-contact { padding: 34px 30px; }
  .identity-top { grid-template-columns: 110px minmax(0, 1fr); gap: 22px; }
  .portrait-frame { width: 110px; height: 110px; }
  .contact-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-action-grid .contact-action:last-child { grid-column: 1 / -1; }
  .card-footer { grid-template-columns: 1fr auto; align-items: center; }
  .card-footer-assets { justify-content: flex-end; }
}

@media (min-width: 800px) {
  .contact-card-main {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    align-content: center;
    padding-block: 38px;
  }

  .contact-card { border-radius: 32px; }
  .card-header { padding: 18px 28px; }
  .card-logo-link { width: 190px; }
  .card-layout { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
  .card-identity, .card-contact { padding: 44px 38px; }
  .card-identity { display: flex; flex-direction: column; justify-content: center; }
  .identity-top { grid-template-columns: 1fr; align-items: start; }
  .portrait-frame { width: 138px; height: 138px; }
  .identity-statement { margin-top: 32px; }
  .card-contact { border-left: 1px solid rgba(255, 255, 255, .1); }
  .contact-action-grid { grid-template-columns: 1fr; }
  .contact-action-grid .contact-action:last-child { grid-column: auto; }
  .card-footer { padding-inline: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-action,
  .save-contact { transition: none; }

  .contact-action:hover,
  .contact-action:focus-visible,
  .save-contact:hover,
  .save-contact:focus-visible { transform: none; }
}

@media print {
  .card-sharing, .card-share-status, .card-share-fallback { display: none; }
  .card-service-paths a, .card-service-paths small, .card-service-paths a > span:last-child { color: #000; border-color: #999; }
  body.contact-card-page { color: #000; background: #fff; }
  .contact-backdrop, .page-note, .card-sync-status, .privacy-settings, .consent-banner, .consent-status, .card-footer-assets { display: none !important; }
  .contact-card-main { width: 100%; padding: 0; }
  .contact-card { border: 1px solid #000; border-radius: 0; background: #fff; box-shadow: none; }
  .card-header, .card-identity, .card-contact, .card-footer { color: #000; background: #fff; }
  .card-layout { grid-template-columns: .9fr 1.1fr; }
  .card-identity, .card-contact { padding: 28px; }
  .card-contact { border-left: 1px solid #000; }
  .card-logo-link { padding: 9px 11px; background: #090909; }
  .card-logo-link img { mix-blend-mode: normal; }
  .identity-copy h1, .card-role, .identity-statement span, .contact-heading h2 { color: #000; }
  .card-credentials, .identity-statement p, .contact-heading > p:last-child, .contact-action small, .save-contact small { color: #333; }
  .card-eyebrow, .official-mark, .save-contact, .card-footer a { color: #000; }
  .portrait-frame, .identity-statement, .contact-action, .save-contact { border-color: #000; }
  .contact-action, .contact-action-primary, .save-contact { color: #000; background: #fff; box-shadow: none; }
  .card-footer { display: block; border-top-color: #000; }
}
