/* ============================================================
   AI CIA — 卡片网格风
   参考 ai-pick 视觉语言：米白纸底 + teal 主色 + 琥珀强调
   3 列卡片网格，圆角卡片，柔和阴影，hover 上浮
   ============================================================ */

:root {
  --paper: #f7f3ea;
  --surface: #fffdf8;
  --surface-warm: #fff9ec;
  --line: rgba(23, 25, 29, 0.08);
  --line-strong: rgba(23, 25, 29, 0.16);
  --ink: #17191d;
  --muted: #686b67;
  --teal: #087270;
  --teal-dark: #075958;
  --teal-soft: #d7eeee;
  --amber: #d97706;
  --amber-soft: #fff0cf;
  --red: #c0392b;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-soft: 0 2px 10px rgba(23, 25, 29, 0.05);
  --shadow: 0 10px 30px rgba(23, 25, 29, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
svg { display: block; }
.wrap { width: min(100% - 40px, var(--max)); margin: 0 auto; }

/* ---------- 报头细线 ---------- */
.masthead-rule { border-top: 3px solid var(--ink); }
.masthead {
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.masthead-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.masthead-center { font-weight: 700; letter-spacing: 0.25em; color: var(--ink); }
.masthead-right { text-align: right; }

/* ---------- 顶导航 ---------- */
.topnav {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 234, 0.88);
  backdrop-filter: blur(18px);
  padding: 16px 0;
}
.topnav-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 20px; font-weight: 800; letter-spacing: 0.02em; }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--teal); border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.topnav nav a { margin-left: 22px; font-size: 15px; font-weight: 600; color: var(--ink); opacity: 0.75; }
.topnav nav a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.lead {
  position: relative;
  text-align: center;
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--line);
}
.lead h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.lead h1 em { font-style: normal; color: var(--teal); }
.dek { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 auto; }

.meta-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px 32px;
  margin: 32px auto 0;
}
.meta-item { display: flex; align-items: baseline; gap: 6px; font-size: 14px; color: var(--muted); }
.meta-num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ink); }
.meta-num.mono { font-size: 16px; }
.meta-unit { font-size: 13px; }

.criteria {
  margin: 36px auto 0;
  max-width: 720px;
  text-align: left;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.criteria-title { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--teal-dark); margin-bottom: 6px; }
.criteria-lede { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.criteria-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 20px; }
.criteria-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; padding: 4px 0;
  border-bottom: 1px dotted var(--line);
}
.criteria-list li strong { font-family: var(--mono); font-weight: 600; }
.criteria-list li span { color: var(--muted); font-size: 11px; }

/* ---------- Section ---------- */
.section { padding: 48px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- 筛选 ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.filters button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 18px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  color: var(--ink);
  border-radius: 999px;
  transition: all 0.15s;
}
.filters button:hover { border-color: var(--teal); color: var(--teal-dark); }
.filters button.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- 卡片网格 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 16px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: var(--shadow); }

.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.stars { letter-spacing: 1px; color: var(--amber); font-size: 13px; }
.star-dim { color: #d8d2c8; }
.cat {
  background: var(--teal-soft); color: var(--teal-dark);
  padding: 2px 8px; border-radius: 5px; font-weight: 700; font-size: 12px;
}
.limited {
  margin-left: auto;
  background: var(--red); color: #fff;
  padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700;
}

.card .name { font-size: 17px; font-weight: 800; line-height: 1.3; margin-bottom: 6px; }
.region { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.badge { display: inline-block; font-size: 11px; color: var(--amber); font-weight: 700; margin-bottom: 6px; }
.modality { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.quota, .effect { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.quota { margin-bottom: 8px; }
.effect { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }

.card-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.updated { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--teal); color: #fff;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-link::after { content: "→"; }
.card-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(8, 114, 112, 0.25); color: #fff; }
.btn-secondary { font-size: 13px; color: var(--muted); border: 1px solid var(--line-strong); padding: 5px 10px; border-radius: var(--radius-sm); }

/* 卡片色调微调 */
.card.tone-yellow { border-top: 3px solid var(--amber); }
.card.tone-green  { border-top: 3px solid #2d9e3f; }
.card.tone-orange { border-top: 3px solid #c2620a; }

/* ---------- 观望名单（紧凑一行式） ---------- */
.watchout-section { background: var(--surface-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.watchout-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dotted var(--line);
}
.watchout-row:last-child { border-bottom: none; }
.wo-num { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 22px; flex-shrink: 0; }
.wo-name {
  font-size: 14px; font-weight: 700;
  flex-shrink: 0; min-width: 130px; max-width: 220px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wo-tag {
  flex-shrink: 0;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  padding: 1px 7px; border-radius: 4px;
}
.wo-why {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wo-action {
  flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--teal-dark);
}
.wo-action:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .watchout-row { flex-wrap: wrap; gap: 6px 10px; padding: 10px 0; }
  .wo-num { display: none; }
  .wo-name { max-width: none; white-space: normal; }
  .wo-why { white-space: normal; flex-basis: 100%; order: 5; }
}

/* ---------- 投稿 ---------- */
.submit-section { text-align: center; padding: 72px 0; }
.submit-section h2 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.submit-section p { color: var(--muted); margin-bottom: 22px; }
.cta {
  display: inline-block;
  background: var(--teal); color: #fff;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(8, 114, 112, 0.3); color: #fff; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(248, 244, 236, 0.8); padding: 24px 0; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.footer-mono { font-family: var(--mono); font-size: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .masthead-right { display: none; }
  .cards { grid-template-columns: 1fr; }
  .lead { padding: 40px 20px 30px; }
  .topnav nav a { margin-left: 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-link, .cta { transition: none; }
}
