/* ============================================================
   pages.css —— 页面级组件（第二阶段新增）
   筛选器 / 时间线行卡 / 日历网格 / 岗位卡 / 详情面板 / 官方来源卡
   保持：浅灰底 白卡片 紫主色 状态4色 大圆角 移动端优先
   ============================================================ */

/* ---------------- 页面头部 ---------------- */
.page-head { padding-top: 20px; }
@media (min-width: 900px) { .page-head { padding-top: var(--sp-8); } }

.page-head__title {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3;
}
@media (min-width: 900px) { .page-head__title { font-size: 28px; } }

.page-head__desc { margin-top: 8px; font-size: 13px; color: var(--text-3); line-height: 1.7; }

.crumb {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 12px; padding: 6px 12px 6px 8px;
  font-size: 13px; color: var(--text-2);
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.crumb:hover { color: var(--brand-600); border-color: var(--brand-200); }

/* ---------------- 筛选条 ---------------- */
.filter {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .filter { flex-wrap: wrap; overflow: visible; } }

.filter--col { flex-direction: column; align-items: stretch; overflow: visible; }
@media (min-width: 900px) { .filter--col { flex-direction: row; align-items: center; } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-4); }

.sel, .inp {
  height: 38px;
  padding: 0 12px;
  min-width: 108px;
  font-size: 13px;
  color: var(--text-1);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.sel {
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398A0AE' stroke-width='2.5' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.inp { min-width: 200px; flex: 1; }

.sel:focus, .inp:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 3px rgba(108,92,231,.10);
}

.spacer { flex: 1; }

.btn-reset { height: 38px; padding: 0 14px; font-size: 13px; color: var(--text-3); }

/* ---------------- 视图切换 ---------------- */
.seg {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: var(--bg-subtle);
  border-radius: var(--r-pill);
}
.seg__i {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-pill);
  transition: all var(--dur) var(--ease);
}
.seg__i.is-active { color: var(--brand-600); background: var(--bg-surface); box-shadow: var(--sh-1); }

/* ---------------- 结果统计 ---------------- */
.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-4) 0 var(--sp-3);
  font-size: 13px; color: var(--text-3);
}
.result-bar b { color: var(--text-1); font-family: var(--font-num); font-weight: 700; }

/* ---------------- 时间线行卡（考试 / 通用） ---------------- */
.timeline { display: flex; flex-direction: column; gap: var(--sp-3); }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.row--link { cursor: pointer; }
.row--link:hover { box-shadow: var(--sh-2); border-color: var(--line-strong); transform: translateY(-2px); }

.row::before {
  content: "";
  position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--tone, var(--st-finished-dot));
}
.row--open     { --tone: var(--st-open-dot); }
.row--upcoming { --tone: var(--st-upcoming-dot); }
.row--waiting  { --tone: var(--st-waiting-dot); }
.row--finished { --tone: var(--st-finished-dot); opacity: .82; }

.row__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  padding: 10px 4px;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.row__month { font-size: 11px; font-weight: 700; color: var(--tone); }
.row__day { font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--text-1); }
.row__weekday { font-size: 11px; color: var(--text-3); }

.row__body { min-width: 0; }

.row__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-2);
}
.row__title {
  font-size: 15px; font-weight: 700; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.row__loc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }

.row__side {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

@media (min-width: 900px) {
  .row { grid-template-columns: 72px 1fr 132px; }
  .row__side {
    grid-column: 3; grid-row: 1;
    flex-direction: column; align-items: stretch; justify-content: center;
    gap: 10px;
    padding-top: 0; border-top: 0;
    border-left: 1px dashed var(--line);
    padding-left: 16px;
    text-align: center;
  }
}

/* 倒计时小片 */
.cd-chip { text-align: center; }
.cd-chip b {
  display: block;
  font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.03em;
  color: var(--brand-600);
}
.cd-chip span { font-size: 11px; color: var(--text-3); }
.cd-chip--over b { font-size: 17px; color: var(--text-3); }
.cd-chip--tbd b { font-size: 17px; color: var(--text-3); }

/* ---------------- 事实表（dt/dd） ---------------- */
.fact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 12px 0 0;
}
.fact--tight { gap: 8px 12px; margin-top: 10px; }

.fact__i { min-width: 0; }
.fact__i dt { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.fact__i dd {
  margin: 0; font-size: 13px; font-weight: 600; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis;
}

@media (min-width: 900px) {
  .fact { display: flex; flex-wrap: wrap; gap: 8px var(--sp-6); }
  .fact__i { display: flex; align-items: baseline; gap: 6px; }
  .fact__i dt { margin-bottom: 0; white-space: nowrap; }
  .fact__i dd { white-space: nowrap; }
}

/* ---------------- 日历网格 ---------------- */
.cal-wrap {
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.cal-head__title { font-size: 15px; font-weight: 700; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
@media (min-width: 900px) { .cal-grid { gap: 8px; } }

.cal-w { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-4); padding-bottom: 4px; }

.cal-d {
  min-height: 62px;
  padding: 5px;
  background: var(--bg-inset);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  transition: all var(--dur) var(--ease);
}
@media (min-width: 900px) { .cal-d { min-height: 88px; padding: 8px; border-radius: var(--r-sm); } }

.cal-d--empty { background: transparent; }
.cal-d--today { border-color: var(--brand-300); background: var(--brand-50); }

.cal-d__n { font-size: 11px; font-weight: 700; color: var(--text-3); font-family: var(--font-num); }
.cal-d--today .cal-d__n { color: var(--brand-600); }

.cal-ev {
  font-size: 10px; line-height: 1.35;
  padding: 3px 5px;
  border-radius: 5px;
  color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.cal-ev--open     { background: var(--st-open-dot); }
.cal-ev--upcoming { background: var(--st-upcoming-dot); }
.cal-ev--waiting  { background: var(--st-waiting-dot); }
.cal-ev--finished { background: var(--st-finished-dot); }

@media (min-width: 900px) { .cal-ev { font-size: 11px; white-space: normal; } }

.cal-more { font-size: 10px; color: var(--text-3); padding-left: 4px; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }

/* ---------------- 岗位卡 ---------------- */
.job-grid { display: grid; gap: var(--sp-3); }
@media (min-width: 900px) { .job-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); } }

.job { padding: var(--sp-4); display: flex; flex-direction: column; gap: 12px; }
.job--link { cursor: pointer; }

.job__unit { font-size: 12px; font-weight: 600; color: var(--brand-600); }
.job__name { font-size: 16px; font-weight: 700; line-height: 1.45; margin-top: 4px; }
.job__code { font-size: 11px; color: var(--text-4); font-family: var(--font-num); margin-top: 3px; }
.job__tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); flex-wrap: wrap;
  padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--text-3);
}
.job__foot b { color: var(--text-1); }
.job__more { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-600); font-weight: 600; }

/* ---------------- NEW 徽章 ---------------- */
.badge--new {
  color: #fff;
  background: var(--grad-brand);
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 7px;
}

/* 公告时间戳 */
.anno__stamp { font-size: 11px; color: var(--text-4); white-space: nowrap; }

/* ---------------- 详情面板 ---------------- */
.panel {
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
@media (min-width: 900px) { .panel { padding: var(--sp-5); } }

.panel + .panel { margin-top: var(--sp-3); }

.panel__title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: 15px; font-weight: 700;
  padding-bottom: 12px;
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.panel__title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad-brand);
}

/* 详情页大标题 */
.detail-title { font-size: 20px; font-weight: 800; line-height: 1.45; letter-spacing: -.02em; }
@media (min-width: 900px) { .detail-title { font-size: 25px; } }

.detail-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 键值对 */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-4); }
@media (min-width: 900px) { .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.kv__i { min-width: 0; }
.kv__k { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.kv__v { font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.6; word-break: break-word; }
.kv__v--muted { color: var(--text-3); font-weight: 500; }
.kv--full { grid-column: 1 / -1; }

/* ---------------- 官方来源卡 ---------------- */
.source {
  padding: var(--sp-4);
  background: var(--grad-brand-soft);
  border: 1px solid var(--brand-200);
  border-radius: var(--r-lg);
}
.source__name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text-1);
}
.source__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }

/* ---------------- 更新提示条 ---------------- */
.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--st-upcoming-bg);
  border: 1px solid rgba(224,138,0,.22);
  border-radius: var(--r-md);
  font-size: 13px; line-height: 1.6;
  color: var(--st-upcoming-fg);
}
.notice b { font-weight: 700; }

/* 变更记录 */
.changelog { display: flex; flex-direction: column; gap: 10px; }
.changelog__i {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.changelog__k { flex: none; font-weight: 700; color: var(--text-1); }
.changelog__v { color: var(--text-3); }
.changelog__v s { text-decoration-color: var(--text-4); }
.changelog__v b { color: var(--st-open-fg); font-weight: 700; }
.changelog__t { margin-left: auto; flex: none; font-size: 11px; color: var(--text-4); white-space: nowrap; }

/* ---------------- 省份页 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }

.stat { padding: var(--sp-4); background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.stat__k { font-size: 12px; color: var(--text-3); }
.stat__v { margin-top: 6px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--brand-600); }
@media (min-width: 900px) { .stat__v { font-size: 30px; } }

.subgrid { display: grid; gap: var(--sp-3); }
@media (min-width: 900px) { .subgrid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); } }

.notfound { text-align: center; padding: var(--sp-12) var(--sp-4); }

/* 占位链接按钮（官方链接未配置时） */
.btn--off { opacity: .5; cursor: not-allowed; }
.btn--off:active { transform: none; }

/* ---------------- 「今天截止」强提示（首页优化③） ---------------- */
.badge--today {
  color: #fff;
  background: var(--warn-fg);
  box-shadow: 0 2px 8px rgba(194,69,61,.28);
}

.remind--today {
  border-color: rgba(194,69,61,.32);
  background: linear-gradient(135deg, rgba(194,69,61,.045) 0%, rgba(239,68,68,.02) 100%);
}
.remind--today::before {
  opacity: .75;
  background: linear-gradient(135deg, #D2504A 0%, #E0706A 100%);
}
.remind--today .remind__bell { background: var(--warn-bg); color: var(--warn-fg); }

.remind--soon { border-color: rgba(224,138,0,.28); }
.remind--soon .remind__bell { background: var(--st-upcoming-bg); color: var(--st-upcoming-fg); }

.remind__flag {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px; min-height: 22px;
}

.st-today { color: var(--warn-fg) !important; }
.st-soon  { color: var(--st-upcoming-fg) !important; }

.pulse__flag { display: flex; gap: 6px; margin-bottom: 8px; }
