/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --brand: #0ea5e9;
  --brand-dark: #0369a1;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; display: grid; place-items: center; font-size: 13px;
}
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 6px 12px; border-radius: 6px; font-size: 14px;
  color: var(--muted); font-weight: 500;
}
.lang-switch a:hover { color: var(--brand-dark); }
.lang-switch a.active { color: var(--brand-dark); font-weight: 600; }

/* ===== Hero ===== */
.hero { padding: 36px 0 12px; }
.hero h1 { font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.hero-desc { margin-top: 10px; color: var(--muted); max-width: 640px; font-size: 16px; }

/* ===== Ad slot ===== */
.ad-slot {
  margin: 16px 0; border: 1px dashed var(--line); border-radius: 10px;
  background: #fff; min-height: 90px; display: grid; place-items: center;
  color: var(--subtle); font-size: 12px;
}

/* ===== Cards ===== */
.articles { padding: 8px 0 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.updated { font-size: 12px; color: var(--subtle); }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px -14px rgba(2,132,199,.35); border-color: #bae6fd; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: #e0f2fe; color: var(--brand-dark);
}
.card-source { font-size: 12px; color: var(--subtle); }
.card h3 { font-size: 16px; font-weight: 700; line-height: 1.4; }
.card h3 a:hover { color: var(--brand-dark); }
.card-summary { font-size: 14px; color: var(--muted); flex: 1; }
.card-actions { margin-top: 4px; display: flex; gap: 8px; }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: var(--brand-dark); color: #fff; transition: background .15s ease;
}
.btn-primary:hover { background: #075985; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); color: var(--ink); background: #fff;
}
.btn-ghost:hover { background: #f1f5f9; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 20px 0 8px; font-size: 13px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; color: var(--subtle); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb [aria-current] { color: var(--muted); }

/* ===== Article ===== */
.article-wrap { padding-bottom: 40px; }
.article { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.article-head h1 { font-size: 24px; font-weight: 800; line-height: 1.35; margin-top: 12px; }
.article-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--subtle); }

/* ===== Prose ===== */
.prose { font-size: 16px; color: #334155; }
.prose h2 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 24px 0 10px; }
.prose h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 20px 0 8px; }
.prose p { margin: 10px 0; }
.prose ul, .prose ol { margin: 10px 0; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose a { color: var(--brand-dark); text-decoration: underline; }

/* ===== CTA ===== */
.cta-box {
  margin-top: 28px; padding: 20px; border-radius: 12px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1px solid #bae6fd;
  text-align: center;
}
.cta-text { margin-bottom: 14px; font-weight: 600; color: var(--ink); }
.btn-cta { padding: 12px 28px; font-size: 16px; }

/* ===== FAQ ===== */
.faq-section { margin-top: 28px; }
.faq-section h2 { font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 10px; }
.faq-item h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.faq-item p { font-size: 14px; color: var(--muted); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 24px; }
.footer-inner { padding: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--subtle); }
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; } }