/* Prose 功能指南 · 亮色主题 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #f54e00;
  --primary-hover: #d94400;
  --bg-deep: #f7f7f4;
  --bg-base: #f2f1ed;
  --bg-card: #ffffff;
  --bg-hover: #ebeae5;
  --border: rgba(38, 37, 30, 0.10);
  --border-light: rgba(38, 37, 30, 0.22);
  --text-primary: #26251e;
  --text-secondary: #55544d;
  --text-muted: #77756d;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(38, 37, 30, 0.04);
  --shadow-md: 0 8px 28px rgba(38, 37, 30, 0.07);
}

html { color-scheme: light; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(245, 78, 0, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 20%, rgba(192, 133, 50, 0.06) 0%, transparent 55%),
    var(--bg-deep);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 247, 244, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-cta {
  background: var(--primary);
  color: #fff !important; padding: 7px 16px; border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--primary-hover); }

.wrap { max-width: 860px; margin: 0 auto; padding: 44px 24px 80px; }
.wrap-article { max-width: 1140px; }

.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: var(--text-muted); margin-bottom: 26px;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-primary); }

.kicker {
  display: inline-block; font-size: 12px; letter-spacing: .08em;
  color: var(--primary); font-weight: 700; text-transform: uppercase; margin-bottom: 12px;
}
.article-head h1 {
  font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.28; letter-spacing: -0.01em; font-weight: 800;
}
.meta { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.meta a { color: var(--primary); text-decoration: none; }
.meta a:hover { text-decoration: underline; }

.lead {
  margin-top: 26px; padding: 21px 23px;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    conic-gradient(from 180deg, #ff9a76, #ffd166, #8fd6a8, #7cc4f0, #a99bea, #f2a0c0, #ff9a76) border-box;
  border: 2px solid transparent;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.lead p { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text-primary); }
.lead p + p { margin-top: 12px; }

.article-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  column-gap: 56px;
  align-items: start;
}
.article-detail > * { grid-column: 1; min-width: 0; }
.article-detail > .article-side {
  grid-column: 2; grid-row: 1 / span 99;
  align-self: stretch;
}
.article-side .toc { margin-top: 0; padding: 16px 18px; font-size: 13.5px; }

.more-guides {
  position: sticky; top: 84px;
  margin-top: 18px; padding: 16px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.more-guides strong { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 13px; }
.article .more-guides ul { list-style: none; padding: 0; margin: 0; }
.article .more-guides li { margin: 0; line-height: 1.7; }
.article .more-guides li + li { border-top: 1px solid var(--border); }
.article .more-guides a {
  display: block; padding: 10px 0; font-size: 13px; line-height: 1.65;
  color: var(--text-secondary); text-decoration: none;
}
.article .more-guides a::after {
  content: '↗'; float: right; margin-left: 8px;
  color: var(--text-muted); font-size: 12px;
}
.article .more-guides a:hover { color: var(--primary); text-decoration: none; }

.toc {
  margin-top: 30px; padding: 18px 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); font-size: 14px;
}
.toc strong { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 13px; }
.article .toc ol { padding-left: 18px; margin: 0; color: var(--text-secondary); }
.article .toc li { margin: 4px 0; line-height: 1.7; }
.article .toc a { color: var(--text-secondary); text-decoration: none; }
.article .toc a:hover { color: var(--primary); text-decoration: none; }

.article-detail section { margin-top: 48px; scroll-margin-top: 80px; }
.article h2 {
  font-size: 24px; line-height: 1.4; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 18px; font-weight: 700;
}
.article h3 { font-size: 18px; margin: 26px 0 10px; font-weight: 700; }
.article p { margin: 14px 0; line-height: 1.95; }
.article ul, .article ol { margin: 14px 0; padding-left: 22px; }
.article li { margin: 8px 0; line-height: 1.9; }
.article strong { color: var(--text-primary); font-weight: 700; }

.article :not(pre) > code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em; background: var(--bg-hover); color: #b23a00;
  padding: 2px 6px; border-radius: 4px;
}

.article pre {
  margin: 20px 0;
  padding: 16px 20px;
  background: #f5f4ef;
  border: 1px solid rgba(38, 37, 30, 0.12);
  border-left: 3.5px solid var(--primary);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.article pre code {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-primary);
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.article a { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: var(--primary); }

.article blockquote {
  margin: 18px 0; padding: 14px 18px;
  background: #fffaf6; border: 1px solid rgba(245, 78, 0, 0.18);
  border-radius: 8px; color: var(--text-secondary); font-size: 14px;
}
.article blockquote p { margin: 0; color: var(--text-secondary); }

.article table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.article th, .article td {
  padding: 11px 13px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border); line-height: 1.7;
}
.article th { background: var(--bg-base); color: var(--text-primary); font-weight: 700; white-space: nowrap; }
.article tr:last-child td { border-bottom: none; }

.note {
  padding: 14px 18px; margin: 18px 0;
  background: #fffaf6; border: 1px solid rgba(245, 78, 0, 0.18);
  border-radius: 8px; color: var(--text-secondary); font-size: 14px;
}

.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 0 0 16px; color: var(--text-secondary); }
.faq-a p { color: var(--text-secondary); margin: 8px 0; }

.related ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.related li a {
  display: block; padding: 16px 18px; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary); box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.related li a:hover { border-color: var(--primary); transform: translateX(3px); box-shadow: var(--shadow-md); }

.cta {
  margin-top: 56px; padding: 32px 28px; text-align: center;
  background: linear-gradient(135deg, #fff4ee 0%, #ffffff 100%);
  border: 1px solid rgba(245, 78, 0, 0.24); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cta h2 { border: none; padding: 0; margin-bottom: 10px; font-size: 22px; }
.cta p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 20px; }
.article .cta-btn {
  display: inline-block; padding: 11px 28px; border-radius: 999px;
  background: var(--primary); color: #fff; text-decoration: none; font-weight: 700;
}
.article .cta-btn:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }

.footer { border-top: 1px solid var(--border); margin-top: 20px; padding: 26px 24px; background: rgba(255, 255, 255, 0.5); }
.footer-inner {
  max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }

.wrap-wide { max-width: 1140px; }
.hub-group { margin-top: 44px; scroll-margin-top: 76px; }
.hub-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.hub-group-head h2 { font-size: 20px; margin: 0; }
.hub-group-head span { font-size: 13px; color: var(--text-muted); }
.cat-nav {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 28px 0 0; padding: 10px 0; background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.cat-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px;
  border: 1px solid var(--border); border-radius: 999px; text-decoration: none;
  font-size: 14px; color: var(--text-secondary); background: var(--bg-card);
}
.cat-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.cat-nav a span { font-size: 12px; color: var(--text-muted); }
.cat-lead { margin-bottom: 18px; }
.cat-lead .card { flex-direction: row; }
.cat-lead .card img {
  width: 46%; aspect-ratio: 16 / 9; border-right: 1px solid rgba(38, 37, 30, .16); border-bottom: 0;
}
.cat-lead .card-body { padding: 30px 34px; justify-content: center; }
.cat-lead .card h3 { font-size: 28px; line-height: 1.35; margin: 10px 0; }
.cat-lead .card p { font-size: 16px; line-height: 1.75; max-width: 560px; }
.cat-lead .card-meta { padding-top: 14px; }
.article .cat-rest { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.cat-rest.rest-1 { grid-template-columns: 1fr; }
.cat-rest.rest-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat-rest.rest-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-rest.rest-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-rest.rest-1 .card { flex-direction: row; }
.cat-rest.rest-1 .card img {
  width: 46%; aspect-ratio: 16 / 9; border-right: 1px solid rgba(38, 37, 30, .16); border-bottom: 0;
}
.cat-rest.rest-1 .card-body { padding: 30px 34px; justify-content: center; }
.cat-rest.rest-1 h3 { font-size: 28px; line-height: 1.35; margin: 10px 0; }
.cat-rest.rest-1 p { font-size: 16px; line-height: 1.75; max-width: 560px; }
.cat-rest.rest-1 .card-meta { padding-top: 14px; }
.cat-rest.rest-2 h3 { font-size: 20px; }
.cat-rest.rest-3 h3 { font-size: 18px; }
.cat-rest.rest-2 p, .cat-rest.rest-3 p { font-size: 14px; }
.card {
  position: relative;
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--bg-base); border-bottom: 1px solid var(--border);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.card h3 { font-size: 15.5px; line-height: 1.5; margin: 8px 0 6px; color: var(--text-primary); }
.card p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.card-meta { margin-top: auto; padding-top: 10px; font-size: 11.5px; color: var(--text-muted); }
.card-more { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--primary); text-decoration: none; }
.card-more:hover { text-decoration: none; }
/* 伪元素把点击区扩展到整张卡片，标题本身保持纯文本，便于 AI 阅读器提取 */
.card-more::after { content: ""; position: absolute; inset: 0; }

@media (max-width: 1040px) {
  .article-detail { display: block; }
  .article-detail > .article-side { margin-top: 30px; }
  .article-side .toc { padding: 18px 22px; font-size: 14px; }
  /* 单列布局下“其他问题”会把正文推得太靠下，窄屏直接隐藏 */
  .more-guides { display: none; }
}
@media (max-width: 1100px) {
  .cat-rest.rest-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cat-rest.rest-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .cat-lead .card, .cat-rest.rest-1 .card { flex-direction: column; }
  .cat-lead .card img, .cat-rest.rest-1 .card img {
    width: 100%; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .cat-lead .card-body, .cat-rest.rest-1 .card-body { padding: 22px 24px 24px; }
  .cat-lead .card h3, .cat-rest.rest-1 h3 { font-size: 23px; }
}
@media (max-width: 640px) {
  .cat-rest.rest-2, .cat-rest.rest-3, .cat-rest.rest-4 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* 分类导航允许换行，避免最后几个分类被横向滚动藏住 */
  .cat-nav { position: static; }
  .cat-nav a { white-space: nowrap; }
  .nav-links { gap: 12px; font-size: 13px; }
  .nav-links a:not(.nav-cta):not(.active) { display: none; }
  .wrap { padding: 28px 18px 56px; }
  .article section { margin-top: 38px; }
  .article table { display: block; overflow-x: auto; white-space: nowrap; }
  .article th, .article td { padding: 9px 11px; }
}
