/* ==========================================================================
   广star · 视觉层
   基座：Pico CSS v2（表单/表格/排版语义样式）
   本文件只做主题、布局与业务组件，不重复定义基础控件
   ========================================================================== */

:root {
  --paper: #fcfbf8;
  --surface: #ffffff;
  --ink: #12161c;
  --ink-2: #4a5563;
  --ink-3: #8b95a3;
  --line: #e8e4db;
  --line-2: #f1eee7;
  --accent: #b3352a;
  --accent-ink: #8c2a21;
  --accent-soft: #fbeeeb;
  --ok: #3f6b46;
  --ok-soft: #eff6ed;
  --chip: #f4f1ea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 16px 40px -28px rgba(18, 22, 28, .45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 覆盖 Pico 默认色 */
  --pico-font-family: var(--font);
  --pico-font-size: 100%;
  --pico-background-color: var(--paper);
  --pico-color: var(--ink);
  --pico-primary: var(--accent);
  --pico-primary-hover: var(--accent-ink);
  --pico-border-radius: var(--radius-sm);
  --pico-form-element-border-color: var(--line);
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-focus-color: rgba(179, 53, 42, .14);
  --pico-muted-color: var(--ink-3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { letter-spacing: -.012em; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 0 26px; min-height: 62px;
  background: rgba(252, 251, 248, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 9px; flex: none; }
.brand b { font-size: 20px; font-weight: 700; letter-spacing: .12em; }
.brand span { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }

.search { display: flex; align-items: center; flex: 1 1 200px; max-width: 320px; margin: 0; position: relative; }
.search input {
  width: 100%; margin: 0; padding: 8px 78px 8px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13.5px; color: var(--ink); height: auto;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,53,42,.1); }
.search button {
  position: absolute; right: 4px; top: 4px; bottom: 4px;
  padding: 0 14px; margin: 0; border: none; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 12.5px; cursor: pointer; width: auto;
}
.search button:hover { background: #000; }

.nav { display: flex; justify-content: flex-start; gap: 2px; margin: 0; flex-wrap: wrap; }
.nav a {
  padding: 6px 11px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--chip); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--chip); font-weight: 600; }

.userbox { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.userbox form { margin: 0; }
.me {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--chip); font-size: 13px;
}
.me::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d98a6b);
}
.linkbtn {
  border: none; background: none; color: var(--ink-3); font-size: 12.5px;
  cursor: pointer; padding: 4px 6px; width: auto; margin: 0;
}
.linkbtn:hover { color: var(--ink); }
.linkbtn.danger { color: var(--accent); }
.ghost {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; width: auto; margin: 0;
}
.ghost:hover { border-color: #cfc9bc; color: var(--ink); }

/* 主按钮（同时覆盖 Pico button） */
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff !important; border: 1px solid var(--accent);
  padding: 9px 20px; border-radius: 9px; font-size: 14px; font-weight: 500;
  cursor: pointer; width: auto; margin: 0; transition: .15s;
}
.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.primary.sm { padding: 6px 14px; font-size: 13px; }
.primary.wide { width: 100%; }

/* ---------- 布局 ---------- */
main { max-width: 1160px; margin: 0 auto; padding: 34px 26px 84px; }
main.wide { max-width: 1260px; }

.page-head { margin: 2px 0 28px; max-width: 780px; }
.page-head h1 {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 30px; line-height: 1.35; margin: 0 0 10px; font-weight: 700;
}
.page-head h1 span { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.page-head p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.75; }

.sec-h {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600; margin: 44px 0 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.sec-h span { font-size: 12.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }

.muted { color: var(--ink-3); }
.small { font-size: 12.5px; line-height: 1.7; }
.linkish { color: var(--accent); border-bottom: 1px solid rgba(179,53,42,.35); }

/* ---------- 首页 ---------- */
.hero { max-width: 820px; margin: 12px 0 40px; }
.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.28; margin: 0 0 18px;
  font-weight: 700; letter-spacing: -.02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; font-size: 16.5px; color: var(--ink-2); line-height: 1.8; max-width: 680px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-meta .primary, .hero-meta .ghost { padding: 11px 22px; font-size: 14.5px; }

.entry-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin: 0 0 52px;
}
.entry {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); transition: .18s ease;
}
.entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d8d2c5; }
.entry-num { font-size: 27px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.entry-num i { font-style: normal; font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-left: 5px; }
.entry b { font-size: 15.5px; font-weight: 600; }
.entry-desc { font-size: 13px; color: var(--ink-3); line-height: 1.65; }

.home-sec { margin: 0 0 48px; }
.home-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; padding-bottom: 11px; border-bottom: 1px solid var(--line);
}
.home-head h2 { margin: 0; font-size: 18px; font-weight: 650; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.home-head h2 span { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.home-head > a { font-size: 13px; color: var(--accent); flex: none; }
.home-head > a:hover { text-decoration: underline; }

.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 28px; }
.mini {
  display: flex; align-items: baseline; gap: 10px; padding: 11px 2px;
  border-bottom: 1px dotted var(--line); font-size: 13.5px; transition: .12s;
}
.mini:hover { padding-left: 6px; color: var(--accent); }
.mini b { font-weight: 500; flex: 1; }
.mini em { font-style: normal; font-size: 11.5px; color: var(--ink-3); flex: none; }

/* ---------- 徽标 ---------- */
.badge {
  flex: none; display: inline-flex; align-items: center;
  font-size: 11px; line-height: 1.6; padding: 1px 7px; border-radius: 4px;
  background: var(--chip); color: var(--ink-2); letter-spacing: .01em; white-space: nowrap;
}
.badge.nat { background: var(--accent-soft); color: var(--accent); }
.badge.intl { background: #eef2f8; color: #3a5f88; }
.badge.prov { background: var(--ok-soft); color: var(--ok); }
.badge.school { background: #f2f0f7; color: #5b5276; }
.badge.college { background: #f2f2f0; color: #6b6b63; }

.flag { margin-left: auto; font-size: 10.5px; color: var(--ok); background: var(--ok-soft); padding: 1px 7px; border-radius: 4px; border: 1px solid #d9e3d1; }
.cat { font-size: 12px; color: var(--accent); }
.level { font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); padding: 1px 7px; border-radius: 4px; }

/* ---------- 竞赛卡 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid.cols-1 { grid-template-columns: 1fr; }

.card {
  display: flex; flex-direction: column; padding: 20px 22px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d8d2c5; }
.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.card h3 { margin: 0 0 3px; font-size: 16.5px; line-height: 1.5; font-weight: 620; }
.card .alias { margin: 0 0 9px; font-size: 12px; color: var(--ink-3); }
.sum {
  margin: 0 0 13px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span { font-size: 11.5px; color: var(--ink-2); background: var(--chip); padding: 2px 8px; border-radius: 4px; }

/* ---------- 筛选 ---------- */
.facet-wrap { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 34px; align-items: start; min-width: 0; }
.facets { position: sticky; top: 78px; min-width: 0; max-width: 100%; }
.facet { margin-bottom: 22px; }
.facet h4 { margin: 0 0 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .09em; }
.facet-opts { display: flex; flex-direction: column; gap: 1px; }
@media (min-width: 1100px) {
  .facet-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; }
}
.fopt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 9px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2); transition: .12s;
}
.fopt:hover { background: var(--chip); color: var(--ink); }
.fopt i { font-style: normal; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fopt.on { background: var(--ink); color: #fff; }
.fopt.on i { color: rgba(255,255,255,.62); }
.fopt.zero { opacity: .34; cursor: not-allowed; }
.fopt.zero:hover { background: none; }

.results { min-width: 0; }
.resultbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap;
}
.applied { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 200px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px;
}
.achip i { font-style: normal; font-size: 10px; opacity: .55; }
.achip:hover i { opacity: 1; }
.clear { font-size: 12px; color: var(--ink-3); border-bottom: 1px solid currentColor; }
.sort { display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--ink-3); flex: none; }
.sort span { margin-right: 6px; }
.sort a { padding: 3px 9px; border-radius: 6px; color: var(--ink-2); }
.sort a:hover { background: var(--chip); }
.sort a.on { background: var(--ink); color: #fff; }
.count { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.count b { color: var(--ink); }

/* 二级导航 */
.subnav {
  display: inline-flex; justify-content: flex-start; gap: 4px; flex-wrap: wrap;
  margin: 0 0 24px; padding: 5px; background: #f5f2ec; border-radius: 11px;
  width: auto; max-width: 100%;
}
.subnav a { padding: 7px 15px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); transition: .15s; }
.subnav a:hover { background: rgba(255,255,255,.7); }
.subnav a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(18,22,28,.08); }

/* ---------- 详情 ---------- */
.detail {
  max-width: 800px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 44px 44px;
}
.back { display: inline-block; font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.back:hover { color: var(--accent); }
.detail h1 { font-size: 29px; line-height: 1.4; margin: 12px 0 6px; font-weight: 700; }
.detail .alias { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); }
.detail .lead { font-size: 16px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.8; }
.detail h2 {
  font-size: 16px; margin: 34px 0 12px; padding-left: 11px;
  border-left: 3px solid var(--accent); line-height: 1.5;
}
.detail p { color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.detail ul, .detail ol { color: var(--ink-2); font-size: 14px; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2px 26px;
  margin: 28px 0 0; padding: 18px 0 10px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts > div { display: flex; gap: 10px; padding: 6px 0; }
.facts dt { color: var(--ink-3); font-size: 12.5px; min-width: 66px; flex: none; margin: 0; }
.facts dd { margin: 0; font-size: 13.5px; color: var(--ink); }
.facts dd a { color: var(--accent); border-bottom: 1px solid rgba(179,53,42,.35); }
.facts.stage { border-top: none; margin-top: 14px; }
.facts.compact { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-top: 16px; }

.related { max-width: 1160px; margin: 44px auto 0; }
.related h2 { font-size: 15px; margin: 0 0 16px; color: var(--ink-2); }

/* ---------- 表格 ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; margin: 0; }
.ptable th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3);
  padding: 11px 15px; border-bottom: 1px solid var(--line); background: #faf8f4; white-space: nowrap;
}
.ptable td { padding: 12px 15px; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); line-height: 1.65; }
.ptable tr:last-child td { border-bottom: none; }
.ptable tbody tr:hover { background: #fbfaf6; }
.ptable td b { color: var(--ink); font-weight: 600; }
.ptable .wk { min-width: 300px; }
.nowrap { white-space: nowrap; }
.lv { display: inline-block; margin-left: 6px; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

/* ---------- 团队 ---------- */
.team, .res, .proj, .post {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 20px;
}
.team h3, .res h3, .proj h3, .post h3 { margin: 7px 0 3px; font-size: 18px; line-height: 1.5; font-weight: 650; }
.post h3 { font-size: 16px; }
.team h4 { margin: 18px 0 9px; font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; }
.sum-full { margin: 11px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.78; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; font-size: 12.5px; border-bottom: 1px dotted var(--line-2); }
.timeline li:last-child { border-bottom: none; }
.timeline b { flex: none; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline span { flex: 1; color: var(--ink-2); }
.timeline em { flex: none; font-style: normal; color: var(--ink); font-weight: 500; }
.join { margin: 13px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 16px 18px; }
.stat b { display: block; font-size: 21px; line-height: 1.3; font-weight: 700; }
.stat span { display: block; font-size: 12.5px; color: var(--ink-2); }
.stat em { display: block; font-size: 11.5px; color: var(--ink-3); font-style: normal; margin-top: 2px; }

/* ---------- 预警 ---------- */
.alert-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.alert { display: flex; align-items: center; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); transition: .12s; }
.alert:last-child { border-bottom: none; }
.alert:hover { background: #fbfaf6; }
.alert-day { flex: none; width: 56px; text-align: center; line-height: 1.15; }
.alert-day b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.alert-day i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.alert-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert-main b { font-size: 14px; font-weight: 550; }
.alert-main em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.conf { flex: none; font-size: 10.5px; padding: 2px 8px; border-radius: 4px; background: var(--chip); color: var(--ink-3); }
.conf.yes { background: var(--ok-soft); color: var(--ok); }

/* ---------- 两栏 / 排行 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 34px; align-items: start; }
.rank { list-style: none; margin: 0 0 28px; padding: 0; }
.rank li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px dotted var(--line); font-size: 13px; color: var(--ink-2); }
.rank li b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 模板 / 路径 ---------- */
.tpl-sec { margin: 24px 0 0; }
.tpl-sec h3 { display: flex; gap: 11px; align-items: baseline; font-size: 15.5px; margin: 0 0 9px; font-weight: 620; }
.tpl-sec h3 span { font-size: 11.5px; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.tpl-sec ul { margin: 8px 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.tpl-ask { margin: 0 0 8px; font-size: 13px; color: var(--ink); background: #faf8f4; border-left: 2px solid var(--line); padding: 7px 11px; }
.tpl-tip { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }

.stages { list-style: none; margin: 24px 0 0; padding: 0; }
.stages > li { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.stage-w { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.stages b { font-size: 14.5px; }
.stages ul { margin: 8px 0 7px; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.stage-out { margin: 0; font-size: 12.5px; color: var(--ok); }

/* ---------- 卡片网格：经验/资源 ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.guide-grid.three { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.guide-card {
  display: flex; flex-direction: column; gap: 9px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: .18s ease;
}
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d8d2c5; }
.gtag { align-self: flex-start; font-size: 11.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 4px; }
.guide-card h3 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 620; }
.guide-card p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.72; }
.gmeta { margin-top: auto; font-size: 11.5px; color: var(--ink-3); }
.detail .gtag { display: inline-block; margin-bottom: 12px; }

.res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.res-list.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 26px; }
.res-item { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: .15s; }
.res-list.compact .res-item { border: none; border-bottom: 1px dotted var(--line); border-radius: 0; background: none; padding: 10px 2px; }
.res-item:hover { border-color: #d8d2c5; }
.res-main { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.res-main b { font-weight: 550; font-size: 13.5px; line-height: 1.6; }
.res-org { font-size: 11.5px; color: var(--ink-3); flex: none; }
.res-note { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.65; }

/* ---------- 表单 ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; max-width: 740px; }
.frow { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.frow label { font-size: 13px; color: var(--ink-2); padding-top: 9px; }
.frow input, .frow textarea, .frow select {
  width: 100%; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: var(--surface); height: auto;
}
.frow textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
.frow input:focus, .frow textarea:focus, .frow select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,53,42,.1); outline: none;
}
.form button[type=submit] {
  background: var(--accent); color: #fff; border: none; padding: 10px 24px;
  border-radius: 9px; font-size: 14px; cursor: pointer; width: auto; margin: 0;
}
.form button[type=submit]:hover { background: var(--accent-ink); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.inline { display: inline; margin: 0; }
.flash { background: var(--ok-soft); border: 1px solid #d6e3d0; color: #35552f; padding: 11px 15px; border-radius: 9px; font-size: 13px; margin: 0 0 22px; }
.flash b { font-family: var(--mono); letter-spacing: .06em; }

/* ---------- 账号 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 40px 0 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px 34px 30px; box-shadow: 0 24px 60px -40px rgba(18,22,28,.4);
}
.auth-card h1 { font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.auth-sub { margin: 0 0 22px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.auth-card label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 16px; }
.auth-card input { margin: 6px 0 0; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; height: auto; }
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,53,42,.1); outline: none; }
.auth-card button { margin-top: 6px; }
.auth-alt { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.auth-alt a { color: var(--accent); }
.auth-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.err { background: var(--accent-soft); color: var(--accent); padding: 9px 13px; border-radius: 8px; font-size: 13px; margin: 0 0 18px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 76px 20px; color: var(--ink-3); }
.empty h1 { font-size: 44px; margin: 0 0 10px; color: var(--ink); }
.empty h3 { margin: 0 0 10px; font-size: 18px; color: var(--ink); }
.empty p { margin: 0 0 16px; font-size: 13.5px; }
.empty a { color: var(--accent); border-bottom: 1px solid rgba(179,53,42,.35); }

/* ---------- 时间轴视图 ---------- */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cal-col { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 14px 14px 10px; }
.cal-col h4 {
  display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 9px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600;
}
.cal-col h4 span { font-size: 11px; color: var(--ink-3); font-weight: 400; }
.row { display: flex; align-items: baseline; gap: 7px; padding: 5px 3px; border-radius: 5px; font-size: 12.5px; }
.row:hover { background: var(--chip); }
.row b { font-weight: 500; flex: 1; }
.row em { font-style: normal; font-size: 11px; color: var(--ink-3); flex: none; }

/* ---------- 分类 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); transition: .15s; }
.chip:hover { border-color: #cfc9bc; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 诊断 ---------- */
.diag { list-style: none; margin: 14px 0 0; padding: 0; }
.diag li { padding: 13px 16px; border-radius: 10px; margin-bottom: 9px; font-size: 13px; line-height: 1.75; }
.diag li b { display: block; font-size: 13px; margin-bottom: 4px; }
.diag li span { color: var(--ink-2); }
.diag li.ok { background: var(--ok-soft); }
.diag li.ok b { color: var(--ok); }
.diag li.no { background: var(--accent-soft); }
.diag li.no b { color: var(--accent); }
.deaths { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }

/* ---------- 页脚 ---------- */
.foot { border-top: 1px solid var(--line); padding: 30px 26px 46px; text-align: center; font-size: 12.5px; color: var(--ink-3); line-height: 1.8; }
.foot p { margin: 2px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .facet-wrap { grid-template-columns: 1fr; gap: 20px; }
  .facets { position: static; display: flex; gap: 16px; overflow-x: auto; padding: 0 0 12px; }
  .facet { flex: none; margin-bottom: 0; min-width: 152px; }
  .facet-opts { max-height: 200px; overflow-y: auto; }
  .two-col { grid-template-columns: 1fr; }
  .resultbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort { justify-content: flex-start; }
  .detail { padding: 28px 22px 34px; }
  .stages > li { grid-template-columns: 1fr; gap: 6px; }
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .frow label { padding-top: 0; }
}
@media (max-width: 640px) {
  .entry-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 16px; gap: 10px; min-height: 0; }
  .search { order: 3; flex: 1 1 100%; max-width: 100%; }
  .nav { order: 2; overflow-x: auto; max-width: 100%; }
  .userbox { order: 2; margin-left: auto; }
  .facet-wrap { min-width: 0; }
  .facets { display: block; overflow: visible; padding-bottom: 6px; }
  .facet { min-width: 0; margin-bottom: 16px; }
  .facet-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; max-height: none; }
  .alert-day { width: 46px; }
  .alert-day b { font-size: 13px; }
  .alert-day i { font-size: 10px; }
  main { padding: 22px 16px 64px; }
  .hero h1 { font-size: 27px; }
  .grid, .guide-grid, .entry-grid { grid-template-columns: 1fr; }
  .detail h1 { font-size: 23px; }
  .alert { flex-wrap: wrap; gap: 8px 12px; }
}

/* ---------- 补充：静态值 / 登录引导 / 复选 ---------- */
.static-val { font-size: 13.5px; color: var(--ink); padding: 9px 0; font-weight: 550; }
.gate {
  background: var(--surface); border: 1px dashed #d8d2c5; border-radius: var(--radius);
  padding: 26px 28px; max-width: 740px;
}
.gate p { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding-top: 6px; }
.check input { width: auto; margin: 0; }

/* ---------- 溢出治理 ---------- */
.topbar > *, .page-head h1, .page-head h1 span, .facet, .facet-opts, .fopt, .results, .card, .post { min-width: 0; }
.fopt span { overflow-wrap: anywhere; }
.brand, .userbox { flex: 0 0 auto; }
.nav { flex: 1 1 auto; min-width: 0; }
.search { min-width: 0; }

@media (max-width: 640px) {
  .facet-opts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .facet-opts .fopt { padding: 6px 6px; }
  .page-head h1 { font-size: 24px; }
  .page-head h1 span { font-size: 12px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .nav::-webkit-scrollbar { display: none; }
}

/* ---------- 邀请码 ---------- */
.code-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 22px 26px; margin: 0 0 26px; max-width: 520px;
}
.code-label { font-size: 11.5px; color: rgba(255,255,255,.6); letter-spacing: .08em; }
.code-val { font-family: var(--mono); font-size: 27px; letter-spacing: .14em; font-weight: 700; }
.code-meta { font-size: 12px; color: rgba(255,255,255,.55); }
.ghost.sm { padding: 4px 10px; font-size: 12.5px; }

/* ---------- 可下载资料 ---------- */
.dl-meta { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.dl-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 3px; background: var(--chip); color: var(--ink-2);
}
