:root {
  --red: #d71920;
  --red-dark: #b40f17;
  --blue: #17458f;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e8ebef;
  --soft: #f6f7f9;
  --paper: #ffffff;
  --gold: #b7791f;
  --green: #13795b;
  --shadow: 0 12px 32px rgba(31, 41, 51, 0.08);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar {
  min-height: 108px;
  display: grid;
  grid-template-columns: 300px minmax(260px, 520px) 1fr;
  gap: 28px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--red);
  text-decoration: none;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border: 2px solid var(--red);
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-size: 30px;
  font-weight: 800;
  font-family: SimSun, serif;
}

.brand strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  font-family: STKaiti, KaiTi, SimSun, serif;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #414b57;
  font-size: 13px;
  letter-spacing: 1px;
}

.search-box {
  height: 44px;
  border: 1px solid #cfd5dd;
  display: flex;
  align-items: center;
  background: #fff;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--ink);
}

.search-box button {
  min-width: 66px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-left: 1px solid var(--line);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  cursor: pointer;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-menu {
  position: relative;
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.user-menu-popover .text-button {
  width: 100%;
  justify-content: center;
}

.primary-button,
.outline-button,
.text-button,
.nav-link,
.sub-nav button,
.icon-button {
  border: 0;
  background: transparent;
}

.primary-button {
  background: var(--red);
  color: #fff;
  min-height: 38px;
  padding: 0 18px;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--red-dark);
}

.outline-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8dde4;
  color: #334155;
  background: #fff;
}

.outline-button:hover,
.text-button:hover,
.nav-link:hover,
.sub-nav button:hover {
  color: var(--red);
}

.text-button {
  color: #3f4a56;
  padding: 8px 6px;
}

.main-nav {
  border-top: 3px solid var(--red);
  background: #f4f5f7;
}

.nav-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}

.nav-link {
  color: #1f2933;
  font-size: 18px;
  min-height: 40px;
  padding: 0;
  position: relative;
}

.nav-link.is-active {
  color: var(--red);
  font-weight: 700;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--red);
}

.sub-nav {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  color: #8a94a3;
}

.sub-nav button {
  color: #7b8490;
  padding: 0;
}

.hero {
  padding: 34px 0 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 12px;
}

.hero h1 {
  margin: 0 auto;
  max-width: 980px;
  color: var(--blue);
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.18;
  font-weight: 900;
}

.hero-subtitle {
  max-width: 860px;
  margin: 18px auto 0;
  color: #52606d;
  font-size: 17px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-meta span {
  padding: 6px 12px;
  border: 1px solid #dbe2ea;
  color: #475569;
  background: #fff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
  padding-bottom: 70px;
}

.main-panel,
.side-panel,
.admin-panel,
.chat-panel,
.detail-panel {
  background: #fff;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.section-title h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  margin-right: 10px;
  vertical-align: -3px;
  background: var(--red);
}

.ai-tools-page-heading {
  align-items: flex-end;
}

.ai-tools-heading-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.ai-tools-view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fc;
}

.ai-tools-view-tabs button {
  min-height: 36px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f6f82;
  font-weight: 750;
}

.ai-tools-view-tabs button:hover,
.ai-tools-view-tabs button.is-active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 4px 14px rgba(28, 52, 84, 0.1);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.category-card {
  min-height: 142px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.category-card:hover {
  border-color: #f0a0a4;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 19px;
}

.category-card span {
  color: #667280;
  line-height: 1.7;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.smart-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.smart-filter-competition,
.campus-search-filter {
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1fr) auto;
}

.smart-filter-ai {
  grid-template-columns: minmax(220px, 0.45fr) minmax(280px, 1fr) auto;
}

.smart-filter-agents {
  grid-template-columns: repeat(2, minmax(180px, 0.35fr)) auto;
}

.smart-filter label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.ai-tools-board {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.ai-tools-column {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 14px;
}

.ai-tools-column-wide {
  border: 0;
  background: transparent;
  padding: 0;
}

.compact-title {
  margin-bottom: 12px;
}

.compact-title h2 {
  font-size: 20px;
}

.ai-tools-list {
  display: grid;
  gap: 12px;
}

.ai-tools-column-wide .ai-tools-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.github-starter-kit {
  grid-column: 1 / -1;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #cbdcf0;
  border-radius: 18px;
  background: linear-gradient(135deg, #f3f8ff, #fffaf0);
}

.github-starter-kit-heading,
.github-starter-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.github-starter-kit-heading h2,
.github-starter-item h3,
.github-starter-kit-heading p,
.github-starter-item p {
  margin: 0;
}

.github-starter-kit-heading p {
  max-width: 760px;
  margin-top: 7px;
  color: #5f6f82;
  line-height: 1.7;
}

.github-starter-eyebrow {
  color: #316ca8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.github-starter-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.github-starter-item {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce4ed;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.github-starter-item.is-core {
  border-top: 3px solid #e62f39;
}

.github-starter-step {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #164a88;
  font-weight: 800;
}

.github-starter-item h3 {
  color: #24364c;
  font-size: 17px;
}

.github-starter-item strong {
  color: #e62f39;
  font-size: 13px;
}

.github-starter-item p {
  color: #617287;
  font-size: 13px;
  line-height: 1.65;
}

.github-starter-item .text-button {
  justify-self: start;
  margin-top: auto;
}

.ai-tools-list .opportunity-card {
  min-height: 0;
}

.agent-module-intro {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--red);
  background: #fff8f8;
  color: #5f6875;
  line-height: 1.7;
}

.agent-module-intro strong {
  flex: 0 0 auto;
  color: #252b33;
}

.agent-card {
  border-top: 3px solid #e05459;
}

.agent-level-tag {
  background: #fff7e8;
  color: #8a5a08;
}

.agent-card-quick {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #f8fafb;
  color: #4b5765;
  line-height: 1.6;
}

.agent-card-quick > strong {
  color: #20262e;
  font-size: 14px;
}

.agent-card-quick p {
  margin: 0;
}

.agent-card-balance {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.agent-good::before,
.agent-limit::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  content: "";
}

.agent-good::before {
  background: var(--green);
}

.agent-limit::before {
  background: #d29a2a;
}

.opportunity-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opportunity-card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.42;
}

.summary {
  margin: 0;
  color: #51606f;
  line-height: 1.75;
}

.card-topline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-pill,
.status-pill,
.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
  background: #f3f4f6;
  color: #475569;
}

.category-pill {
  background: #fff1f2;
  color: var(--red);
}

.status-pill[data-status="已核验"] {
  background: #e8f5ef;
  color: var(--green);
}

.status-pill[data-status="高风险"] {
  background: #fff4e5;
  color: var(--gold);
}

.status-pill[data-status="即将截止"] {
  background: #fff1f2;
  color: var(--red);
}

.card-facts {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 7px 10px;
  margin: 0;
  color: #4b5563;
  font-size: 14px;
}

.card-facts dt {
  color: #8a94a3;
}

.card-facts dd {
  margin: 0;
}

.card-warning {
  margin: auto 0 0;
  color: #8a4b0f;
  background: #fffaf0;
  border-left: 3px solid #f59e0b;
  padding: 9px 10px;
  line-height: 1.6;
  font-size: 14px;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.side-panel {
  position: sticky;
  top: 12px;
}

.weekly-panel-title {
  align-items: flex-start;
}

.weekly-panel-title > div {
  min-width: 0;
}

.weekly-panel-title p {
  margin: 6px 0 0;
  color: #7a8491;
  font-size: 12px;
  line-height: 1.5;
}

.ranking-list,
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list li,
.link-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}

.weekly-ranking-list li {
  align-items: start;
  padding: 12px 0;
}

.weekly-ranking-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weekly-ranking-copy .text-button {
  width: 100%;
  padding: 0;
  color: #263241;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
}

.weekly-ranking-copy > time {
  color: #8a94a1;
  font-size: 11px;
  line-height: 1.45;
}

.weekly-ranking-copy > p {
  display: -webkit-box;
  margin: 1px 0 0;
  overflow: hidden;
  color: #667180;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #eef0f3;
  color: #657180;
  font-weight: 700;
}

.ranking-list li:nth-child(-n + 3) .rank-num {
  background: var(--red);
  color: #fff;
}

.empty-state {
  border: 1px dashed #ccd3dc;
  background: #fafbfc;
  padding: 34px;
  text-align: center;
  color: #607080;
}

.empty-state h3 {
  margin: 0 0 10px;
  color: #263241;
  font-size: 22px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filters button {
  border: 1px solid #d8dde4;
  background: #fff;
  min-height: 34px;
  padding: 0 12px;
}

.filters button.is-active {
  border-color: var(--red);
  color: var(--red);
}

.detail-panel {
  border: 1px solid var(--line);
  padding: 30px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.25;
}

.detail-meta {
  color: #9099a5;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-body {
  font-size: 18px;
  line-height: 2;
  margin-top: 22px;
}

.weekly-detail-panel .detail-meta {
  color: #6f7a88;
}

.weekly-detail-summary {
  margin: 0;
  color: #263241;
  font-size: 20px;
  line-height: 1.9;
}

.news-media-section {
  margin: 26px 0;
  padding-top: 4px;
}

.news-media-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.news-media-heading strong {
  font-size: 19px;
  color: #17233a;
}

.news-media-heading span {
  color: #7a8797;
  font-size: 13px;
}

.news-media-list {
  display: grid;
  gap: 18px;
}

.news-media-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #f7f9fc;
}

.news-media-image-link {
  display: block;
  padding: 10px;
  background: #f7f9fc;
}

.news-media-image-link img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #fff;
}

.news-media-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #5c6878;
  font-size: 14px;
  line-height: 1.6;
}

.news-media-figure figcaption .text-button {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 14px;
}

.agent-detail-summary {
  max-width: 850px;
  margin: 0 0 20px;
  color: #303a45;
  font-size: 20px;
  line-height: 1.8;
}

.agent-at-a-glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.agent-at-a-glance div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.agent-at-a-glance span {
  color: #8993a0;
  font-size: 13px;
}

.agent-at-a-glance strong {
  color: #2b333d;
  font-size: 15px;
  line-height: 1.5;
}

.agent-detail-section {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  line-height: 1.8;
}

.agent-detail-section h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.agent-detail-section ul {
  margin: 0;
  padding-left: 22px;
}

.agent-audience {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.agent-pro-con-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.agent-pros {
  border-top: 3px solid var(--green);
}

.agent-cons {
  border-top: 3px solid #d29a2a;
}

.agent-resource-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-resource-hint {
  margin: -2px 0 12px;
  padding-left: 18px;
  position: relative;
  color: #697482;
  font-size: 14px;
  line-height: 1.6;
}

.agent-resource-hint::before {
  position: absolute;
  left: 0;
  color: var(--red);
  content: "↗";
  font-weight: 800;
}

.agent-advanced {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px dashed #b8c0ca;
  background: #f8fafb;
  font-size: 15px;
  line-height: 1.8;
}

.agent-advanced summary {
  cursor: pointer;
  color: #43505f;
  font-weight: 700;
}

.agent-advanced p {
  margin: 10px 0 0;
}

.agent-detail-warning {
  margin: 14px 0 0;
  padding: 13px 15px;
  border-left: 3px solid #d29a2a;
  background: #fffaf0;
  color: #6c5220;
  font-size: 15px;
  line-height: 1.7;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.stack-form label,
.modal label {
  display: grid;
  gap: 7px;
  color: #3e4c59;
}

.form-grid .wide,
.stack-form .wide {
  grid-column: 1 / -1;
}

.agent-admin-fields {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #efc9cb;
  background: #fffafa;
}

.agent-admin-fields[hidden] {
  display: none;
}

.agent-admin-fields legend {
  padding: 0 7px;
  color: var(--red);
  font-weight: 800;
}

.agent-admin-hint {
  margin: 0 0 12px;
  color: #697482;
  font-size: 13px;
  line-height: 1.6;
}

.agent-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agent-admin-grid .wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  border: 1px solid #d2d8e0;
  min-height: 40px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.password-row {
  position: relative;
  display: block;
}

.password-row input {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 34px;
  padding: 0 8px;
  transform: translateY(-50%);
  color: #51606f;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.65;
}

.admin-panel,
.chat-panel {
  border: 1px solid var(--line);
  padding: 22px;
}

.chat-panel,
.chat-message-main,
.pinned-message {
  min-width: 0;
}

.chat-bubble,
.pinned-message,
.pinned-message a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.chat-window {
  height: 480px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #f4f5f7;
  padding: 18px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.chat-message.is-own {
  flex-direction: row-reverse;
}

.chat-message-main {
  max-width: min(620px, calc(100% - 54px));
}

.chat-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  background: #fff;
  border: 1px solid #dfe5ec;
  color: #1f2937;
  font-weight: 800;
}

.chat-message.is-own .chat-avatar {
  background: #2f7d4f;
  border-color: #2f7d4f;
  color: #fff;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #8b95a1;
  font-size: 13px;
}

.chat-message.is-own .chat-meta {
  justify-content: flex-end;
}

.chat-meta strong {
  color: #2f3a45;
  font-size: 14px;
}

.chat-message.is-own .chat-meta strong {
  color: #2f7d4f;
}

.chat-bubble {
  position: relative;
  padding: 10px 13px;
  background: #fff;
  border: 1px solid #edf0f3;
  color: #1f2937;
  line-height: 1.7;
}

.chat-message.is-own .chat-bubble {
  background: #95ec69;
  border-color: #95ec69;
}

.chat-bubble::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -7px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: inherit;
  border-bottom: inherit;
  transform: rotate(45deg);
}

.chat-message.is-own .chat-bubble::before {
  right: -7px;
  left: auto;
  border: 0;
}

.chat-bubble p {
  margin: 0;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chat-message.is-own .chat-actions {
  justify-content: flex-end;
}

.chat-actions .outline-button {
  min-height: 28px;
  padding: 4px 9px;
  border-color: transparent;
  background: transparent;
  color: #7b8794;
}

.chat-actions .outline-button:hover {
  border-color: #cfd8e3;
  background: #fff;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.plan-item,
.favorite-item {
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 12px;
}

.plan-item h3,
.favorite-item h3 {
  margin: 0 0 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(420px, 100%);
  background: #fff;
  padding: 28px;
  position: relative;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2);
}

.modal h2 {
  margin: 0 0 10px;
}

.modal p {
  color: #657180;
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  color: #667280;
  font-size: 24px;
}

.full {
  width: 100%;
  margin-top: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.auth-tabs .is-active {
  border-color: var(--red);
  color: var(--red);
  font-weight: 700;
}

.auth-error {
  margin: 0 0 12px;
  padding: 9px 10px;
  border-left: 3px solid var(--red);
  background: #fff1f2;
  color: var(--red);
  font-weight: 700;
  line-height: 1.55;
}

.auth-error[hidden] {
  display: none;
}

.auth-error.auth-notice {
  border-left-color: var(--green);
  background: #e8f5ef;
  color: var(--green);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dev-code {
  margin: 10px 0 0;
  padding: 9px 10px;
  background: #fffaf0;
  border-left: 3px solid #d29a2a;
  color: #7a4d08;
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #1f2933;
  color: #fff;
  padding: 12px 16px;
  z-index: 30;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .layout,
  .split {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .category-grid,
  .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-at-a-glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1240px);
  }

  .brand strong {
    font-size: 25px;
  }

  .nav-row {
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .nav-row::-webkit-scrollbar,
  .sub-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .sub-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sub-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .hero {
    text-align: left;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .category-grid,
  .feed-grid,
    .ai-tools-board,
    .ai-tools-column-wide .ai-tools-list,
    .github-starter-list,
    .form-grid,
    .smart-filter,
    .smart-filter-competition,
    .smart-filter-agents,
    .agent-admin-grid,
    .agent-pro-con-grid,
    .agent-at-a-glance {
    grid-template-columns: 1fr;
  }

  .agent-module-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .detail-panel {
    padding: 20px;
  }

  .chat-panel {
    width: 100%;
    padding: 16px;
    overflow: hidden;
  }

  .detail-panel h2 {
    font-size: 28px;
  }

  .news-media-heading,
  .news-media-figure figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }
}

/* Clean UTF-8 overrides for the second MVP pass. */
.status-pill[data-status="已核验"] {
  background: #e8f5ef;
  color: var(--green);
}

.status-pill[data-status="高风险"] {
  background: #fff4e5;
  color: var(--gold);
}

.status-pill[data-status="即将截止"] {
  background: #fff1f2;
  color: var(--red);
}

.compact-facts {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px 10px;
  color: #596574;
  font-size: 14px;
  margin: 10px 0 14px;
}

.compact-facts dt {
  color: #8a94a3;
}

.compact-facts dd {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.check-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.check-row label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.check-row input {
  min-height: auto;
}

.admin-split {
  grid-template-columns: minmax(440px, 0.95fr) minmax(0, 1.05fr);
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 140px;
  gap: 10px;
}

.chat-message.is-reported {
  border-color: #f2c4c7;
  background: #fff8f8;
}

.admin-item,
.lead-item {
  background: #fff;
}

.pinned-box {
  border: 1px solid #f0d7a6;
  border-left: 4px solid #d29a2a;
  background: #fffaf0;
  padding: 10px 14px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.pinned-box p {
  margin: 0;
}

.pinned-message + .pinned-message {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0d7a6;
}

.pinned-actions {
  margin-top: 6px;
}

.danger-tag {
  background: #fff1f2;
  color: var(--red);
}

.site-footer {
  padding: 28px 20px 36px;
  text-align: center;
  font-size: 13px;
}

.site-footer a {
  color: #7b8490;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--green);
}

.sidebar-title,
.lead-title {
  margin-top: 26px;
}

@media (max-width: 980px) {
  .admin-split,
  .admin-filters,
  .check-row {
    grid-template-columns: 1fr;
  }
}
