/*
 * Contact hub — communication switchboard
 * Four verified public channels, arranged by visitor intent.
 */

.contact-skip-link {
  position: fixed;
  z-index: 2000;
  top: 8px;
  left: 12px;
  padding: 9px 13px;
  border-radius: 9px;
  color: #ffffff;
  background: var(--puxin-page-ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform .18s ease;
}

.contact-skip-link:focus {
  transform: translateY(0);
}

.contact-hub-main {
  align-self: start;
  padding-bottom: 18px;
}

.contact-hub-hero {
  height: 164px;
}

.contact-hub-hero::after {
  background:
    linear-gradient(90deg, rgba(4, 10, 20, .96) 0%, rgba(4, 10, 20, .88) 34%, rgba(4, 10, 20, .30) 62%, rgba(4, 10, 20, .08) 84%),
    linear-gradient(0deg, rgba(4, 10, 20, .24), transparent 62%);
}

.contact-hub-hero .puxin-page-hero__media img {
  object-position: 58% 54%;
  filter: saturate(.74) contrast(.98);
}

.contact-hub-hero .puxin-page-kicker {
  color: #a5ecff;
}

.contact-hub-hero .puxin-page-hero__copy {
  width: min(600px, 53%);
}

.contact-hub-hero__prompt {
  margin: 9px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, .68);
  font-size: 8px;
  font-weight: 760;
  line-height: 1;
}

.contact-hub-hero__prompt::before {
  content: "";
  width: 18px;
  height: 1px;
  background: #21c7f3;
}

.contact-signal-board {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: clamp(24px, 4vw, 58px);
  width: 278px;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 13px;
  background: rgba(7, 17, 31, .46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(7, 17, 31, .14);
  transform: translateY(-50%);
}

.contact-signal-board::before,
.contact-signal-board::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(165, 236, 255, .36);
}

.contact-signal-board::before {
  width: 152px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.contact-signal-board::after {
  width: 1px;
  height: 66px;
  transform: translate(-50%, -50%);
}

.contact-signal-board__hub {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(12, 24, 39, .88);
  box-shadow: 0 0 0 5px rgba(33, 199, 243, .10);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .03em;
  transform: translate(-50%, -50%);
}

.contact-signal-board__channel {
  position: absolute;
  min-width: 63px;
  min-height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 7px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .08);
  font-size: 6.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .08em;
}

.contact-signal-board__channel::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 5px;
  border-radius: 50%;
  background: #21c7f3;
  box-shadow: 0 0 0 3px rgba(33, 199, 243, .12);
}

.contact-signal-board__channel--course { left: 12px; top: 12px; }
.contact-signal-board__channel--red { right: 12px; top: 12px; }
.contact-signal-board__channel--wechat { left: 12px; bottom: 12px; }
.contact-signal-board__channel--bili { right: 12px; bottom: 12px; }
.contact-signal-board__channel--red::before { background: #f16878; box-shadow: 0 0 0 3px rgba(241, 104, 120, .12); }
.contact-signal-board__channel--wechat::before { background: #51d99a; box-shadow: 0 0 0 3px rgba(81, 217, 154, .12); }
.contact-signal-board__channel--bili::before { background: #6fd2ee; box-shadow: 0 0 0 3px rgba(111, 210, 238, .12); }

.contact-hub-panel {
  min-height: 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.contact-hub-panel__heading {
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.contact-hub-panel__heading .puxin-section-heading {
  margin-bottom: 0;
}

.contact-hub-panel__note {
  min-width: 222px;
  margin: 0 1px 1px 0;
  padding: 4px 0 4px 11px;
  border-left: 2px solid var(--puxin-page-cyan);
  color: #667482;
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.42;
}

.contact-hub-panel__note strong,
.contact-hub-panel__note span {
  display: block;
}

.contact-hub-panel__note strong {
  margin-bottom: 2px;
  color: var(--puxin-page-ink);
  font-size: 9.5px;
  font-weight: 880;
}

.contact-channel-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(250px, .86fr);
  grid-template-rows: 1.08fr .92fr;
  gap: 9px;
}

.contact-card {
  --channel-accent: #526cc7;
  --channel-soft: #eef2ff;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--puxin-page-line);
  border-top: 3px solid var(--channel-accent);
  border-radius: 14px;
  color: var(--puxin-page-text);
  background: #ffffff;
  box-shadow: none;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.contact-card.course {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
}

.contact-card.xiaohongshu {
  --channel-accent: #e14a61;
  --channel-soft: #fff0f3;
  grid-column: 1;
  grid-row: 2;
}

.contact-card.bilibili {
  --channel-accent: #cb5d84;
  --channel-soft: #fff1f6;
  grid-column: 2;
  grid-row: 2;
}

.contact-card.wechat-video {
  --channel-accent: #159565;
  --channel-soft: #eaf9f1;
  grid-column: 3;
  grid-row: 1 / 3;
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-card__media {
  position: relative;
  width: 32%;
  flex: 0 0 32%;
  overflow: hidden;
  margin: 0;
  border-right: 1px solid rgba(60, 60, 67, .10);
  background: var(--channel-soft);
}

.contact-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(.78) contrast(.96);
  transform: scale(1.01);
  transition: transform .34s ease, filter .34s ease;
}

.contact-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, .20) 78%, rgba(255, 255, 255, .72) 100%);
}

.contact-card__media-label {
  position: absolute;
  z-index: 1;
  left: 9px;
  bottom: 9px;
  min-height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(12, 24, 39, .70);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .08em;
}

.contact-card__body {
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.contact-card__meta {
  width: 100%;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-card__mark,
.contact-card__intent {
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.contact-card__mark {
  min-height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: var(--channel-accent);
  background: var(--channel-soft);
  letter-spacing: .045em;
}

.contact-card__intent {
  color: #8a949e;
}

.contact-card h3 {
  margin: 0 0 1px;
  color: var(--puxin-page-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.015em;
}

.contact-card.course h3 {
  font-size: 18px;
}

.contact-card .subtitle {
  margin: 0 0 6px;
  color: #87919a;
  font-size: 7.8px;
  font-weight: 680;
  line-height: 1.3;
}

.course-info-box {
  margin: 0 0 7px;
  padding: 6px 7px;
  border: 1px solid color-mix(in srgb, var(--channel-accent) 16%, var(--puxin-page-line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--channel-accent) 3%, #ffffff);
}

.course-info-box .label {
  display: none;
}

.course-info-box p {
  margin: 0;
  color: #586674;
  font-size: 8.4px;
  font-weight: 540;
  line-height: 1.42;
}

.course-meta {
  margin: 0 0 7px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}

.course-meta li {
  min-height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--channel-accent) 16%, var(--puxin-page-line));
  border-radius: 6px;
  color: #5f6c79;
  background: #ffffff;
  font-size: 7.3px;
  font-weight: 720;
  line-height: 1;
}

.course-btn,
.bili-btn,
.copy-btn {
  min-height: 27px;
  margin-top: auto;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--channel-accent);
  border-radius: 7px;
  color: #ffffff;
  background: var(--channel-accent);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--channel-accent) 18%, transparent);
  font-family: inherit;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.copy-btn {
  cursor: pointer;
}

.copy-btn.copied {
  border-color: #159565;
  background: #159565;
}

.contact-card--compact {
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
}

.contact-card--compact .contact-card__meta {
  margin-bottom: 4px;
}

.contact-card--compact h3 {
  font-size: 15px;
}

.contact-card--compact .subtitle {
  margin-bottom: 6px;
  font-size: 7.2px;
}

.xhs-id-box,
.bili-id-box {
  width: 100%;
  min-height: 31px;
  margin: 0 0 7px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--channel-accent) 22%, var(--puxin-page-line));
  border-radius: 8px;
  background: var(--channel-soft);
}

.xhs-id-box .label,
.bili-id-box .label {
  color: #7d878f;
  font-size: 7px;
  font-weight: 760;
}

.xhs-id-box .id-number,
.bili-id-box .id-number {
  color: var(--channel-accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
}

.contact-card__qr-heading {
  width: 100%;
}

.contact-card.wechat-video .contact-card__meta {
  margin-bottom: 5px;
}

.contact-card.wechat-video h3 {
  font-size: 16px;
}

.qr-container {
  width: min(180px, 80%);
  aspect-ratio: 716 / 960;
  min-height: 0;
  margin: 4px auto 7px;
  overflow: hidden;
  border: 1px solid rgba(21, 149, 101, .18);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .08);
}

.qr-container img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.qr-hint {
  min-height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(21, 149, 101, .22);
  border-radius: 7px;
  color: #147b58;
  background: #effaf5;
  font-size: 7.5px;
  font-weight: 820;
  line-height: 1;
}

.qr-hint .scan-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #159565;
  box-shadow: 0 0 0 3px rgba(21, 149, 101, .12);
}

.toast {
  position: fixed;
  z-index: 9999;
  top: 78px;
  left: 50%;
  min-height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(7, 17, 31, .94);
  box-shadow: 0 12px 28px rgba(7, 17, 31, .20);
  font-size: 9px;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast .check-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  background: #75e3af;
  font-size: 10px;
  font-weight: 950;
}

.course-btn:focus-visible,
.bili-btn:focus-visible,
.copy-btn:focus-visible,
.contact-skip-link:focus-visible,
.puxin-site-footer a:focus-visible {
  outline: 3px solid rgba(33, 199, 243, .42);
  outline-offset: 2px;
}

@media (hover: hover) {
  .contact-card:hover {
    border-color: color-mix(in srgb, var(--channel-accent) 42%, var(--puxin-page-line));
    box-shadow: 0 14px 28px rgba(15, 23, 42, .09);
    transform: translateY(-2px);
  }

  .contact-card.course:hover .contact-card__media img {
    filter: saturate(.90) contrast(.98);
    transform: scale(1.045);
  }

  .course-btn:hover,
  .bili-btn:hover,
  .copy-btn:hover {
    box-shadow: 0 8px 18px color-mix(in srgb, var(--channel-accent) 26%, transparent);
    transform: translateY(-1px);
  }

  .puxin-site-footer a:hover {
    color: #ffffff;
  }
}

@media (min-width: 901px) {
  .contact-hub-main {
    height: 100%;
    max-height: 760px;
    align-self: center;
    grid-template-rows: 164px minmax(0, 1fr);
  }
}

@media (min-width: 901px) and (max-height: 700px) {
  .contact-hub-main {
    grid-template-rows: 142px minmax(0, 1fr);
  }

  .contact-hub-panel {
    padding-block: 12px;
  }

  .contact-card__body {
    padding-block: 8px;
  }

  .qr-container {
    width: min(160px, 76%);
  }
}

@media (max-width: 900px) {
  .contact-hub-hero {
    height: 224px;
  }

  .contact-hub-hero .puxin-page-hero__copy {
    width: 57%;
  }

  .contact-signal-board {
    right: 20px;
    width: 250px;
  }

  .contact-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
  }

  .contact-card.course {
    min-height: 236px;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .contact-card.xiaohongshu {
    min-height: 182px;
    grid-column: 1;
    grid-row: 2;
  }

  .contact-card.bilibili {
    min-height: 182px;
    grid-column: 2;
    grid-row: 2;
  }

  .contact-card.wechat-video {
    min-height: 286px;
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 18px;
    text-align: left;
  }

  .contact-card__qr-heading {
    align-self: end;
  }

  .qr-container {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 180px;
    margin: 0;
  }

  .qr-hint {
    align-self: start;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .contact-signal-board {
    display: none;
  }

  .contact-hub-hero .puxin-page-hero__copy {
    width: min(600px, 76%);
  }
}

@media (max-width: 640px) {
  .contact-hub-main {
    padding-bottom: 10px;
  }

  .contact-hub-hero {
    height: 248px;
  }

  .contact-hub-hero::after {
    background: linear-gradient(90deg, rgba(4, 10, 20, .96) 0%, rgba(4, 10, 20, .88) 60%, rgba(4, 10, 20, .32) 100%);
  }

  .contact-hub-hero .puxin-page-hero__media img {
    object-position: 62% center;
  }

  .contact-hub-hero .puxin-page-hero__copy {
    width: calc(100% - 34px);
  }

  .contact-hub-hero h1 {
    max-width: 330px;
    font-size: clamp(24px, 7.2vw, 29px);
  }

  .contact-hub-panel {
    padding: 13px;
  }

  .contact-hub-panel__heading {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .contact-hub-panel__note {
    min-width: 0;
    margin-bottom: 2px;
  }

  .contact-channel-grid {
    grid-template-columns: 1fr;
  }

  .contact-card.course,
  .contact-card.xiaohongshu,
  .contact-card.bilibili,
  .contact-card.wechat-video {
    grid-column: 1;
    grid-row: auto;
  }

  .contact-card.course {
    min-height: 326px;
    flex-direction: column;
  }

  .contact-card__media {
    width: 100%;
    height: 112px;
    flex: 0 0 112px;
    border-right: 0;
    border-bottom: 1px solid rgba(60, 60, 67, .10);
  }

  .contact-card.xiaohongshu,
  .contact-card.bilibili {
    min-height: 194px;
  }

  .contact-card.wechat-video {
    min-height: 440px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .contact-card__qr-heading {
    align-self: stretch;
  }

  .qr-container {
    width: min(220px, 78%);
    margin: 8px auto;
  }

  .qr-hint {
    align-self: center;
  }

  .toast {
    top: 70px;
    max-width: calc(100% - 28px);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-skip-link,
  .contact-card,
  .contact-card__media img,
  .course-btn,
  .bili-btn,
  .copy-btn,
  .toast {
    transition-duration: .001ms;
  }
}
