/* ==========================================================================
   武科大资源汇总站 — 首页与占位页共用样式
   纯 CSS，零依赖 / 零外链资源 / 零 CDN。
   配色与 calendar/style.css 同色系（主色 #1a4fbf），但本文件独立自持，
   不依赖也不影响日历页的样式表。
   ========================================================================== */

:root {
  /* 品牌主色系（与日历页一致） */
  --accent: #1a4fbf;
  --accent-dark: #12306e;
  --accent-light: #2a6fd6;
  --accent-soft: #eaf0fd;
  --accent-soft-2: #f4f7fe;

  /* 分类色（与日历页的类别档位同源，用于卡片点缀） */
  --a1: #d93025;
  --a2: #e8710a;
  --b1: #1a73e8;
  --b2: #188038;

  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --line: #e3e7ef;
  --line-strong: #cfd6e4;
  --text: #1f2430;
  --text-2: #5b6472;
  --text-3: #8b94a3;

  --warn: #b06000;
  --warn-bg: #fff5e0;
  --warn-line: #f0d49a;

  --shadow-sm: 0 1px 2px rgba(24, 33, 51, .06), 0 1px 1px rgba(24, 33, 51, .04);
  --shadow-md: 0 6px 20px rgba(24, 33, 51, .10);
  --shadow-lg: 0 14px 34px rgba(24, 33, 51, .14);

  --radius: 12px;
  --radius-sm: 7px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }

/* ---------- 顶栏（品牌 + 实时统计） --------------------------------------- */

.hub-top {
  background: linear-gradient(120deg, #12306e 0%, #1a4fbf 55%, #2a6fd6 100%);
  color: #fff;
  padding: 22px 18px 20px;
}

.hub-top-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hub-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  text-align: center;
  line-height: 1.1;
}

.hub-brand h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .3px;
}

.hub-brand .hub-sub {
  margin-top: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
}

/* 实时统计数据行（读不到数据时整行隐藏） */
.hub-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .26);
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
}

.hub-stats .dot-sep { opacity: .55; }
.hub-stats b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hub-stats .st-k { color: rgba(255, 255, 255, .80); }

.hub-stats .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ff0b0;
  box-shadow: 0 0 0 0 rgba(127, 240, 176, .7);
  animation: hub-pulse 2.4s ease-out infinite;
}

@keyframes hub-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127, 240, 176, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(127, 240, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 240, 176, 0); }
}

/* ---------- 主体容器 ------------------------------------------------------ */

.hub-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 18px 8px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 4px 0 16px;
}

.section-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.section-head .section-hint {
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- 模块卡片区 ---------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  outline: none;
}

.card:focus-visible { box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft); }

/* 卡片顶部色条：可用模块用主色，建设中模块用灰 */
.card-strip {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 16px 17px 17px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg { width: 22px; height: 22px; display: block; }

.card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12.5px;
  color: var(--text-3);
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.card-meta b {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.card-meta .chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}

/* 进入按钮（视觉上是按钮，语义上仍是整卡链接的一部分） */
.card-enter {
  align-self: flex-start;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.card:hover .card-enter { background: var(--accent-dark); }

/* ---------- 状态徽章 ------------------------------------------------------ */

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3px;
  border: 1px solid transparent;
}

.badge-live {
  background: #e7f6ec;
  color: #14682f;
  border-color: #bfe3cb;
}

.badge-soon {
  background: #eef0f4;
  color: #5f6875;
  border-color: #d8dde6;
}

.badge-soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a1ae;
}

/* ---------- 建设中卡片：降低饱和度，但仍然可点 ---------------------------- */

.card.is-soon .card-strip {
  background: linear-gradient(90deg, #9aa3b2, #c2c8d2);
}

.card.is-soon .card-icon {
  background: #f0f2f5;
  color: #8b94a3;
  filter: grayscale(1);
}

.card.is-soon .card-title { color: #414a58; }

.card.is-soon .card-desc { color: var(--text-3); }

.card.is-soon .card-enter {
  background: #f2f4f7;
  color: #5f6875;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.card.is-soon:hover .card-enter { background: #e8ebf0; }

.card.is-soon:hover { border-color: var(--line-strong); }

/* ---------- 页脚 ---------------------------------------------------------- */

.hub-foot {
  max-width: 1080px;
  margin: 26px auto 0;
  padding: 16px 18px 30px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
  justify-content: space-between;
}

.hub-foot .foot-note { max-width: 62ch; }

.hub-foot .foot-build {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hub-foot code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}

/* ==========================================================================
   占位页（policy / qq）共用部分
   ========================================================================== */

.ph-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 26px 18px 10px;
}

.ph-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.ph-back:hover { background: var(--accent-soft); border-color: var(--line-strong); }

.ph-hero {
  margin: 18px 0 18px;
}

.ph-hero .ph-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

.ph-hero h2 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .3px;
}

.ph-hero .ph-lead {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 60ch;
}

/* 醒目的「建设中 / 即将上线」状态块 */
.ph-status {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  margin: 0 0 20px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-left: 5px solid #e8a33d;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ph-status .ph-status-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--warn-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.ph-status h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--warn);
}

.ph-status p {
  margin-top: 4px;
  font-size: 13.5px;
  color: #7a5a1e;
}

.ph-status .ph-status-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--warn-line);
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 700;
  vertical-align: middle;
}

.ph-status .ph-status-flag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8a33d;
  animation: hub-pulse 2.4s ease-out infinite;
}

/* 内容计划清单 */
.ph-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 17px 18px 18px;
  margin-bottom: 16px;
}

.ph-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ph-card .ph-card-hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.ph-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.ph-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-2);
}

.ph-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}

.ph-list li b { color: var(--text); }

.ph-note {
  font-size: 12.5px;
  color: var(--text-3);
  border-left: 3px solid var(--line-strong);
  padding-left: 10px;
  margin-top: 12px;
}

.ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 10px;
}

.ph-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 17px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.ph-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.ph-btn-primary:hover { background: var(--accent-dark); }

.ph-btn-ghost {
  background: var(--panel);
  color: var(--text-2);
  border-color: var(--line-strong);
}

.ph-btn-ghost:hover { background: var(--panel-2); color: var(--text); }

/* ---------- 响应式 -------------------------------------------------------- */

@media (max-width: 720px) {
  .hub-top { padding: 18px 14px 16px; }
  .hub-brand h1 { font-size: 19px; }
  .hub-logo { width: 46px; height: 46px; font-size: 13px; }
  .hub-stats { white-space: normal; }
  .hub-wrap { padding: 20px 14px 6px; }
  .hub-foot { padding: 14px 14px 26px; }
  .ph-main { padding: 20px 14px 8px; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .hub-top-inner { align-items: flex-start; }
  .hub-stats { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .hub-stats .pulse,
  .ph-status .ph-status-flag::before { animation: none; }
}

/* ==========================================================================
   首页：未上线板块提示条（不可点，仅说明还有哪些板块在完善中）
   ========================================================================== */

.hub-notice {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 11px 15px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  color: var(--text-2);
  font-size: 13px;
}

.hub-notice .hn-icon { flex: none; font-size: 15px; }

.hub-notice .hn-tag {
  flex: none;
  padding: 1px 9px;
  border-radius: 999px;
  background: #eef0f4;
  color: #5f6875;
  border: 1px solid #d8dde6;
  font-size: 11.5px;
  font-weight: 700;
}

.hub-notice b { color: var(--text); }

.hub-notice .hn-hint {
  color: var(--text-3);
  font-size: 12.5px;
  flex: 1 1 260px;
  min-width: 0;
}

.hub-notice .hn-list {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 12.5px;
  color: var(--text-3);
}

.hub-notice .hn-list span {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

/* ==========================================================================
   已封存板块（history / policy / qq）：「该板块暂未开放」统一状态块
   三个页面共用同一套结构与样式，保证直接访问时的呈现完全一致。
   ========================================================================== */

.sealed {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  margin: 0 0 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid #9aa3b2;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.sealed .sealed-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f0f2f5;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.sealed .sealed-body { min-width: 0; }

.sealed h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.sealed .sealed-flag {
  padding: 1px 9px;
  border-radius: 999px;
  background: #eef0f4;
  border: 1px solid #d8dde6;
  color: #5f6875;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
}

.sealed .sealed-lead {
  margin-top: 7px;
  max-width: 64ch;
  font-size: 14.5px;
  color: var(--text-2);
}

.sealed .sealed-note {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--text-3);
}

.sealed .sealed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.sealed .sealed-list { margin-top: 4px; }

.sealed .sealed-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 17px 18px 18px;
  margin-bottom: 16px;
}

.sealed .sealed-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}

.sealed .sealed-card .sealed-card-hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .sealed { flex-direction: column; gap: 12px; padding: 16px; }
  .hub-notice { font-size: 12.5px; }
}
