/* Final contact layer: readable, keyboard-friendly and usable on a small phone. */
#contact .contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
#contact .contact-links a { max-width: 100%; }
#contact-card {
  width: min(480px, calc(100% - 32px));
  max-width: 480px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #24272b;
  background: #fff;
  border: 1px solid #b9b6ae;
  border-radius: 8px;
  text-align: left;
}
#contact-card .contact-card-top { color: #555b60; gap: 20px; }
#contact-card .contact-card-top button { min-height: 44px; }
#contact-card h2 { margin-top: 14px; }
#contact-card .contact-card-intro { margin-bottom: 18px; color: #555b60; }
#contact-card .contact-card-options a {
  min-height: 64px;
  padding: 12px 0;
  color: #24272b;
  border-color: #d7d8d6;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
#contact-card .contact-card-options small { color: #555b60; font-size: .8125rem; }
#contact-card .save-contact {
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #293e46;
  border-radius: 3px;
  background: #293e46;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}
#contact-card .save-contact:hover { background: #192e36; color: #fff; }
#contact-card .contact-save-note {
  margin-top: 8px;
  font-size: .8125rem;
  line-height: 1.5;
  color: #555b60;
}
#contact-card .contact-tools { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; }
#contact-card .contact-tools button {
  min-height: 44px;
  padding: 8px 0;
  background: none;
  border: 0;
  color: #293e46;
  font: inherit;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#contact-card [hidden] { display: none !important; }
#contact-card .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#contact-card .contact-help { margin-top: 8px; border-top: 1px solid #d7d8d6; font-size: .875rem; }
#contact-card .contact-help summary {
  display: list-item;
  padding: 12px 0;
  min-height: 44px;
  cursor: pointer;
  color: #293e46;
  list-style: disclosure-closed inside;
}
#contact-card .contact-help[open] summary { list-style-type: disclosure-open; }
#contact-card .contact-help p { margin: 0 0 12px; color: #42494d; line-height: 1.6; }
#contact-card .contact-help a { text-decoration: underline; text-underline-offset: 3px; }
#contact-card .contact-help .contact-download { display: inline-flex; align-items: center; min-height: 44px; }
#contact-card .contact-status { font-size: .8125rem; line-height: 1.5; color: #293e46; margin-top: 8px; }
#contact-card .contact-status:empty { margin-top: 0; }
#contact-card .contact-copy-fallback label { display: block; margin: 12px 0 6px; font-size: .875rem; }
#contact-card .contact-copy-fallback input {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  color: #24272b;
  background: #fff;
  border: 1px solid #667278;
  border-radius: 3px;
  font: inherit;
  font-size: 1rem;
}
#contact-card :is(a, button, summary, input):focus-visible { outline: 3px solid #315e74; outline-offset: 3px; }
@media (max-width: 600px) {
  #contact-card {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    margin: auto auto 0;
    padding: 18px 20px max(20px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }
}
@media (forced-colors: active) {
  #contact-card .save-contact { border: 2px solid ButtonText; }
  #contact-card::backdrop { background: Canvas; opacity: .75; }
}

#contact-card .contact-identity { display: flex; align-items: center; gap: 16px; margin: 18px 0; }
#contact-card .contact-portrait { width: 80px; height: 80px; flex: 0 0 80px; object-fit: cover; object-position: center top; border-radius: 50%; background: #e6e2dc; }
#contact-card .contact-identity h2 { margin: 0; font-size: clamp(1.5rem, 5vw, 2rem); }
#contact-card .contact-identity .contact-card-intro { margin: 5px 0 0; line-height: 1.5; }
@media (max-width: 360px) { #contact-card .contact-identity { gap: 12px; } #contact-card .contact-portrait { width: 64px; height: 64px; flex-basis: 64px; } }

