/* 西交每日新增公告简报 — 晨间公开 feed */

:root {
  color-scheme: light;

  --bg: #f5f3ee;
  --bg-top: #f8f6f1;
  --surface: rgba(255, 255, 255, .92);
  --surface-glass: rgba(255, 255, 255, .74);
  --surface-warm: #f7f4ec;
  --ink: #1f1e1b;
  --ink-2: #3a372f;
  --muted: #6b675f;
  --faint: #8b867c;
  --line: rgba(31, 30, 27, .08);
  --line-strong: rgba(31, 30, 27, .14);
  --accent: #b5442e;
  --ok: #166e45;
  --ok-bg: #e7f3eb;
  --ok-line: #cfe6d6;
  --warn: #8a5a00;
  --warn-bg: #faf0da;
  --warn-line: #ebdcb6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(31, 30, 27, .04), 0 12px 34px -24px rgba(31, 30, 27, .24);
  --shadow-hover: 0 2px 6px rgba(31, 30, 27, .05), 0 18px 42px -24px rgba(31, 30, 27, .28);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;

  --cat: #64748b;
  --cat-bg: #eef1f4;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(980px 360px at 16% -120px, rgba(228, 166, 124, .20), transparent 64%),
    radial-gradient(820px 330px at 90% -110px, rgba(146, 168, 214, .14), transparent 62%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 520px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(181, 68, 46, .18); }
a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.i {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 246, 241, .78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.45);
}

.topbar-inner,
.hero-inner,
.app-shell,
.site-footer {
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.brand img {
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(181, 68, 46, .22);
}
.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mast-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.mast-nav a:hover,
.mast-nav a:focus-visible {
  color: var(--accent);
  background: rgba(181, 68, 46, .08);
}

.hero {
  padding: 36px 0 22px;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(181, 68, 46, .18);
  background: rgba(181, 68, 46, .09);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.hero-title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.22;
  letter-spacing: 0;
  font-weight: 900;
}
.hero-title strong {
  color: var(--accent);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.hero-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}
.hero-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.source-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.source-pill:hover { transform: translateY(-1px); }
.source-pill.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
}
.source-pill.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}

.app-shell {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 26px;
  padding-bottom: 58px;
}
.feed-col {
  flex: 2 1 620px;
  min-width: 0;
  scroll-margin-top: 74px;
}
.side-col {
  flex: 1 1 278px;
  min-width: min(278px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls,
.side-card,
.ncard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.controls {
  position: sticky;
  top: 70px;
  z-index: 20;
  padding: 13px;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: riseIn .45s var(--ease) both;
}
.search {
  display: flex;
  align-items: center;
}
.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search input::placeholder { color: #a5a097; }
.search input:focus {
  border-color: rgba(181, 68, 46, .55);
  box-shadow: 0 0 0 3px rgba(181, 68, 46, .12);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.filter-label {
  color: #a5a097;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}
.verify-toggle,
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.vbtn,
.chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.vbtn b,
.chip b {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.vbtn:hover,
.chip:hover {
  color: var(--accent);
  border-color: rgba(181, 68, 46, .32);
}
.vbtn[aria-pressed="true"],
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.vbtn[aria-pressed="true"] b,
.chip[aria-pressed="true"] b {
  color: rgba(255, 255, 255, .76);
}

.feed-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 17px 2px 11px;
}
.feed-head h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.feed-head .count {
  color: var(--faint);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ncard {
  position: relative;
  overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
  animation: riseIn .48s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.ncard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--cat);
}
.ncard:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}
.ncard-body {
  padding: 20px 22px 18px 24px;
}
.ncard-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ncard-tag,
.ncard-badge,
.detail-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}
.ncard-tag {
  color: var(--cat);
  background: var(--cat-bg);
  border: 1px solid color-mix(in srgb, var(--cat) 16%, transparent);
}
.ncard-badge.readable {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
}
.ncard-badge.manual {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}
.ncard-time {
  margin-left: auto;
  color: var(--faint);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ncard-title {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: 0;
}
.ncard-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ncard-source {
  margin-top: 4px;
  color: var(--faint);
  font-size: 12.5px;
}
.ncard-desc {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.8;
}

.ncard-notes {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-warm);
}
.notes-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}
.ncard-notes ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: #4a463e;
  font-size: 13.5px;
  line-height: 1.85;
}
.ncard-notes li + li { margin-top: 4px; }

.ncard-detail-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}
.detail-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.detail-line .i { margin-top: 5px; color: var(--faint); }
.detail-label {
  flex: 0 0 auto;
  gap: 5px;
  min-height: 22px;
  border-radius: 6px;
  color: var(--muted);
  background: #f1ede5;
}
.detail-value {
  min-width: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}
.ncard-attachments {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.attachment-pill {
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 3px 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
}
.attachment-pill small {
  color: var(--faint);
  font-size: 11px;
}
.attachment-pill:hover {
  color: var(--accent);
  border-color: rgba(181, 68, 46, .34);
}

.pending-reason {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #f0e3c2;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbf3de;
  color: var(--warn);
}
.pending-reason .i { margin-top: 3px; }
.pending-title {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .04em;
}
.pending-reason p {
  margin-top: 3px;
  color: #6e5410;
  font-size: 13px;
  line-height: 1.7;
}

.ncard-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.ncard-captured {
  min-width: 0;
  color: #aca79b;
  font-size: 11.5px;
}
.ncard-open {
  margin-left: auto;
  min-height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.ncard-open:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fdfaf6;
}

.empty {
  border: 1.5px dashed rgba(31, 30, 27, .16);
  border-radius: var(--radius);
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .74);
}
.empty div {
  font-size: 15px;
  font-weight: 800;
}
.empty p {
  margin-top: 5px;
  color: #a5a097;
  font-size: 13px;
}
.empty button {
  min-height: 38px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--ink);
  color: #faf8f3;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.side-card {
  padding: 16px 18px;
  scroll-margin-top: 74px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: riseIn .5s var(--ease) both;
}
.side-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-head h2 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.side-head span {
  margin-left: auto;
  color: #a5a097;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.side-copy {
  margin-top: 7px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.7;
}
.source-group { margin-top: 13px; }
.source-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
}
.source-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}
.source-label.ok { color: var(--ok); }
.source-label.warn { color: var(--warn); }
.source-label b {
  border-radius: 999px;
  padding: 1px 7px;
  background: currentColor;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.source-list.ok {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.source-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: #f5f2ea;
  color: var(--muted);
  font-size: 12px;
}
.source-list.failed {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}
.source-fail-card,
.source-ok-card {
  border: 1px solid #f0e3c2;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fbf5e6;
}
.source-fail-card strong {
  display: block;
  color: #5c4a12;
  font-size: 12.5px;
}
.source-fail-card p,
.source-ok-card {
  color: #8a6e22;
  font-size: 12px;
  line-height: 1.65;
}
.source-note {
  margin-top: 12px;
  color: #aca79b;
  font-size: 11.5px;
  line-height: 1.7;
}
.archive-list {
  margin-top: 7px;
  display: flex;
  flex-direction: column;
}
.arch-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.arch-row:hover strong { color: var(--accent); }
.arch-row strong {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.arch-row em {
  color: #a5a097;
  font-size: 12px;
  font-style: normal;
}
.arch-row span {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}
.muted { color: var(--faint); font-size: 12px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 2;
}
.site-footer p + p { margin-top: 4px; }

.cat-teaching    { --cat: #3b6ea5; --cat-bg: #eaf1f8; }
.cat-innovation  { --cat: #7958c7; --cat-bg: #f1ecfb; }
.cat-exchange    { --cat: #0d857c; --cat-bg: #e4f3f1; }
.cat-research    { --cat: #2f8f5b; --cat-bg: #e8f5ee; }
.cat-scholarship { --cat: #b0761c; --cat-bg: #f8f0de; }
.cat-career      { --cat: #c8542f; --cat-bg: #fbeae2; }
.cat-campus      { --cat: #2f86a5; --cat-bg: #e6f2f7; }
.cat-college     { --cat: #5f6b7a; --cat-bg: #eef0f3; }
.cat-other       { --cat: #64748b; --cat-bg: #eef1f4; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .topbar-inner,
  .hero-inner,
  .app-shell,
  .site-footer {
    width: calc(100vw - 28px);
  }
  .topbar-inner { min-height: 56px; }
  .mast-nav { gap: 0; }
  .mast-nav a {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12.5px;
  }
  .hero { padding: 26px 0 18px; }
  .hero-title {
    font-size: 32px;
    line-height: 1.28;
  }
  .app-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .feed-col,
  .side-col {
    width: 100%;
    flex-basis: auto;
  }
  .controls {
    position: static;
    top: auto;
  }
  .filter-row {
    align-items: flex-start;
  }
  .filter-label {
    width: 100%;
  }
  .verify-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .vbtn {
    justify-content: center;
    min-height: 40px;
  }
  .chips {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip {
    min-height: 40px;
    flex: 0 0 auto;
  }
  .ncard-body {
    padding: 18px 16px 16px 18px;
  }
  .ncard-title {
    font-size: 18px;
  }
  .ncard-time {
    width: 100%;
    margin-left: 0;
  }
  .ncard-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .ncard-open {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    margin-left: 0;
  }
  .arch-row { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
