/* News Centre 页:导语、文章卡片墙、活动地图、订阅表单。
   卡片墙由 tools/sync.js 按 site.json 的 posts 生成。 */

/* ---------- 导语 ---------- */
.press-intro { padding-block: 110px; }

.press-intro__grid {
  display: grid;
  grid-template-columns: 400px 542px;
  justify-content: space-between;
  align-items: center;
}
.press-intro__title { font-size: clamp(28px, calc(2.64 * var(--vw)), 38px); line-height: 1.2; font-weight: 700; }
.press-intro__grid p { margin-top: 29.6px; font-size: 15px; line-height: 21px; }
.press-intro__grid img { width: 100%; aspect-ratio: 542 / 380; object-fit: cover; }

/* ---------- 文章卡片墙(2026-09-16 改版):最新一篇大图横排,其余三列小卡片 ----------
   原来 8 张同样大的卡片两列排、每张带三行摘要,要滚四屏。现在只有置顶那篇带摘要,
   小卡片只留图、日期、标题;先露置顶 + 一排,其余由 js/site.js 收起来、点 Show all 展开(同 Events 页「所有场次」)。
   卡片由 tools/sync.js 生成:posts 第一条用 partials/post-feature.html,其余用 post-card.html。
   2026-09-16 加了搜索和「小卡片点开看摘要」:摘要 + Read more 收在 .news-card__detail 里,js/site.js 接管后才收起来;
   搜索时置顶大卡退场,换成它的小卡片版(.news-card--mirror,平时藏着),结果一律是小卡片。 */
.news { background: var(--mist); padding-block: 90px 80px; }
.news__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.news__title { font-size: clamp(28px, calc(2.64 * var(--vw)), 38px); line-height: 1.2; font-weight: 700; }

/* 搜索框:js/site.js 接管后才去掉 hidden(不跑脚本时搜不了,就不摆一个没用的框)。
   描边用 --rule:浅灰底上也有 3:1,--line-soft 在这里几乎看不见 */
.news-search { position: relative; flex: 0 1 360px; }
.news-search__input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 44px 0 46px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px; /* 小于 16px 时 iPhone 一点进去就整页放大 */
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
}
.news-search__input::placeholder { color: var(--map-muted); opacity: 1; }
/* Safari / Chrome 自带的放大镜和清除叉号关掉,用自己那一套,两边长得一样 */
.news-search__input::-webkit-search-decoration,
.news-search__input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.news-search__input:focus { outline: none; border-color: var(--map-ink); box-shadow: 0 0 0 1px var(--map-ink); }
.news-search__icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  color: var(--map-muted);
  pointer-events: none;
}
.news-search__clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--map-muted);
  cursor: pointer;
}
.news-search__clear svg { display: block; width: 20px; height: 20px; }
.news-search__clear:focus-visible { outline: 2px solid var(--map-ink); outline-offset: -4px; }

/* 搜索结果条数(读屏会念出来);没在搜的时候是空的,不占高度 */
.news-status { font-size: 16px; line-height: 24px; color: var(--map-muted); }
.news-status:not(:empty) { margin-top: 28px; }
.news-status strong { font-weight: 700; color: var(--ink); }
/* 搜不到时给几个能搜出东西的词 */
.news-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.news-suggest[hidden] { display: none; }
.news-suggest__label { margin-right: 4px; color: var(--map-muted); }
.news-suggest__term {
  padding: 9px 16px;
  border: 1px solid var(--line-soft);
  background: var(--paper);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
}
.news-suggest__term:focus-visible { outline: 2px solid var(--map-ink); outline-offset: 2px; }

.news__grid {
  list-style: none;
  padding: 0;
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  /* 点开一张只长高这一张,同一排的别的卡片不跟着拉伸出一截空白;没点开时靠标题留两行高度排齐 */
  align-items: start;
}
.news-status:not(:empty) ~ .news__grid { margin-top: 24px; }
/* 平时:置顶大卡在、它的小卡片版藏着;搜索时反过来 */
.news__grid:not(.is-searching) .news-card--mirror,
.news__grid.is-searching .news-card--feature { display: none; }

/* 「先露一排」靠 hidden 属性,下面这条 display:flex 会把它顶掉(同 events.css 的 .edition[hidden]) */
.news-card[hidden] { display: none; }
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.news-card__media { overflow: hidden; }
/* 3:2 比 Recent Posts 的 291:163 裁得少:卡片图是按那个更窄的比例挑过安全区的,这里只会更安全 */
.news-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.6s var(--ease-float); }
.news-card__body { display: flex; flex-direction: column; align-items: start; padding: 20px 22px 26px; }
.news-card__date { font-size: 14px; line-height: 20px; color: var(--map-muted); }
.news-card__title { margin-top: 8px; font-size: 18px; line-height: 1.4; font-weight: 700; }
.news-card__title a { text-decoration: none; }
/* 整张卡片都能点:标题链接铺满卡片,一张卡片只占一个 Tab 位 */
.news-card__title a::after { content: ""; position: absolute; inset: 0; }

/* ---------- 小卡片:点一下展开摘要 + Read more ----------
   不跑脚本时摘要一直摊开、标题仍是链接。跑脚本后 js/site.js 把标题链接换成按钮(.news-card__toggle),
   按钮的 ::after 铺满卡片 → 点卡片哪里都是展开/收起;摘要区叠在它上面,点 Read more 才进文章。
   小卡片的 body 后面跟着摘要区(:not(:last-child)),置顶大卡的 body 是最后一个,不受影响。 */
.news-card__body:not(:last-child) { padding-bottom: 0; }
.news-card__body:not(:last-child) .news-card__title { min-height: 2.8em; } /* 两行高:一行和两行的标题,卡片照样一样高 */
.news-card__meta { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-card__icon { display: none; }
.js-news .news-card__icon {
  display: block;
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
/* 加号:两根短横,竖的那根转平就是减号 */
.js-news .news-card__icon::before,
.js-news .news-card__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  margin: -1px 0 0 -5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-float);
}
.js-news .news-card__icon::after { transform: rotate(90deg); }
.js-news .news-card.is-open .news-card__icon { border-color: var(--ink); }
.js-news .news-card.is-open .news-card__icon::after { transform: rotate(0deg); }

.news-card__toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.news-card__toggle::after { content: ""; position: absolute; inset: 0; }
.news-card__toggle:focus { outline: none; }
.news-card__toggle:focus-visible::after { outline: 2px solid var(--map-ink); outline-offset: 3px; }

/* 摘要区。高度动画靠 grid 的 0fr ↔ 1fr(能从 0 过渡到「内容多高就多高」);
   底部留白放在外层 padding 上 —— 放在里层会被当成最小高度,收起时漏出一截摘要。
   收起后 visibility:hidden,读屏和 Tab 都跳过里面的链接;展开时立刻可见,收起时等动画走完再藏 */
.news-card__detail { position: relative; z-index: 1; display: grid; grid-template-rows: 1fr; padding-bottom: 26px; }
.news-card__detail-in { min-height: 0; overflow: hidden; padding-inline: 22px; }
.news-card__detail .news-card__excerpt { margin-top: 12px; -webkit-line-clamp: 5; }
.news-card__detail .news-card__more { display: inline-block; margin: 14px 0 6px; }
.news-card__more:focus-visible { outline: 2px solid var(--map-ink); outline-offset: 2px; }
/* 合作伙伴署名(site.json posts[].partner,公共样子在 components.css):摘要下面、Read more 上面 */
.news-card__partner { margin: 16px 0 4px; }
.news-card__partner .partner__label { font-size: 14px; line-height: 20px; color: var(--map-muted); }
.news-card__partner .partner__logo { margin-top: 8px; }
.news-card__partner .partner__logo img { width: 180px; }
.js-news .news-card__detail { grid-template-rows: 0fr; visibility: hidden; }
.js-news .news-card.is-open .news-card__detail { grid-template-rows: 1fr; visibility: visible; }
/* 过渡等「收起」先算完才打开(js/site.js 随后加 news-anim),否则页面一加载就会播一遍摘要收起来的动画 */
.news-anim .news-card__detail { transition: grid-template-rows 0.35s var(--ease-float), visibility 0s linear 0.35s; }
.news-anim .news-card.is-open .news-card__detail { transition-delay: 0s; }

/* 搜索时每张结果卡片底下两行:命中在正文里就截命中那一段,只命中标题/日期就放文章开头 */
.news-card__hit {
  margin-top: 8px;
  min-height: 44px;
  font-size: 15px;
  line-height: 22px;
  color: var(--map-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-card__hit[hidden] { display: none; }
.news-card.is-open .news-card__hit.is-lead { display: none; } /* 展开后摘要本来就从开头讲起,不重复 */
.news-card mark { padding: 0 1px; background: rgb(var(--map-glow) / 0.24); color: inherit; }

/* 置顶那篇:左图右文,占满一行。图按 4:3 撑出行高,文字多了图跟着拉高(height:100% 在算行高时当 auto)。
   别给图片容器写 aspect-ratio + 里面绝对定位:容器被行高拉伸时 WebKit 会按比例反推宽度,左栏空出一截(2026-09-16 实测) */
.news-card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.news-card--feature .news-card__media img { height: 100%; aspect-ratio: 4 / 3; }
.news-card--feature .news-card__body { justify-content: center; padding: 40px 40px 44px; }
.news-card--feature .news-card__title { margin-top: 10px; font-size: 28px; line-height: 1.3; }
.news-card__excerpt {
  margin-top: 14px;
  font-size: 16px;
  line-height: 24px;
  color: var(--map-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
/* 样子同 Events 页的「Read the … recap →」 */
.news-card__more {
  margin-top: 22px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.news-card__more::after { content: "\2192"; content: "\2192" / ""; display: inline-block; margin-left: 6px; transition: transform 0.2s; }

/* 同 events.css 的 .editions__more */
.news__more {
  margin-top: 32px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.3;
}
@media (hover: hover) {
  .news-card:hover .news-card__title a,
  .news-card:hover .news-card__toggle { color: var(--accent); }
  .news-card:hover .news-card__media img { transform: scale(1.04); }
  .news-card--feature:hover .news-card__more::after,
  .news-card__detail .news-card__more:hover::after { transform: translateX(3px); }
  .js-news .news-card:hover .news-card__icon { border-color: var(--ink); background: var(--ink); color: var(--paper); }
  .news__more:hover { background: var(--ink); color: var(--paper); }
  .news-search__clear:hover { color: var(--ink); }
  .news-suggest__term:hover { border-color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .news-anim .news-card__detail,
  .js-news .news-card__icon::before,
  .js-news .news-card__icon::after { transition: none; }
}

/* ---------- 订阅表单 ---------- */
.loop { padding-block: 100px 102px; }

.loop__grid {
  display: grid;
  grid-template-columns: 307px 605px;
  justify-content: space-between;
  align-items: start;
}
.loop__title { font-size: clamp(28px, calc(2.64 * var(--vw)), 38px); line-height: 1.2; font-weight: 700; }
.loop__intro p { font-size: 15px; line-height: 24px; }
.loop__title + p { margin-top: 30.4px; }
.loop__intro p + p { margin-top: 24px; }

.loop-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 18px;
  padding: 30px 40px;
  background: var(--mist);
  font-family: var(--font-number);
}
.field { display: block; }
.field--wide { grid-column: 1 / -1; }
.field span { display: block; font-size: 16px; line-height: 20px; }
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  height: 45px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  resize: none;
}
.field textarea { padding-top: 12px; }
.field select { appearance: none; padding-right: 24px; cursor: pointer; }
.loop-form .role-pick select, .loop-form .role-group select { background-position: calc(100% - 9px) 50%, calc(100% - 4px) 50%; }
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }

/* 订阅同意说明:紧贴在提交按钮上面(--map-muted 在 --mist 底上 8.1:1) */
.loop-form__consent { grid-column: 1 / -1; margin: -8px 0 -12px; font-size: 14px; line-height: 21px; color: var(--map-muted); }
.loop-form__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.loop-form__consent a:hover { color: var(--ink); }

.loop-form__submit {
  grid-column: 1 / -1;
  height: 43px;
  border: 1px solid var(--ink);
  background: transparent;
  font: 16px/19.2px Helvetica, Arial, sans-serif;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.loop-form__submit:hover { background: var(--ink); color: var(--paper); }
.loop-form__submit[disabled] { opacity: 0.55; cursor: progress; }
/* 提交结果(js/site.js 填);hidden 会被 display 规则顶掉,单写一条 */
.loop-form__status[hidden] { display: none; }
.loop-form__status { grid-column: 1 / -1; margin-top: -12px; font-size: 16px; line-height: 24px; color: var(--map-ink); }
.loop-form__status.is-error { color: var(--danger); }
.loop-form__status:focus { outline: none; }

.loop__note { max-width: 958px; margin: 69px auto 0; text-align: center; font-size: 16px; line-height: 25.6px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 767px) {
  .press-intro { padding-block: 72px; }
  .press-intro__grid,
  .loop__grid { grid-template-columns: 1fr; row-gap: 40px; }
  /* 文章墙:置顶那篇图在上字在下;其余变成一行一条(左缩略图、右日期标题) */
  .news { padding-block: 72px 56px; }
  .news__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .news-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
  .news-card__media { position: relative; }
  .news-card__media img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .news-card__body { justify-content: center; min-height: 92px; padding: 12px 16px; }
  .news-card__title { margin-top: 4px; font-size: 16px; line-height: 1.35; }
  .news-card--feature { grid-template-columns: minmax(0, 1fr); }
  .news-card--feature .news-card__media img { position: static; height: auto; }
  .news-card--feature .news-card__body { padding: 22px 20px 26px; }
  .news-card--feature .news-card__title { font-size: 22px; }
  .news-card__excerpt { -webkit-line-clamp: 3; }
  .news__more { margin-top: 24px; }
  /* 搜索框换到标题下面、占满一行;小卡片点开后摘要接在缩略图那一行下面、占满整宽 */
  .news-search { flex-basis: 100%; }
  .news-status:not(:empty) { margin-top: 20px; }
  .news-status:not(:empty) ~ .news__grid { margin-top: 16px; }
  .news-card__body:not(:last-child) { padding-bottom: 12px; }
  .news-card__body:not(:last-child) .news-card__title { min-height: 0; }
  .js-news .news-card__icon { width: 24px; height: 24px; }
  /* 小卡片一行放不下「日期 + 展开按钮」(日期会被挤成两行):展开按钮放右边竖着居中 */
  .news-card:not(.news-card--feature) .news-card__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .news-card:not(.news-card--feature) .news-card__icon { grid-column: 2; grid-row: 1; align-self: center; }
  .news-card__detail { grid-column: 1 / -1; padding-bottom: 0; }
  .news-card__detail-in { padding-inline: 16px; }
  .news-card__detail .news-card__excerpt { margin-top: 12px; -webkit-line-clamp: 4; }
  .news-card__detail .news-card__more { margin-bottom: 16px; }
  .news-card__hit { min-height: 0; font-size: 14px; line-height: 20px; }
  .loop { padding-block: 72px; }
}

@media (max-width: 640px) {
  .loop-form { grid-template-columns: 1fr; padding: 24px; }
}
