/* 🔒 头条风水平卡 + 详情页 + 通用 shell — 2026-09-04 锁定
   来源：AI 数据库/_shared/ailayout.py FORMAT_STANDARD v3
   所有 hot/* / portfolio / category / reports/ 都引用此 CSS
   禁止另写卡片 / 详情 / hero 排版；如需新模板，改 ailayout.py + 此文件
*/
:root {
  --bg: #f5f6f8;
  --card: #fff;
  --ink: #1a1a1a;
  --sub: #595959;
  --line: #e8e8e8;
  --brand: #FF4400;
  --brand-soft: #FFF1EB;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; }

/* 顶栏 */
.tt-topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.tt-topbar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.tt-logo { font-size: 20px; font-weight: 800; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.tt-logo b { color: var(--brand); }
.tt-nav { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.tt-nav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--sub); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tt-nav a:hover { background: var(--bg); color: var(--ink); }
.tt-nav a.active { background: var(--brand); color: #fff; }
.tt-back { color: var(--sub); text-decoration: none; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 6px; }
.tt-back:hover { background: var(--bg); color: var(--ink); }

/* 主区 */
.tt-main { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.tt-page-head { background: var(--card); border-radius: 12px; padding: 24px 28px; margin-bottom: 16px; box-shadow: var(--shadow); }
.tt-page-head h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.5px; }
.tt-page-head .tt-page-sub { color: var(--sub); font-size: 14px; margin-bottom: 10px; }
.tt-page-head .tt-page-meta { font-size: 12px; color: #888; }
.tt-page-head .tt-update-bar { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.tt-page-head .tt-update-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: ttPulse 1.6s ease-in-out infinite; }
@keyframes ttPulse { 0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.4);opacity:.55} }

/* 分组 */
.tt-section-title { font-size: 17px; font-weight: 800; margin: 24px 0 12px; padding-left: 12px; border-left: 3px solid var(--brand); }

/* 头条风水平卡列表 */
.tt-list { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.tt-card { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s; }
.tt-card:last-child { border-bottom: 0; }
.tt-card:hover { background: #fafbfc; }
.tt-card-thumb { flex: 0 0 200px; width: 200px; aspect-ratio: 3/2; border-radius: 8px; background: linear-gradient(135deg,#fff5ee,#ffe2d0); overflow: hidden; }
.tt-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tt-card-badges { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.tt-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; letter-spacing: .3px; }
.tt-badge-cat { background: var(--brand-soft); color: var(--brand); }
.tt-badge-extra { background: #f5f5f5; color: var(--sub); }
.tt-card-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-card-summary { font-size: 13.5px; color: var(--sub); line-height: 1.6; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-card-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #888; }
.tt-card-meta .tt-source { color: var(--sub); font-weight: 600; }

/* footer */
.tt-footer { text-align: center; padding: 24px 16px; color: var(--sub); font-size: 13px; border-top: 1px solid var(--line); margin-top: 20px; }
.tt-footer a { color: var(--brand); text-decoration: none; }

/* 响应式 */
@media (max-width: 768px) {
  .tt-topbar-inner { padding: 12px 14px; gap: 8px; }
  .tt-nav { display: none; }
  .tt-main { margin: 14px auto; padding: 0 10px; }
  .tt-card { flex-direction: column; padding: 14px; }
  .tt-card-thumb { flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; }
  .tt-page-head { padding: 18px; }
  .tt-page-head h1 { font-size: 22px; }
}