/* 洞察列表、文章详情和法律页的版式。
   数值与 design/pages/insights.html、article.html 的内联样式保持一致；
   颜色、字体、圆角继续用 site.css 和 proto.css 的令牌。 */

/* ---------- 文章列表 ---------- */
.in-hero h1 {
  font-weight: 900;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.14;
  margin-top: 14px;
  text-wrap: balance;
}
.in-hero p {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-2);
  margin-top: 16px;
  max-width: 36em;
}
.in-tags {
  margin-top: 28px;
}
/* 原型用 button，正式版用链接保留可用 URL；补上垂直居中。 */
.in-tags .chipbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feat {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: inherit;
  text-decoration: none;
}
.feat .ph {
  aspect-ratio: 16/10;
  background: var(--night) center/cover no-repeat;
  max-width: 100%;
}
.feat .tx {
  padding: 32px;
  display: grid;
  gap: 14px;
  align-content: center;
}
.feat h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1.3;
  text-wrap: balance;
}
.feat p {
  color: var(--ink-2);
}
.tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--azure);
}
.meta {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--en);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.post {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  --tr-x: transform 0.35s var(--ease), box-shadow 0.35s;
  transition: var(--tr-x);
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-1);
}
.post .ph {
  aspect-ratio: 16/9;
  background: var(--paper) center/cover no-repeat;
}
.post .tx {
  padding: 20px 20px 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.post h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  text-wrap: balance;
}
.post p {
  font-size: 14.5px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.pager a,
.pager span {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  background: #fff;
  padding: 0 14px;
}
.pager [aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.in-cta {
  margin-top: 72px;
  padding: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.in-cta h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  line-height: 1.35;
}
.in-cta p {
  color: var(--ink-2);
  margin-top: 8px;
}
.mini-form {
  display: flex;
  gap: 10px;
}
.mini-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0 20px;
  font-size: 16px;
  background: #fff;
}
.in-empty {
  margin-top: 36px;
  padding: 44px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.in-empty h2 {
  font-size: 22px;
  font-weight: 900;
}
.in-empty p {
  margin: 8px 0 20px;
  color: var(--muted);
}

/* ---------- 文章详情和法律页 ---------- */
.ar {
  display: grid;
  grid-template-columns: minmax(0, 680px) 220px;
  gap: 64px;
  justify-content: center;
}
.ar.single {
  grid-template-columns: minmax(0, 680px);
}
.crumb {
  font-size: 13.5px;
  color: var(--muted);
}
.crumb a {
  color: var(--muted);
}
.ar h1 {
  font-weight: 900;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.25;
  margin-top: 14px;
  text-wrap: balance;
}
.ar .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.cover {
  margin-top: 28px;
  border-radius: var(--r-lg);
  aspect-ratio: 16/9;
  background: var(--night) center/cover no-repeat;
  max-width: 100%;
}
.prose {
  margin-top: 32px;
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink-2);
}
.prose > * + *,
.prose > div > * + * {
  margin-top: 1.1em;
}
.prose .lede {
  font-size: 19px;
  color: var(--ink);
  font-weight: 500;
}
.prose h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.4;
  margin-top: 2em;
  scroll-margin-top: calc(var(--head) + 20px);
}
.prose h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
  margin-top: 1.6em;
  scroll-margin-top: calc(var(--head) + 20px);
}
.prose ol,
.prose ul {
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--azure);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}
.prose .tw {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.prose th,
.prose td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--paper);
  font-size: 13.5px;
  color: var(--muted);
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose pre {
  background: var(--night);
  color: #e9efff;
  border-radius: var(--r);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}
.prose code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
.prose p code {
  background: var(--paper);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
}
.tip {
  background: var(--azure-50);
  border-radius: var(--r);
  padding: 20px 22px;
  color: var(--ink);
}
.tip b {
  display: block;
  margin-bottom: 6px;
}
.tip a {
  color: var(--azure);
  font-weight: 700;
}
.toc {
  position: sticky;
  top: calc(var(--head) + 36px);
  align-self: start;
  font-size: 14px;
  display: grid;
  gap: 10px;
  margin-top: 150px;
}
.toc b {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: var(--en);
}
.toc a {
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.5;
}
.toc a:hover,
.toc a[aria-current='location'] {
  color: var(--azure);
}
.toc a[aria-current='location'] {
  font-weight: 700;
}
.end {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}
.end .card {
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.end h3 {
  font-size: 18px;
  font-weight: 800;
}
.end p {
  font-size: 14.5px;
  color: var(--ink-2);
}
.end .btn {
  justify-self: start;
}
.rel {
  margin-top: 64px;
}
.rel-g {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.rel-g a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.rel-g a:hover {
  border-color: var(--azure-300);
}
.rel-g b {
  font-size: 16px;
  line-height: 1.45;
  /* 相关文章卡片统一一行，长标题截断，避免三张卡高度不一致。 */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rel-g span {
  font-size: 13px;
  color: var(--azure);
  font-weight: 700;
}

/* 草稿预览提示；正式页面不出现。 */
.preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 13.5px;
  font-weight: 700;
}
.preview-bar span {
  font-weight: 400;
  color: var(--ink-2);
}

/* ---------- 404 / 500 ---------- */
.err-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 0 96px;
  text-align: center;
}
.err-page h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.2;
}
.err-page p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 16px;
}
.err-page .cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 1100px) {
  .ar {
    grid-template-columns: minmax(0, 680px);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 900px) {
  .feat {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .in-cta {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .end,
  .rel-g {
    grid-template-columns: minmax(0, 1fr);
  }
  .prose {
    font-size: 16.5px;
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feat .tx {
    padding: 22px;
  }
  .in-cta {
    padding: 24px;
  }
  .mini-form {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .post {
    transition: none;
  }
  .post:hover {
    transform: none;
  }
}

/* U06：没有封面时使用干净的文章标题/分类排版，不显示空图块或破图 */
.feat.no-cover{grid-template-columns:minmax(0,1fr)}
.feat .ph.is-empty,.post .ph.is-empty{display:none}
