/* 保研资讯页专属样式。组件一律来自 ds.css；
   这里的 .fchip / .news-item / .ni-* / .pg 等类名是页面脚本与测试依赖的结构契约，只在此处定义新外观。 */

/* ---------- 免费规划微信条 ---------- */
.planning-banner { background: var(--gray-900); color: rgba(255,255,255,.82); }
.planning-banner-inner { display: flex; align-items: center; justify-content: center; min-height: 40px; max-width: calc(var(--container-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.planning-banner-message { font-size: var(--fs-footnote); text-align: center; }
.planning-banner-message strong { margin-left: 2px; color: #fff; font-weight: 700; letter-spacing: .02em; user-select: all; }

/* ---------- 标题区 ---------- */
.news-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); }
.news-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-10); align-items: end; }
.news-hero__text { display: grid; gap: var(--space-4); }
.news-hero__text .t-lead { max-width: 34em; }
.news-hero__aside { display: grid; gap: var(--space-2); padding: var(--space-6); }
.news-hero__aside h2 { font-size: var(--fs-headline); font-weight: 600; letter-spacing: 0; }
.news-hero__aside p { color: var(--text-2); font-size: var(--fs-footnote); }
.news-hero__aside .link-arrow { margin-top: var(--space-2); }

/* ---------- 布局：筛选在上，结果在下 ---------- */
.feed-layout { display: block; }
.notice-filter-rail { display: block; }

/* 筛选面板 */
.filter-panel { padding: var(--space-6) var(--space-8); border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: var(--shadow-1); }
.fp-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); margin-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.fp-title { font-size: var(--fs-headline); font-weight: 700; letter-spacing: 0; }
.active-count { flex: 1; color: var(--text-3); font-size: var(--fs-footnote); }
.active-count strong { color: var(--accent); }
.fp-more-toggle, .fp-reset { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); font-size: var(--fs-footnote); font-weight: 600; white-space: nowrap; transition: background var(--dur-1) var(--ease); }
.fp-more-toggle { background: var(--accent-soft); color: var(--accent); }
.fp-more-toggle:hover { background: var(--accent-soft-2); }
.fp-more-toggle[aria-expanded="true"] { background: var(--accent); color: #fff; }
.fp-reset { background: transparent; color: var(--text-2); }
.fp-reset:hover { background: var(--bg-inset); color: var(--text); }
.fp-quick { display: grid; }
.fp-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--space-4); align-items: start; padding: var(--space-3) 0; }
.fp-row + .fp-row { border-top: 1px dashed var(--line); }
.fp-row-label { padding-top: 7px; color: var(--text-3); font-size: var(--fs-footnote); font-weight: 600; letter-spacing: .08em; white-space: nowrap; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
.fchip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: var(--fs-footnote); font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.fchip:hover { background: var(--bg-inset); color: var(--text); }
.fchip.active { background: var(--text); color: #fff; font-weight: 600; }
.fp-advanced { padding-top: var(--space-4); margin-top: var(--space-2); border-top: 1px solid var(--line); }
.fp-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.fp-select { width: 100%; min-height: 44px; padding: 10px 38px 10px 14px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--bg-inset) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236E6E73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--text); font-size: 15px; appearance: none; }
.fp-select:focus { outline: none; background-color: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }

/* 结果区 */
.feed-main { display: block; margin-top: var(--space-8); }
.feed-controls { position: static; }
.feed-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.search-input-wrap { display: flex; align-items: center; gap: 10px; flex: 1 1 360px; min-height: 52px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-elevated); box-shadow: var(--shadow-2); transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
.search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus), var(--shadow-2); }
.search-input-wrap svg { flex: none; color: var(--text-3); }
.search-input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; font-size: 16px; }
.search-input::placeholder { color: var(--gray-500); }
.search-input:focus, .search-input:focus-visible { outline: none; }
.toolbar-count { color: var(--text-2); font-size: var(--fs-callout); white-space: nowrap; }
.toolbar-count strong { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.toolbar-today { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); font-size: var(--fs-footnote); font-weight: 600; white-space: nowrap; }
.toolbar-today strong { font-variant-numeric: tabular-nums; }
.toolbar-today[aria-pressed="true"] { background: var(--ok); color: #fff; }
.tt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(48,179,92,.2); }
.toolbar-today[aria-pressed="true"] .tt-dot { background: #fff; box-shadow: none; }

.result-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3); }
.result-range { color: var(--text-3); font-size: var(--fs-footnote); font-variant-numeric: tabular-nums; }
.result-navigation .pagination { padding: 0; }
#newsLoadStatus { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-5); border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: var(--fs-footnote); }

/* ---------- 通知卡片（结构由页面脚本生成） ---------- */
.news-list { border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: var(--shadow-1); overflow: hidden; }
.news-list:empty { display: none; }
.news-list > * + * { border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) 150px; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-6); transition: background var(--dur-1) var(--ease); }
.news-item:hover { background: var(--bg-subtle); }
.news-item:hover h3 { color: var(--accent); }
.news-list > [data-seo-card] { padding: var(--space-5) var(--space-6) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none; }

.ni-logo { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.ni-logo.tone-ink { background: #E8ECF6; color: var(--navy-800); }
.ni-logo.tone-cyan { background: var(--teal-50); color: #0B7A7A; }
.ni-logo.tone-gold { background: var(--orange-50); color: #9A5200; }
.ni-logo.tone-olive { background: var(--green-50); color: #1E7A45; }
.ni-logo.tone-rust { background: var(--pink-50); color: #B0305F; }
.ni-logo.has-image { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ni-logo-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); transition: opacity var(--dur-2) var(--ease); }
.ni-logo-img { position: relative; width: 40px; height: 40px; object-fit: contain; opacity: 0; transition: opacity var(--dur-2) var(--ease); }
.ni-logo.has-loaded .ni-logo-fallback { opacity: 0; }
.ni-logo.has-loaded .ni-logo-img { opacity: 1; }
.ni-logo.has-failed .ni-logo-img { display: none; }

.ni-body { display: grid; gap: 4px; min-width: 0; }
.ni-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ni-name { color: var(--text); font-size: var(--fs-footnote); font-weight: 700; }
.ni-loc { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: var(--fs-caption); }
.ni-loc::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moss); }
.ni-loc svg { display: none; }
.ni-dept { color: var(--text-3); font-size: var(--fs-footnote); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-item h3 { margin: 2px 0 0; font-family: var(--font-sans); font-size: var(--fs-headline); font-weight: 600; line-height: 1.5; letter-spacing: 0; text-wrap: pretty; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color var(--dur-1) var(--ease); }
.ni-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; }
.ni-cat { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-caption); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.ni-cat.pre { background: var(--indigo-50); color: #4745C2; }
.ni-cat.brief { background: var(--teal-50); color: #0B7A7A; }
.ni-cat.list { background: var(--orange-50); color: #9A5200; }
.ni-cat.tui { background: var(--green-50); color: #1E7A45; }
.ni-m { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.ni-m svg { width: 13px; height: 13px; }

.ni-side { display: grid; justify-items: end; align-content: center; gap: 8px; text-align: right; }
.ni-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 9px; border-radius: var(--r-pill); background: var(--muted-bg); color: var(--muted); font-size: var(--fs-caption); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.ni-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ni-badge.open { background: var(--ok-bg); color: var(--ok); }
.ni-badge.open::before { background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(48,179,92,.18); }
.ni-badge.today { background: var(--warn-bg); color: var(--warn); }
.ni-badge.today::before { background: var(--warn-dot); }
.ni-count { display: grid; justify-items: end; line-height: 1; }
.ni-count .lab { margin-bottom: 4px; color: var(--text-3); font-size: var(--fs-caption); }
.ni-count .num { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--rust); }
.ni-count .u { margin-top: 2px; color: var(--text-3); font-size: var(--fs-caption); font-weight: 600; }
.ni-detail { display: grid; justify-items: end; }
.ni-detail-link { color: var(--accent); font-size: var(--fs-footnote); font-weight: 600; }
.ni-detail-link::after { content: " →"; }

/* 倒计时数字用醒目的红色；与 ds.css 的 --danger 同源 */
.page-news { --rust: #D93025; --moss: var(--ok-dot); }

/* 空状态 */
#empty { display: none; margin-top: var(--space-4); padding: var(--space-16) var(--space-6); border-radius: var(--r-xl); background: var(--bg-elevated); text-align: center; }
#empty h3 { font-size: var(--fs-title-3); }
#empty p { max-width: 32em; margin: var(--space-2) auto 0; color: var(--text-2); font-size: var(--fs-callout); }

/* ---------- 底部咨询卡 ---------- */
.feed-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: center; margin-top: var(--space-12); padding: clamp(28px, 4vw, 48px); border-radius: var(--r-2xl); background: var(--grad-dark); color: var(--text-on-dark); box-shadow: var(--shadow-3); }
.feed-cta .sc-eye { color: var(--blue-300); font-size: var(--fs-footnote); font-weight: 600; }
.feed-cta h3 { margin-top: var(--space-2); color: #fff; font-size: var(--fs-title-1); line-height: 1.15; letter-spacing: var(--ls-title); }
.feed-cta p { margin-top: var(--space-3); max-width: 36em; color: var(--text-on-dark-2); font-size: var(--fs-callout); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .news-hero__grid { grid-template-columns: 1fr; gap: var(--space-6); align-items: start; }
}
@media (max-width: 860px) {
  .feed-layout { grid-template-columns: 1fr; }
  .filter-panel { padding: var(--space-5); border-radius: var(--r-lg); }
  .fp-row { grid-template-columns: 1fr; gap: var(--space-2); }
  .fp-row-label { padding-top: 0; }
  .fp-selects { grid-template-columns: 1fr; }
  .toolbar-count { order: 3; }
  .news-item { grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-3) var(--space-4); padding: var(--space-4); align-items: start; }
  .ni-logo { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
  .ni-logo-img { width: 32px; height: 32px; }
  .news-item h3 { font-size: var(--fs-callout); }
  .ni-side { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 12px; text-align: left; }
  .ni-count { display: flex; align-items: baseline; gap: 4px; }
  .ni-count .lab { margin: 0; }
  .ni-count .num { font-size: 20px; }
  .ni-detail { justify-items: start; }
  .feed-cta { grid-template-columns: 1fr; gap: var(--space-5); }
  .feed-cta .btn { width: 100%; }
}
@media (max-width: 860px) { .news-hero__aside .icon-tile { display: none; } .news-hero__aside { padding: var(--space-5); } }
