/* Homepage-only layout. Keep these rules after the legacy shared layers. */
.home-page .hero-block { padding: 32px 0; }
.home-page .hero-grid { gap: 24px; align-items: stretch; }
.home-page .hero-grid .carousel { aspect-ratio: auto; min-height: 420px; }
.home-page .headlines { padding: 24px; box-shadow: none; }
.home-page .headlines .lead { padding: 14px 16px; }
.home-page .headlines .news-list li { padding-block: 10px; }
.home-page .block { padding-block: 48px; }
.home-page .hero-block + .block { padding-block: 32px 40px; }
.home-page .section-title { align-items: center; flex-wrap: nowrap; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; }
.home-page .section-title h2 { display: grid; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; font-size: 24px; line-height: 1.4; letter-spacing: .03em; }
.home-page .section-title h2 .en { display: block; margin: 0; font-size: 9px; line-height: 1.5; letter-spacing: .1em; overflow-wrap: anywhere; }
.home-page .section-title .more { flex-shrink: 0; white-space: nowrap; padding-block: 10px; }
.home-page .tri-col { gap: 20px; }
.home-page .tri-col .panel { padding: 24px 20px; }
.home-page .tri-col .section-title { margin-bottom: 12px; }
.home-page .tri-col .section-title h2 { font-size: 21px; }
.home-page .tri-col .news-list li { padding-block: 12px; }
.home-page .research-lines { gap: 20px; }
.home-page .research-card { min-width: 0; padding: 24px; }
.home-page .research-card p { font-size: 14px; line-height: 1.85; }
.home-page .research-card .more { min-height: 36px; margin-top: 12px; }
.home-page .brand-matrix { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; border: 0; background: transparent; overflow: visible; }
.home-page .brand-item { min-width: 0; padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.home-page .brand-item .brand-name { line-height: 1.6; overflow-wrap: anywhere; }
.home-page .brand-item .brand-en { letter-spacing: .06em; overflow-wrap: anywhere; }
.home-page .brand-item .brand-desc { font-size: 13px; line-height: 1.8; }
.home-page .tineng-shuo { padding-block: 48px; }
.home-page .tineng-grid { gap: 24px; }
.home-page .expert-block .layout-2col { gap: 28px; }
.home-page .org-tree { padding: 20px; }
.home-page .org-branch:last-child { margin-bottom: 0; }
.home-page .data-grid { gap: 16px; }
.home-page .data-item { min-width: 0; padding: 12px 8px; }
.home-page .data-item::after { display: none; }
.home-page .data-item .label { line-height: 1.6; letter-spacing: .025em; }
.home-page .topic-banner { aspect-ratio: auto; min-height: 108px; padding: 20px; }
.home-page .topic-banner .t1 { line-height: 1.6; }
.home-page .topic-banner .t2 { line-height: 1.6; letter-spacing: .08em; }
.home-page .mix-grid { gap: 20px; }
.home-page .video-tile .info { padding: 16px; }
.home-page .video-tile .t { font-size: 15px; line-height: 1.7; }

/* A real grid, not wrapped inline text with two competing separators. */
.home-page .friend-links { padding-block: 40px; }
.home-page .friend-links h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 0 0 20px; font-family: var(--f-title, var(--f-sans)); font-size: 22px; line-height: 1.5; letter-spacing: .04em; color: var(--fg); }
.home-page .friend-links h2 .en { font-family: var(--f-mono); font-size: 10px; font-weight: 400; letter-spacing: .1em; color: var(--fg-muted); }
.home-page .friend-links ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.home-page .friend-links ul li { display: flex; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); color: var(--fg); font-size: 14px; cursor: default; }
.home-page .friend-links li::after { content: none; display: none; }
.home-page .friend-links ul li:last-child { border-right: 1px solid var(--line); }
.home-page .friend-links li > :is(a, span) { display: flex; flex: 1; align-items: center; min-width: 0; min-height: 58px; padding: 13px 16px; line-height: 1.6; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; word-break: normal; text-wrap: balance; text-decoration: none; }
.home-page .friend-links li:has(a):hover { border-color: var(--brand); background: var(--brand-wash); }
.home-page .friend-links a:focus-visible { outline-offset: -3px; border-radius: 7px; }
[data-mode="dark"] .home-page .brand-item.featured,
[data-mode="dark"] .home-page .tineng-shuo { background: #102d4c; }
[data-mode="dark"] .home-page .brand-item:hover { background: #24598b; }

@media (min-width: 768px) and (max-width: 1100px) {
  .home-page .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) !important; gap: 20px !important; }
  .home-page .hero-grid .carousel { aspect-ratio: auto !important; min-height: 420px !important; }
  .home-page .headlines { padding: 20px; }
  .home-page .headlines .lead { padding: 12px; }
  .home-page .headlines .lead h3 { font-size: 17px !important; }
  .home-page .hero-grid .carousel-slide .caption h3 { font-size: 21px !important; line-height: 1.6 !important; }
  .home-page .tri-col { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; }
  .home-page .tri-col .panel:last-child { grid-column: 1 / -1; }
  .home-page .tri-col .panel:last-child .news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .home-page .brand-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .home-page .brand-item.featured { grid-row: span 2; }
  .home-page .friend-links ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .home-page .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .home-page .hero-grid .carousel { aspect-ratio: 16 / 9 !important; min-height: 0 !important; }
  .home-page .headlines .news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}

@media (max-width: 767px) {
  .home-page .wrap { padding-inline: 16px !important; }
  .home-page .mainnav > .wrap { padding: 0 !important; }
  .home-page .hero-block { padding-block: 20px 24px; }
  .home-page .hero-grid { gap: 18px !important; }
  .home-page .hero-grid .carousel { aspect-ratio: 4 / 3 !important; min-height: 0 !important; }
  .home-page .hero-grid .carousel-slide .caption h3 { font-size: clamp(16px, 4.6vw, 18px) !important; line-height: 1.55 !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .home-page .headlines { padding: 20px 16px; }
  .home-page .headlines .lead { padding: 14px 12px; margin-bottom: 8px; }
  .home-page .headlines .lead h3 { font-size: 18px !important; line-height: 1.6; }
  .home-page .headlines .news-list li { padding-block: 11px; }
  .home-page .block, .home-page .tineng-shuo { padding-block: 32px; }
  .home-page .hero-block + .block { padding-block: 24px 32px; }
  .home-page .section-title { gap: 12px; padding-bottom: 14px; margin-bottom: 20px; }
  .home-page .section-title h2 { font-size: 21px !important; }
  .home-page .section-title h2 .en { margin: 0; font-size: 9px !important; }
  .home-page .section-title .more { font-size: 11px; margin-left: 0; }
  .home-page .tri-col { gap: 16px !important; }
  .home-page .tri-col .panel { padding: 20px 16px; }
  .home-page .tri-col .section-title { margin-bottom: 6px; }
  .home-page .research-lines { gap: 12px !important; }
  .home-page .research-card { min-height: 0; padding: 20px; }
  .home-page .research-card .tag { margin-bottom: 6px; }
  .home-page .research-card h3 { margin-bottom: 8px; }
  .home-page .research-card .more { margin-top: 6px; }
  .home-page .brand-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .home-page .brand-item { min-height: 0; padding: 18px 14px; }
  .home-page .brand-item.featured { grid-column: 1 / -1; }
  .home-page .brand-item .logo-box { margin-bottom: 12px; width: 40px; height: 40px; }
  .home-page .brand-item .brand-name { font-size: 15px; letter-spacing: 0; }
  .home-page .brand-item .brand-en { font-size: 9px; }
  .home-page .brand-item .brand-desc { font-size: 12px; }
  .home-page .expert-card .avatar { width: 56px; height: 56px; }
  .home-page .expert-card .name { font-size: 16px; }
  .home-page .data-item { padding: 10px 6px; }
  .home-page .topic-banner { min-height: 112px; padding: 16px 12px; }
  .home-page .topic-banner .t1 { font-size: 15px; letter-spacing: 0; }
  .home-page .topic-banner .t2 { font-size: 10px; letter-spacing: 0; }
  .home-page .video-tile .info { padding: 12px; }
  .home-page .video-tile .t { font-size: 14px; }
  .home-page .friend-links { padding-block: 28px 32px; }
  .home-page .friend-links h2 { font-size: 21px; margin-bottom: 16px; }
  .home-page .friend-links ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-page .friend-links li > :is(a, span) { min-height: 64px; padding: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .friend-links li { transition: none; }
}
