:root {
  --portal-blue: #0066b3;
  --portal-slate: #475569;
}

.portal-main {
  min-height: 45vh;
}

.portal-empty {
  background: #f1f6fa;
  border-radius: 8px;
  color: var(--portal-slate);
  margin: 24px auto 64px;
  max-width: 1200px;
  padding: 32px;
  text-align: center;
}

.portal-institution-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 0 auto 64px;
  max-width: 1200px;
  padding: 0 24px;
}

.portal-institution-card {
  background: #fff;
  border: 1px solid #dbe7f1;
  border-radius: 8px;
  box-shadow: 0 7px 20px rgba(9, 68, 117, .08);
  padding: 24px;
}

.portal-institution-card h2 {
  font-size: 22px;
  line-height: 1.55;
  margin: 8px 0;
}

.portal-institution-card h2 a {
  color: #153d67;
  text-decoration: none;
}

.portal-institution-card p {
  color: var(--portal-slate);
  line-height: 1.75;
}

.portal-institution-card dt {
  color: #74869a;
  font-size: 14px;
}

.portal-institution-card dl {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.portal-institution-card dd {
  color: #243b53;
  margin: 2px 0 0;
}

.portal-search-form {
  display: flex;
  gap: 8px;
  margin: 16px auto 32px;
  max-width: 720px;
  padding: 0 24px;
}

.portal-search-form input {
  border: 1px solid #b8cadd;
  border-radius: 5px;
  flex: 1;
  font: inherit;
  padding: 12px;
}

.portal-search-form button {
  background: var(--portal-blue);
  border: 0;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  padding: 12px 22px;
}

.portal-node {
  margin: 0 auto 64px;
  max-width: 900px;
  padding: 48px 24px;
}

.portal-node header {
  border-bottom: 1px solid #dbe7f1;
  margin-bottom: 28px;
  padding-bottom: 20px;
}

.portal-node h1 {
  color: #123c68;
  line-height: 1.4;
  margin: 0 0 12px;
}

.portal-node .field--name-body {
  color: #243b53;
  font-size: 17px;
  line-height: 2;
}

.portal-node .field--name-field-summary {
  color: #56718e;
  line-height: 1.8;
}

/* Site search */
.search-page {
  min-height: 48vh;
  padding: 48px 0 84px;
  background: linear-gradient(180deg, #f5faff 0, #fff 320px);
}

.search-page-hero {
  padding: 38px 46px 34px;
  border: 1px solid #d9e8f4;
  border-top: 4px solid #0a68b6;
  background: #fff;
  box-shadow: 0 12px 32px rgba(21, 85, 135, .08);
}

.search-page-kicker {
  display: block;
  color: #1f78bb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
}

.search-page-hero h1 {
  margin: 8px 0 8px;
  color: #163a5a;
  font-size: 32px;
  line-height: 1.35;
}

.search-page-hero > p {
  margin: 0;
  color: #6a8195;
  font-size: 15px;
  line-height: 1.7;
}

.search-page .portal-search-form {
  max-width: 760px;
  margin: 26px 0 0;
  padding: 0;
}

.search-page .portal-search-form input {
  min-width: 0;
  padding: 13px 16px;
  color: #274d6b;
  border-color: #b8d2e7;
  border-radius: 0;
  background: #fbfdff;
}

.search-page .portal-search-form input:focus {
  border-color: #167ac4;
  outline: 3px solid rgba(22, 122, 196, .14);
  outline-offset: 0;
}

.search-page .portal-search-form button {
  min-width: 92px;
  padding: 13px 22px;
  border-radius: 0;
  background: linear-gradient(135deg, #0758ad, #2384c9);
  font-weight: 700;
}

.search-page .portal-search-form button:hover,
.search-page .portal-search-form button:focus-visible {
  background: #0758ad;
}

.search-results {
  margin-top: 38px;
}

.search-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #1776bd;
}

.search-results-heading h2 {
  margin: 0;
  color: #163a5a;
  font-size: 24px;
  line-height: 1.4;
}

.search-results-heading p {
  margin: 0;
  color: #7190a8;
  font-size: 14px;
}

.portal-article-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.portal-article-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 30px;
  gap: 24px;
  align-items: center;
  padding: 21px 24px;
  border: 1px solid #dce9f2;
  border-left: 4px solid #a8cbe5;
  background: #fff;
  box-shadow: 0 5px 16px rgba(32, 86, 127, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.portal-article-card:hover {
  border-left-color: #167ac4;
  box-shadow: 0 10px 24px rgba(20, 89, 142, .11);
  transform: translateY(-2px);
}

.portal-article-card time {
  color: #39739b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.portal-article-card-copy {
  min-width: 0;
}

.portal-article-card h3 {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-article-card h3 a {
  color: #173d5d;
  text-decoration: none;
}

.portal-article-card h3 a:hover,
.portal-article-card h3 a:focus-visible {
  color: #096fc0;
}

.portal-article-card p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: #6e8497;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.portal-article-card-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #287bb5;
  text-decoration: none;
}

.portal-article-card-more span {
  font-size: 22px;
  line-height: 1;
  transition: transform .18s ease;
}

.portal-article-card:hover .portal-article-card-more span,
.portal-article-card-more:focus-visible span {
  transform: translateX(4px);
}

.search-page .portal-empty,
.search-page-initial {
  margin: 34px 0 0;
  padding: 30px;
  color: #6e8497;
  border: 1px solid #dce9f2;
  border-radius: 0;
  background: #fff;
  text-align: center;
}

@media (max-width: 700px) {
  .search-page { padding: 28px 0 50px; }
  .search-page-hero { padding: 28px 20px 24px; }
  .search-page-hero h1 { font-size: 27px; }
  .search-page .portal-search-form { gap: 10px; }
  .search-page .portal-search-form button { min-width: 76px; padding-inline: 16px; }
  .search-results-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .portal-article-card { grid-template-columns: 1fr 24px; gap: 8px 14px; padding: 18px; }
  .portal-article-card time { grid-column: 1 / -1; font-size: 13px; }
  .portal-article-card h3 { font-size: 17px; }
  .portal-article-card p { font-size: 13px; }
}

/* ---- Drupal 核心工具类（原站由 core 的 hidden.module.css 提供，新站单独引入）----
   .visually-hidden 仅对屏幕阅读器可见；.focusable 让"跳转到主要内容"链接
   只在键盘 Tab 聚焦时出现。缺了这组规则跳转链接会常显在页面左上角。 */
.hidden { display: none; }
.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus-within {
  position: static !important;
  overflow: visible;
  clip: auto;
  width: auto;
  height: auto;
}
.invisible { visibility: hidden; }
