/* Page 05 contact page: restore the warm paper, ink, and vermilion palette. */
body[data-view="4"] {
  --fg: var(--ink);
  --fg-muted: #62665f;
  --rule: #15171540;
  color-scheme: light;
}

/* The page artwork is supplied by the field backdrop; this only restores its paper base. */
body[data-view="4"] .field-backdrop { background-color: var(--paper); }
body[data-view="4"] .field-header { border-color: #15171533; }
body[data-view="4"] .field-brand { color: var(--ink); }
body[data-view="4"] .field-brand img {
  content: url("assets/mark-contact-black.svg");
  filter: none;
}
body[data-view="4"] .header-note { color: var(--ink); }
body[data-view="4"] .header-note span { color: var(--fg-muted); }
body[data-view="4"] .chapter-state > span:first-child { color: var(--red); }
body[data-view="4"] .field-watermark > span { opacity: 0; }
body[data-view="4"] #field-progress,
body[data-view="4"] #transition-meter { background: var(--red); }
body[data-view="4"] .field-footer { border-color: var(--rule); }
body[data-view="4"] .chapter-nav [aria-current] {
  background: #df432f1a;
  color: var(--red);
}
body[data-view="4"] .chapter-nav button:hover:not([aria-current]) {
  background: #df432f12;
  color: var(--red);
}
body[data-view="4"] .field-navigation button { border-color: var(--rule); }
body[data-view="4"] .field-navigation button:hover:not(:disabled) {
  color: var(--ink);
  background: #df432f18;
  border-color: var(--red);
}

#contact {
  color: var(--ink);
  background: transparent;
}
#contact .contact-heading { left: 7.5%; top: 20%; }
#contact .contact-heading h2 > span { color: var(--red); }
#contact .contact-channels {
  left: 54%;
  right: 7.5%;
  top: 20%;
  bottom: 11%;
  max-height: none;
  box-sizing: border-box;
  overflow: auto;
  padding: 20px;
  border: 1px solid #15171524;
  background: rgba(238, 236, 228, .82);
  scrollbar-color: #15171555 transparent;
  backdrop-filter: blur(3px);
}
#contact:not([inert]) .contact-channels { pointer-events: auto; }
#contact .contact-label {
  margin-bottom: 24px;
  color: var(--red);
  font-size: 13px;
  font-weight: 650;
}
#contact .contact-row > a {
  color: var(--ink);
  transition: color .18s ease;
}
#contact .contact-row { border-color: #15171533; }
#contact .contact-row > a:hover,
#contact .contact-row > button:hover { color: var(--red); }
#contact .contact-row > button { color: var(--fg-muted); }
#contact .contact-row.phone { margin-top: 20px; padding-bottom: 16px; }
#contact .wechat-inline {
  display: flex;
  width: 100%;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  margin: 20px 0 0;
  padding: 18px 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}
#contact .wechat-qr {
  position: relative;
  flex: none;
  width: clamp(256px, 20vw, 320px);
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #1517150d;
}
/* Keep the original source and crop, including its white quiet zone. */
#contact .wechat-qr img {
  position: absolute;
  width: 120.652174%;
  height: 153.668478%;
  max-width: none;
  left: -10.326087%;
  top: -33.152174%;
  filter: none;
}
#contact .wechat-inline-copy { display: grid; gap: 12px; min-width: 0; }
#contact .wechat-inline-copy h3 {
  color: var(--ink);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 750;
  white-space: nowrap;
}
#contact .wechat-inline-copy p { color: var(--fg-muted); font-size: 12px; line-height: 1.8; }
#contact .wechat-save {
  justify-self: start;
  padding: 8px 0;
  margin-top: 6px;
  border-bottom: 1px solid #bb483f66;
  color: var(--ink);
  font-size: 11px;
}
#contact .wechat-save:hover,
#contact .contact-replay:hover { color: var(--red); }
#contact .contact-replay {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 10px 0;
  margin-top: 10px;
  border-bottom: 1px solid #15171580;
  color: var(--ink);
  font-size: 11px;
}
#contact .contact-replay b { font: 21px Arial, sans-serif; }
#contact #contact-feedback { color: var(--red); }
#contact #contact-feedback:empty { min-height: 0; margin-top: 0; }
#contact :is(a, button):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

@media (min-width: 801px) and (max-width: 1100px) {
  #contact .contact-heading { left: 6%; }
  #contact .contact-heading h2 { font-size: clamp(100px, 10.2vw, 113px); }
  #contact .contact-channels { left: 52%; right: 6%; padding: 18px; }
  #contact .wechat-qr { width: min(clamp(210px, 21vw, 256px), 55%); }
  #contact .wechat-inline-copy h3 { font-size: 22px; }
}

@media (min-width: 601px) and (max-width: 800px) {
  #contact .contact-heading { left: 6%; top: 18%; }
  #contact .contact-heading h2 { font-size: clamp(78px, 12vw, 95px); }
  #contact .contact-channels { left: 47%; right: 5%; padding: 16px; }
  #contact .wechat-inline { gap: 10px; }
  #contact .wechat-qr { width: clamp(168px, 23vw, 200px); }
  #contact .wechat-inline-copy { gap: 8px; }
  #contact .wechat-inline-copy h3 { font-size: 16px; }
  #contact .wechat-inline-copy p { font-size: 11px; }
  #contact .contact-row > a { font-size: 18px; }
  #contact .contact-row.phone > a { font-size: 15px; }
}

@media (min-width: 601px) and (max-height: 760px) {
  #contact .contact-channels { top: max(96px, 14%); bottom: 88px; padding: 16px; }
  #contact .contact-label { margin-bottom: 14px; }
  #contact .contact-row { padding-bottom: 12px; }
  #contact .contact-row.phone { margin-top: 12px; padding-bottom: 12px; }
  #contact .wechat-inline { margin-top: 10px; padding: 10px 0; }
  #contact .wechat-qr { width: min(224px, 55%); }
  #contact .wechat-inline-copy { gap: 8px; }
  #contact .wechat-inline-copy h3 { font-size: 19px; }
  #contact .contact-replay { margin-top: 8px; }
}

@media (max-width: 600px) {
  #contact .contact-heading { top: 14%; left: 7%; right: 7%; }
  #contact .contact-heading .chapter-eyebrow { margin-bottom: 14px; }
  #contact .contact-heading h2 {
    font-size: clamp(54px, 17vw, 83px);
    line-height: 1;
    letter-spacing: -.035em;
  }
  #contact .contact-heading h2 br { display: none; }
  #contact .contact-channels {
    display: flex;
    flex-direction: column;
    left: 7%;
    right: 7%;
    top: 29%;
    bottom: 84px;
    max-height: none;
    padding: 12px;
    background: rgba(238, 236, 228, .92);
  }
  #contact .wechat-inline {
    order: -1;
    flex: none;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0 0 16px;
  }
  #contact .wechat-qr { width: min(256px, 100%); }
  #contact .wechat-inline-copy {
    width: 100%;
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    align-items: center;
  }
  #contact .wechat-inline-copy h3 { font-size: 23px; }
  #contact .wechat-inline-copy p { font-size: 11px; grid-column: 1; }
  #contact .wechat-save { grid-column: 2; grid-row: 1 / 3; margin-top: 0; font-size: 11px; }
  #contact .contact-label { margin-bottom: 10px; font-size: 11px; }
  #contact .contact-row { padding-bottom: 12px; }
  #contact .contact-row > a { font-size: 23px; }
  #contact .contact-row > button { font-size: 8px; }
  #contact .contact-row.phone { margin-top: 12px; }
  #contact .contact-row.phone > a { font-size: 18px; }
  #contact .contact-replay { margin-top: 4px; padding: 8px 0; font-size: 10px; }
  #contact .contact-replay b { font-size: 18px; }
}

@media (max-width: 600px) and (max-height: 680px) {
  #contact .contact-heading { top: 12%; }
  #contact .contact-channels { top: 32%; bottom: 68px; padding: 10px; }
  #contact .wechat-qr { width: min(194px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  #contact .contact-row > a { transition: none; }
}
