/* Shared page rhythm for the three language versions of every project. */
.page.project-page {
  width: 100%;
  max-width: 1100px;
  padding-inline: clamp(1.3rem, 4vw, 3.5rem);
}

.project-page .project-intro {
  margin-top: 0;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.project-page .project-intro h1 {
  max-width: 20ch;
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.project-page :is(.signal-hero, .xxh-landing).project-intro h1 {
  margin-inline: auto;
}

.project-page .project-intro :is(p, .hi-hero-desc) {
  line-height: 1.8;
}

.project-page :is(.as-panel-head, .hi-panel-head, .ss-panel-head, .rps-sub-header, .ps-section-head, .signal-section-header, .section-header) h2,
.project-page :is(.spm-section, .astra-section) > h2 {
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.project-page :is(.as-panel-head, .hi-panel-head, .ss-panel-head, .rps-sub-header, .ps-section-head, .section-header) > p {
  max-width: 720px;
  line-height: 1.7;
}

.project-page :is(.button, .button-outline, .ps-button, .hi-hero-actions a, .signal-hero-actions a, .astra-actions a) {
  min-height: 44px;
  align-items: center;
}

.project-page :is(img, video, iframe, canvas, pre, table) {
  max-width: 100%;
}

.project-page :is(.as-grid, .as-grid-2, .hi-overview-grid, .rps-grid, .ss-grid, .ps-grid-3, .ps-grid-4) > * {
  min-width: 0;
}

.project-brief {
  width: 100%;
  margin: 0 0 clamp(2.2rem, 4vw, 3.5rem);
  padding: clamp(1.3rem, 2.8vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(28, 43, 72, 0.82), rgba(16, 28, 49, 0.72));
  color: rgba(255, 255, 255, 0.78);
}

.project-brief h2 {
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
}

.project-brief > p {
  max-width: 850px;
  margin: 0 0 1.3rem;
  font-size: 0.98rem;
  line-height: 1.8;
}

.project-brief ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-brief li {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.65;
}

.project-brief li strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #fff;
  font-size: 0.95rem;
}

.project-brief li span {
  display: block;
  font-size: 0.86rem;
}

.project-tool > .project-brief,
.project-tool-content > .project-brief {
  width: min(100%, 1100px);
  margin-inline: auto;
}

.project-tool > .project-brief {
  width: min(calc(100% - 2.6rem), 1100px);
}

.project-tool:not(.bg-gradient-to-br) > .project-brief {
  border-color: #cbd5e1;
  background: #fff;
  color: #475569;
}

.project-tool:not(.bg-gradient-to-br) > .project-brief h2,
.project-tool:not(.bg-gradient-to-br) > .project-brief li strong {
  color: #0f172a;
}

.project-tool:not(.bg-gradient-to-br) > .project-brief li {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.xxh-landing .project-brief {
  max-width: 850px;
  margin: 2rem auto 0;
  text-align: left;
}

.xxh-landing .project-brief > p {
  max-width: 850px;
  margin: 0 0 1.3rem;
}

.project-guide {
  width: 100%;
  margin: 0 0 clamp(2.5rem, 4vw, 3.5rem);
  color: rgba(255, 255, 255, 0.78);
}

.project-guide h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
}

.project-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

/* 每页的介绍卡数量按项目需要来定，不强制四张。
   卡片数为奇数时，最后一张跨满整行，避免右下留空。 */
.project-guide-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.project-guide article {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.project-guide h3 {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 1rem;
}

.project-guide p {
  margin: 0;
  line-height: 1.7;
}

@media (prefers-reduced-motion: no-preference) {
  .project-guide article,
  .project-brief li {
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  }

  .project-guide article:hover,
  .project-brief li:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 190, 255, 0.35);
    background-color: rgba(125, 190, 255, 0.09);
  }
}

.project-tool > .project-guide,
.project-tool-content > .project-guide {
  width: min(calc(100% - 2.6rem), 1100px);
  margin-inline: auto;
}

.project-tool:not(.bg-gradient-to-br) > .project-guide {
  color: #475569;
}

.project-tool:not(.bg-gradient-to-br) > .project-guide h2,
.project-tool:not(.bg-gradient-to-br) > .project-guide h3 {
  color: #0f172a;
}

.project-tool:not(.bg-gradient-to-br) > .project-guide article {
  border-color: #cbd5e1;
  background: #fff;
}

.xxh-landing .project-guide { margin: 2rem auto 0; text-align: left; }

@media (max-width: 767px) {
  .page.project-page {
    padding-inline: clamp(1.3rem, 4vw, 2rem);
  }

  .project-page .project-intro h1 {
    font-size: var(--h1-size);
  }

  .project-page :is(.button-row, .single-action, .ps-actions, .hi-hero-actions, .signal-hero-actions) > a {
    min-width: 0;
    white-space: normal;
  }

  .project-brief ul {
    grid-template-columns: 1fr;
  }

  .project-guide-grid { grid-template-columns: 1fr; }
}

/* The two interactive projects keep their own work areas and share the
   same outer title and content width as the article pages. */
.project-tool .project-tool-intro {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding: clamp(1.3rem, 4vw, 3.5rem);
}

.project-tool .project-tool-intro h1 {
  max-width: 20ch;
  margin-inline: auto;
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.project-tool .project-tool-intro p {
  margin: 1rem auto 0;
  max-width: 680px;
  line-height: 1.8;
}

.project-tool .project-tool-content .project-tool-intro {
  padding: 0;
}

.project-tool:not(.bg-gradient-to-br) .project-tool-intro {
  color: #0f172a;
}

.project-tool:not(.bg-gradient-to-br) .project-tool-intro p {
  color: #475569;
}

.project-tool .project-tool-content {
  width: min(100%, 1100px);
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .project-tool *,
  .project-tool *::before,
  .project-tool *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 项目页的分类标签：与首页卡片上的 .tag-category 同一套视觉。 */
.project-page .project-category {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.project-page .project-category::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.85);
  flex-shrink: 0;
}
