/*
  公开门户 V7：统一入场、精细指针深度反馈、分页面 Hero 与信息型手风琴。
  动效只改变 transform / opacity；内容在脚本或观察器不可用时保持可见。
*/
.tm-public-v7 {
  --tm-v7-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tm-v7-line: #d5e4f5;
  --tm-v7-line-strong: #a9cdf8;
  --tm-v7-surface: #f4f8fd;
  --tm-v7-shadow: 0 16px 38px rgba(17, 67, 123, 0.09);
}

/* 标题后的内容组与卡片使用同一套一次性入场语法。 */
.tm-public-v7.tm-motion-ready [data-tm-reveal-group="true"] > .tm-motion-item {
  --tm-reveal-y: 0px;
  opacity: 1;
  transform: translate3d(0, var(--tm-reveal-y), 0);
  transition:
    opacity 560ms var(--tm-v7-ease),
    transform 560ms var(--tm-v7-ease);
  transition-delay: var(--tm-item-delay, 0ms);
}

.tm-public-v7.tm-motion-ready [data-tm-reveal-group="true"][data-tm-reveal-state="hidden"] > .tm-motion-item {
  --tm-reveal-y: 24px;
  opacity: 0;
}

.tm-public-v7.tm-motion-ready
  [data-tm-reveal-group="true"][data-tm-reveal-active="true"]
  > .tm-motion-item {
  will-change: opacity, transform;
}

/* 入场位移与重力旋转共享一个最终 transform，避免后加载的入场规则覆盖 3D。 */
.tm-public-v7.tm-motion-ready
  [data-tm-reveal-group="true"]
  > .tm-motion-item[data-tm-tilt-ready="true"] {
  transform: perspective(1200px) rotateX(var(--tm-tilt-x)) rotateY(var(--tm-tilt-y))
    translate3d(0, calc(var(--tm-tilt-lift) + var(--tm-reveal-y)), 0);
}

/* 首页重点卡片：克制的实体层次，而不是漂浮式夸张旋转。 */
.tm-public-v7[data-tcwf-page="alliance-portal"] :is(
  #highlights .tcwf-solution-feature,
  #benefits .tcwf-benefit
) {
  --tm-light-x: 50%;
  --tm-light-y: 50%;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--tm-v7-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(65, 177, 255, 0.12), transparent 42%),
    linear-gradient(145deg, #fff 0%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(17, 67, 123, 0.07);
}

.tm-public-v7[data-tcwf-page="alliance-portal"] :is(
  #highlights .tcwf-solution-feature,
  #benefits .tcwf-benefit
)[data-tm-tilt-ready="true"]::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--tm-light-x) var(--tm-light-y),
    rgba(255, 255, 255, 0.94),
    rgba(116, 190, 255, 0.12) 35%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  content: "";
}

.tm-public-v7[data-tcwf-page="alliance-portal"] :is(
  #highlights .tcwf-solution-feature,
  #benefits .tcwf-benefit
)[data-tm-tilt-ready="true"][data-tm-tilt-state="active"]::before {
  opacity: 1;
}

.tm-public-v7[data-tcwf-page="alliance-portal"] :is(
  #highlights .tcwf-solution-feature,
  #benefits .tcwf-benefit
) > * {
  position: relative;
  z-index: 1;
}

.tm-public-v7[data-tcwf-page="alliance-portal"] #highlights .tcwf-solution-feature[data-tm-tilt-ready="true"] .tcwf-solution-feature__icon,
.tm-public-v7[data-tcwf-page="alliance-portal"] #benefits .tcwf-benefit[data-tm-tilt-ready="true"] .tcwf-benefit__icon {
  transform: translateZ(16px);
  transition: transform 260ms var(--tm-v7-ease);
}

@media (hover: hover) and (pointer: fine) {
  .tm-public-v7 :is(.tm-kpi, .tcwf-benefit, .tcwf-step) {
    transition:
      border-color 200ms ease,
      box-shadow 200ms ease;
  }

  .tm-public-v7 :is(.tm-kpi, .tcwf-benefit, .tcwf-step):hover {
    border-color: var(--tm-v7-line-strong);
    box-shadow: 0 4px 12px rgba(17, 67, 123, 0.09);
  }
}

/* 六页 Hero 共享构图规范，但每页的艺术焦点和裁切位置独立。 */
.tm-public-v7 .tm-hero-stage .tcwf-static-hero__background {
  filter: saturate(0.98) contrast(1.01);
  transition: opacity 480ms ease;
}

.tm-public-v7 .tm-hero-stage .tcwf-solution-hero__copy,
.tm-public-v7 .tm-hero-stage h1,
.tm-public-v7 .tm-hero-stage .tcwf-solution-hero__copy > p {
  text-align: left;
}

.tm-public-v7[data-tcwf-page="alliance-guide"] .tm-hero-stage .tcwf-static-hero__background {
  object-position: 66% center;
}

.tm-public-v7[data-tcwf-page="alliance-knowledge"] .tm-hero-stage .tcwf-static-hero__background {
  object-position: 70% center;
}

.tm-public-v7[data-tcwf-page="alliance-contents"] .tm-hero-stage .tcwf-static-hero__background {
  object-position: 72% center;
}

.tm-public-v7[data-tcwf-page="alliance-salon"] .tm-hero-stage .tcwf-static-hero__background {
  object-position: 68% center;
}

.tm-public-v7[data-tcwf-page="alliance-growth"] .tm-hero-stage .tcwf-static-hero__background {
  object-position: 70% center;
}

/* 行为加分：单列全宽展开，避免双列瀑布造成一整块无意义空白。 */
.tm-guide-v7 #score-accordion.tm-score-accordion {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__item,
.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__item + .tcwf-accordion__item {
  overflow: hidden;
  border: 1px solid var(--tm-v7-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 67, 123, 0.05);
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__trigger {
  min-height: 76px;
  padding: 20px 28px;
  color: #0b315f;
  background: #fff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.55;
  text-align: left;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__trigger[aria-expanded="true"] {
  color: #0052d9;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fbff 100%);
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__panel {
  width: 100%;
  padding: 24px 28px 28px;
  border-top: 1px solid #e1ebf6;
  background: #fff;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__panel[hidden] {
  display: none;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tm-table-scroll {
  overflow: hidden;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tm-table th,
.tm-guide-v7 #score-accordion.tm-score-accordion .tm-table td {
  padding: 17px 20px;
  line-height: 1.55;
}

.tm-guide-v7 #score-accordion.tm-score-accordion .tm-table th {
  color: #355779;
  background: #edf4fd;
}

/* FAQ：用一个有呼吸感的知识模块包裹分类与问题卡，展开内容不再顶格。 */
.tm-guide-v7 #faq-tabs.tm-faq-columns {
  padding: 24px;
  border: 1px solid var(--tm-v7-line);
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fbff, #f1f7fe);
  box-shadow: var(--tm-v7-shadow);
}

.tm-guide-v7 #faq-tabs.tm-faq-columns > .tcwf-tabs__list {
  margin: -24px -24px 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--tm-v7-line);
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.9);
}

.tm-guide-v7 #faq-tabs.tm-faq-columns > .tcwf-tabs__panel {
  padding: 24px;
  border: 1px solid #deebf8;
  border-radius: 12px;
  background: #f5f9fe;
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion {
  gap: 18px;
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__item,
.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__item + .tcwf-accordion__item {
  border-color: #d6e5f5;
  box-shadow: 0 10px 24px rgba(17, 67, 123, 0.06);
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__trigger {
  min-height: 74px;
  padding: 20px 24px;
  color: #14365f;
  background: #fff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.55;
  text-align: left;
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__trigger[aria-expanded="true"] {
  color: #0052d9;
  background: linear-gradient(90deg, #edf5ff, #fff);
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__panel {
  padding: 20px 24px 24px;
  border-top: 1px solid #e1ebf6;
  color: #455d78;
  background: #fff;
  line-height: 1.8;
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__panel > :first-child {
  margin-top: 0;
}

.tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__panel > :last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .tm-public-v7:not([data-tcwf-page="alliance-portal"]):not([data-tcwf-page="alliance-guide"])
    .tm-hero-stage::after {
    background: linear-gradient(90deg, rgba(248, 252, 255, 0.98) 0%, rgba(248, 252, 255, 0.9) 68%, rgba(248, 252, 255, 0.28) 100%);
  }

  .tm-public-v7:not([data-tcwf-page="alliance-portal"]):not([data-tcwf-page="alliance-guide"])
    .tm-hero-stage
    .tcwf-static-hero__background {
    object-position: 24% center;
    opacity: 0.56;
  }

  .tm-public-v7:not([data-tcwf-page="alliance-portal"]):not([data-tcwf-page="alliance-guide"])
    .tm-hero-stage
    .tcwf-solution-hero__copy {
    position: relative;
    z-index: 1;
    align-self: center;
    width: min(100%, 330px);
  }

  .tm-public-v7:not([data-tcwf-page="alliance-portal"]):not([data-tcwf-page="alliance-guide"])
    .tm-hero-stage
    .tcwf-solution-hero__copy
    > p {
    display: block;
    overflow: visible;
    max-height: none;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
  }

  .tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__trigger,
  .tm-guide-v7 #score-accordion.tm-score-accordion .tcwf-accordion__panel {
    padding-right: 20px;
    padding-left: 20px;
  }

  .tm-guide-v7 #faq-tabs.tm-faq-columns {
    padding: 16px;
    border-radius: 12px;
  }

  .tm-guide-v7 #faq-tabs.tm-faq-columns > .tcwf-tabs__list {
    margin: -16px -16px 16px;
    padding: 0 12px;
    border-radius: 12px 12px 0 0;
  }

  .tm-guide-v7 #faq-tabs.tm-faq-columns > .tcwf-tabs__panel {
    padding: 16px;
  }

  .tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__trigger,
  .tm-guide-v7 #faq-tabs.tm-faq-columns .tcwf-accordion__panel {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* 移动端登录入口：顶栏文字、首屏文本链接。不另造渐变胶囊，桌面仍只用顶栏“登录”。 */
.portal-hero-member-login {
  display: none;
}

@media (max-width: 820px) {
  .tm-public-v7 .tcwf-portal-header__mobile-brand {
    min-width: 0;
  }

  .tm-public-v7 .tcwf-portal-header__mobile-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tm-public-v7 .tcwf-portal-header__mobile-login {
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--tm-radius-sm);
    color: var(--tm-blue-dark);
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 44px;
    letter-spacing: 0;
    text-decoration: none;
  }

  .tm-public-v7 .tm-hero-stage .tcwf-solution-hero__copy,
  .tm-public-v7 .tm-hero-stage .tcwf-solution-hero__copy > p {
    display: block;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
  }

  .tm-public-v7 .tm-hero-stage .tcwf-solution-hero__copy > p.portal-hero-member-login {
    margin-top: 16px;
    color: var(--tm-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
  }

  .tm-public-v7 .tm-hero-stage .portal-hero-member-login .tcwf-text-link {
    display: inline;
    min-height: 0;
    margin-left: 4px;
    color: var(--tm-blue-dark);
    font-weight: 500;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .tm-public-v7.tm-motion-ready [data-tm-reveal-group="true"] > .tm-motion-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .tm-public-v7[data-tcwf-page="alliance-portal"] :is(
    #highlights .tcwf-solution-feature,
    #benefits .tcwf-benefit
  )::before {
    display: none;
  }
}
