/* 洞察 / Insights 板块样式（scripts/build-insights.mjs 生成的页面共用）。设计变量与 assets/index.css 保持一致，主色只用 --blue。 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --text: #1E2A33;
  --text-secondary: #56626B;
  --text-tertiary: #66727B;
  --bg: #FFFFFF;
  --bg-hover: #F4F3EE;
  --bg-gray: #EDEFEC;
  --border: #D9DEDF;
  --border-light: #E6E9E8;
  --blue: #17508F;
  --blue-bg: #E7EEF6;
  --blue-strong: #103F73;
  --brass: #A9792B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Noto Sans SC', ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--blue); }
img, video { max-width: 100%; display: block; }

.ins-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.ins-wrap.narrow { max-width: 720px; }

/* 顶栏：与主站同一字标 */
.ins-header {
  position: sticky; top: 0; z-index: 10; height: 56px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.ins-logo {
  display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--blue);
  font-family: "Avenir Next", Avenir, "Nunito Sans", "Century Gothic", sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.ins-logo span { line-height: 1; transform: translateY(.03em); }
.ins-nav { display: flex; align-items: center; gap: 6px; }
.ins-nav a { color: var(--text-secondary); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.ins-nav a:hover { background: var(--bg-hover); color: var(--text); }
.ins-nav a.active { color: var(--blue); font-weight: 600; }
.ins-nav a.ins-nav-cta { background: var(--blue); color: #fff; font-weight: 600; }
.ins-nav a.ins-nav-cta:hover { background: var(--blue-strong); }

/* 列表页 */
.ins-list { padding-top: 40px; padding-bottom: 56px; }
.ins-hero h1 { font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.ins-hero p { margin-top: 10px; color: var(--text-secondary); font-size: 16px; line-height: 1.7; max-width: 640px; }
.ins-tabs { display: flex; gap: 6px; margin: 28px 0 24px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-light); }
.ins-tabs::-webkit-scrollbar { display: none; }
.ins-tabs a { padding: 10px 12px; color: var(--text-secondary); text-decoration: none; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ins-tabs a:hover { color: var(--text); }
.ins-tabs a.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.ins-empty { color: var(--text-tertiary); padding: 48px 0; text-align: center; }

.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ins-lead { margin-bottom: 24px; }
.ins-card { border: 1px solid var(--border-light); border-radius: 14px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.ins-card:hover { border-color: var(--border); box-shadow: 0 6px 20px rgba(30, 42, 51, .07); }
.ins-card-img { display: block; aspect-ratio: 16 / 9; background: var(--bg-gray); overflow: hidden; }
.ins-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ins-card-body { padding: 16px 18px 18px; }
.ins-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--text-tertiary); }
.ins-card h3 { font-size: 17px; line-height: 1.45; margin: 8px 0 6px; }
.ins-card h3 a { color: var(--text); text-decoration: none; }
.ins-card h3 a:hover { color: var(--blue); }
.ins-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.ins-card.big { flex-direction: row; }
.ins-card.big .ins-card-img { flex: 0 0 56%; aspect-ratio: auto; min-height: 260px; }
.ins-card.big .ins-card-body { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.ins-card.big h3 { font-size: 24px; }
.ins-card.big p { font-size: 15px; }

.ins-cat { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--blue); background: var(--blue-bg); padding: 2px 8px; border-radius: 999px; text-decoration: none; }
.ins-tag { display: inline-block; font-size: 13px; color: var(--text-secondary); background: var(--bg-gray); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.ins-tag:hover { color: var(--blue); background: var(--blue-bg); }
.ins-tagcloud { margin-top: 44px; }
.ins-tagcloud h2 { font-size: 15px; color: var(--text-secondary); font-weight: 600; margin-bottom: 12px; }
.ins-tagcloud div, .ins-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.ins-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; font-size: 14px; color: var(--text-tertiary); }
.ins-pager a { text-decoration: none; font-weight: 600; }

/* 文章页 */
.ins-article { padding: 32px 0 64px; }
.ins-crumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-tertiary); margin-bottom: 18px; }
.ins-crumbs a { color: var(--text-secondary); text-decoration: none; }
.ins-crumbs a:hover { color: var(--blue); }
.ins-article h1 { font-size: 34px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.ins-dek { font-size: 18px; color: var(--text-secondary); line-height: 1.7; margin-top: 14px; }
.ins-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 18px 0 28px; font-size: 13.5px; color: var(--text-tertiary); padding-bottom: 22px; border-bottom: 1px solid var(--border-light); }
.ins-cover { margin: 0 0 28px; }
.ins-cover img { width: 100%; border-radius: 12px; }

.ins-toc { background: var(--bg-gray); border-radius: 12px; padding: 16px 20px; margin-bottom: 28px; font-size: 14.5px; }
.ins-toc > div { font-weight: 600; margin-bottom: 8px; }
.ins-toc ol { padding-left: 20px; line-height: 1.9; }
.ins-toc a { color: var(--text-secondary); text-decoration: none; }
.ins-toc a:hover { color: var(--blue); }

.ins-body { font-size: 17px; line-height: 1.85; }
.ins-body > * + * { margin-top: 1.1em; }
.ins-body h2 { font-size: 24px; line-height: 1.4; margin-top: 1.9em; scroll-margin-top: 72px; }
.ins-body h3 { font-size: 19px; line-height: 1.5; margin-top: 1.6em; }
.ins-body ul, .ins-body ol { padding-left: 1.4em; }
.ins-body li + li { margin-top: .35em; }
.ins-body a { text-decoration-color: var(--brass); text-underline-offset: 3px; }
.ins-body blockquote { background: var(--blue-bg); padding: 14px 18px; border-radius: 10px; color: var(--text-secondary); font-size: 15px; }
.ins-body code { background: var(--bg-gray); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.ins-body hr { border: 0; border-top: 1px solid var(--border-light); margin: 2em 0; }
.ins-body figure { margin-top: 1.6em; margin-bottom: 1.6em; }
.ins-body figure img, .ins-body figure video { width: 100%; border-radius: 10px; background: var(--bg-gray); }
.ins-body figcaption { font-size: 13.5px; color: var(--text-tertiary); margin-top: 8px; text-align: center; line-height: 1.6; }
.ins-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ins-table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; }
.ins-table th, .ins-table td { border-bottom: 1px solid var(--border-light); padding: 10px 12px; text-align: left; vertical-align: top; }
.ins-table th { background: var(--bg-gray); font-weight: 600; white-space: nowrap; }
.ins-tags { margin-top: 36px; }

/* 前后对比滑块：之前的图叠在上面，按滑块位置裁切 */
.ins-ba-frame { position: relative; overflow: hidden; border-radius: 10px; --pos: 50%; user-select: none; }
.ins-ba-frame > img { width: 100%; }
.ins-ba-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ins-ba-top img { width: 100%; height: 100%; object-fit: cover; }
.ins-ba-frame::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; }
.ins-ba-frame input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ins-ba-lab { position: absolute; top: 10px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(30, 42, 51, .65); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.ins-ba-lab.l { left: 10px; }
.ins-ba-lab.r { right: 10px; }

/* 文末转化区 */
.ins-cta { margin-top: 44px; background: var(--blue-bg); border-radius: 16px; padding: 26px 28px; }
.ins-cta h2 { font-size: 21px; }
.ins-cta p { margin-top: 8px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.ins-cta-form { display: flex; gap: 10px; margin-top: 16px; }
.ins-cta-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); }
.ins-cta-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.ins-cta-form button { font: inherit; font-size: 15px; font-weight: 600; padding: 0 20px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; white-space: nowrap; }
.ins-cta-form button:hover { background: var(--blue-strong); }
.ins-related { margin-top: 48px; }
.ins-related h2 { font-size: 20px; margin-bottom: 16px; }
.ins-related .ins-grid { grid-template-columns: 1fr; gap: 12px; }
.ins-related .ins-card { flex-direction: row; }
.ins-related .ins-card-img { flex: 0 0 160px; aspect-ratio: auto; }

.ins-footer { border-top: 1px solid var(--border-light); padding: 28px 0 36px; font-size: 14px; color: var(--text-tertiary); }
.ins-footer a { color: var(--text-secondary); text-decoration: none; }
.ins-footer .ins-fine { margin-top: 8px; font-size: 12.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .ins-grid { grid-template-columns: repeat(2, 1fr); }
  .ins-card.big { flex-direction: column; }
  .ins-card.big .ins-card-img { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .ins-card.big .ins-card-body { padding: 18px 20px 20px; }
  .ins-card.big h3 { font-size: 21px; }
}
@media (max-width: 600px) {
  .ins-wrap { padding: 0 16px; }
  .ins-header { padding: 0 16px; }
  .ins-logo { font-size: 18px; gap: 7px; }
  .ins-logo img { width: 24px; height: 24px; }
  .ins-nav a { padding: 6px 8px; font-size: 13.5px; }
  .ins-list { padding-top: 28px; }
  .ins-hero h1 { font-size: 27px; }
  .ins-hero p { font-size: 15px; }
  .ins-grid { grid-template-columns: 1fr; gap: 14px; }
  .ins-article { padding-top: 22px; }
  .ins-article h1 { font-size: 26px; }
  .ins-dek { font-size: 16px; }
  .ins-body { font-size: 16px; }
  .ins-body h2 { font-size: 21px; }
  .ins-cta { padding: 20px 18px; }
  .ins-cta-form { flex-direction: column; }
  .ins-cta-form button { padding: 12px 0; }
  .ins-related .ins-card { flex-direction: column; }
  .ins-related .ins-card-img { flex: none; aspect-ratio: 16 / 9; }
}
