/* ============================================================
   寻址导航站 · 前端样式
   设计语言：纸面底色 + 发丝线边框 + 克制的暖色 CTA
   ============================================================ */

:root {
  --paper: #F4F6F8;
  --surface: #FFFFFF;
  --ink: #18212E;
  --ink-2: #5B6675;
  --ink-3: #8A95A5;
  --line: #E4E8EE;
  --accent: #E0532B;
  --accent-deep: #C7441F;
  --accent-soft: #FDEAD9;
  --amber: #FFF6E5;
  --amber-line: #F0D9A8;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
}
a { color: var(--accent-deep); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), #F09A3E);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.brand-name { font-size: 17px; letter-spacing: .5px; }
.header-slogan { margin-left: auto; color: var(--ink-2); font-size: 13px; }

/* ---------- 广告位 ---------- */
.ad-box {
  position: relative;
  background: var(--amber);
  border: 1px dashed var(--amber-line);
  border-radius: var(--radius);
  padding: 14px 18px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
}
.ad-tag {
  position: absolute; top: 0; right: 0;
  background: var(--amber-line); color: #8A6D1F;
  font-size: 11px; line-height: 1.8; padding: 0 8px;
  border-bottom-left-radius: 8px;
}
.ad-banner { margin: 16px 0 6px; min-height: 90px; display: flex; align-items: center; justify-content: center; text-align: center; }

/* ---------- 页面主区 ---------- */
.page-main { padding: 24px 0 48px; }
.page-title { font-size: 26px; margin: 8px 0 4px; letter-spacing: .5px; }
.page-sub { color: var(--ink-2); margin: 0 0 6px; font-size: 14px; }
.page-sub strong { color: var(--ink); }

/* ---------- 首页卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-main { display: flex; gap: 12px; padding: 16px 16px 10px; color: var(--ink); flex: 1; }
.card-logo {
  width: 46px; height: 46px; border-radius: 10px; flex: none;
  object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 3px;
}
.logo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--h, 220) 55% 52%);
  color: #fff; font-weight: 800; font-size: 20px; user-select: none; border: none; padding: 0;
}
.card-text { min-width: 0; }
.card-title { display: block; font-size: 15px; line-height: 1.4; font-weight: 600; margin-bottom: 6px; }
.card-summary {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 14px; border-top: 1px dashed var(--line); font-size: 13px;
}
.card-detail { color: var(--accent-deep); font-weight: 600; }
.card-go { color: var(--ink-2); }
.card-go:hover { color: var(--accent-deep); }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.pager a, .pager .pager-btn {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink-2); font-size: 13px;
}
.pager a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .pager-dots { border: none; background: none; min-width: auto; padding: 0 2px; }

/* ---------- 落地页（左右结构） ---------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.breadcrumb a { color: var(--ink-2); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.detail-main { padding: 26px; }
.detail-head { display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.detail-logo { width: 64px; height: 64px; border-radius: 14px; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 6px; }
.detail-logo.logo-fallback { font-size: 28px; padding: 0; }
.detail-title { margin: 0 0 6px; font-size: 24px; line-height: 1.35; }
.detail-meta { color: var(--ink-3); font-size: 13px; margin: 0; }
.detail-summary {
  background: var(--paper); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 12px 14px;
  color: var(--ink-2); font-size: 14px; margin-bottom: 16px;
}
.detail-intro h2 { font-size: 17px; margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose { font-size: 15px; }
.prose p { margin: 0 0 10px; }

/* 右侧直达卡片 */
.detail-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.cta-card {
  padding: 22px;
  background: linear-gradient(180deg, #FFFFFF, #FBF4EE);
  border: 1px solid var(--line); border-radius: 16px;
}
.cta-site { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.cta-site img, .cta-site .logo-fallback { width: 44px; height: 44px; border-radius: 11px; font-size: 18px; }
.cta-site strong { display: block; font-size: 14px; }
.cta-domain { color: var(--ink-3); font-size: 12px; word-break: break-all; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font); font-weight: 600;
  border-radius: 10px; transition: background .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-go {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #E8733F);
  color: #fff; font-size: 17px; padding: 14px 16px;
  box-shadow: 0 8px 18px -8px rgba(224, 83, 43, .6);
}
.btn-go:hover { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); }
.btn-arrow { font-size: 19px; line-height: 1; }
.btn-ghost { margin-top: 10px; width: 100%; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; padding: 9px; }
.btn-ghost:hover { border-color: var(--ink-3); }
.cta-tip { font-size: 12px; color: var(--ink-3); text-align: center; margin: 0; padding: 0 6px; }
.btn-primary { background: var(--accent); color: #fff; padding: 11px 22px; }
.btn-primary:hover { background: var(--accent-deep); }

/* ---------- 空状态 / 404 ---------- */
.empty-state { text-align: center; padding: 70px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.empty-code { font-size: 64px; font-weight: 800; line-height: 1; color: #DCE2EA; }
.empty-state h1 { font-size: 20px; margin: 18px 0 8px; }
.empty-state p { color: var(--ink-2); margin: 0 0 22px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; padding: 22px 0 30px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 18px; font-size: 13px; }
.footer-nav a { color: var(--ink-2); }
.footer-nav a:hover { color: var(--accent-deep); }
.footer-note { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .header-slogan { display: none; }
}
@media (max-width: 520px) {
  .detail-main { padding: 18px; }
  .detail-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
}