/* ColivEase blog: the landing page's look (navy ink, ColivEase blue, Fredoka headings) for long reading. */
:root {
  color-scheme: light;
  --paper: #F5F7FB;
  --white: #FFFFFF;
  --ink: #0B2255;
  --ink-2: #33446A;
  --muted: #5B6B86;
  --blue: #2865FF;
  --blue-deep: #1A4FE0;
  --blue-soft: #EAF0FF;
  --line: rgba(11, 34, 85, 0.10);
  --display: "Fredoka", "Poppins", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --body: "Poppins", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 var(--body); }
:lang(zh-Hans) body, body:lang(zh-Hans) { font-size: 17px; line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(245, 247, 251, 0.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo img { width: 78px; height: auto; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: var(--white); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff !important; font-weight: 600; text-decoration: none; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 22px -12px rgba(40, 101, 255, .9); transition: transform .2s, background .2s; }
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn.big { font-size: 16px; padding: 14px 24px; }

/* breadcrumbs, chips */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.chip { display: inline-block; font: 600 12.5px/1 var(--body); letter-spacing: .02em; color: var(--blue); background: var(--blue-soft); padding: 7px 12px; border-radius: 999px; border: 0; }
button.chip { cursor: pointer; font-size: 14px; padding: 10px 16px; background: var(--white); color: var(--ink-2); border: 1px solid var(--line); }
button.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* blog index */
.blog-head { padding: 48px 0 28px; max-width: 760px; }
.blog-head h1 { font: 700 clamp(34px, 5vw, 52px)/1.1 var(--display); margin: 0 0 14px; letter-spacing: -.01em; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: 40px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(11, 34, 85, .45); }
.card a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--blue-soft); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h2, .card h3 { font: 600 20px/1.3 var(--display); margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; font-size: 13px; color: var(--muted); }
.card .chip { align-self: flex-start; }
.card.big { margin-bottom: 26px; }
.card.big a { display: grid; grid-template-columns: 1.15fr 1fr; }
.card.big img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.card.big .card-body { padding: 32px; justify-content: center; }
.card.big h2 { font-size: clamp(24px, 3vw, 34px); }
.card.big p { -webkit-line-clamp: 4; font-size: 16px; }

/* article */
.post-head { max-width: 820px; padding: 18px 0 26px; }
.post-head h1 { font: 700 clamp(32px, 4.6vw, 50px)/1.12 var(--display); margin: 14px 0 16px; letter-spacing: -.01em; }
.post-head .meta { font-size: 14px; color: var(--muted); margin: 0; }
.cover { width: 100%; max-height: 520px; object-fit: cover; border-radius: 26px; background: var(--blue-soft); }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; padding: 40px 0 20px; align-items: start; }
.prose { max-width: 760px; }
.prose h2 { font: 600 clamp(24px, 2.6vw, 30px)/1.3 var(--display); margin: 2.2em 0 .6em; scroll-margin-top: 90px; }
.prose h3 { font: 600 21px/1.35 var(--display); margin: 1.8em 0 .5em; scroll-margin-top: 90px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; background: var(--blue-soft); border-radius: 16px; color: var(--ink-2); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code { background: var(--blue-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.table { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.55; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #F0F4FC; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.toc { position: sticky; top: 96px; font-size: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 10px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 0 0 8px; line-height: 1.45; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--blue); }

/* faq, cta, sources, related */
.faq { margin-top: 2.6em; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font: 600 22px/1 var(--display); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }
.cta { margin: 2.6em 0; padding: 30px; border-radius: 24px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #2865FF 0%, #1A4FE0 45%, #0B2255 100%); box-shadow: 0 30px 60px -36px rgba(11, 34, 85, .8); }
.cta h2 { margin: 0 0 8px; font: 700 26px/1.25 var(--display); color: #fff; }
.cta p { margin: 0 0 18px; color: rgba(255, 255, 255, .88); }
.cta .btn { background: #fff; color: var(--ink) !important; box-shadow: none; }
.sources { font-size: 14px; color: var(--muted); }
.sources h2 { font-size: 18px; margin-top: 1.4em; }
.sources ol { padding-left: 20px; }
.related { border-top: 1px solid var(--line); padding-top: 30px; }
.related h2 { font: 600 26px/1.3 var(--display); margin: 0 0 18px; }

/* footer */
.foot { background: var(--white); border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; padding: 36px 20px; align-items: start; }
.foot-in p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.foot .copy { grid-column: 1 / -1; font-size: 13px; }

@media (max-width: 980px) {
  .post-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.big a { grid-template-columns: 1fr; }
  .card.big img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .top-in { height: 64px; }
  .top nav a:not(.btn) { padding: 8px; font-size: 14px; }
  .btn { padding: 9px 14px; font-size: 14px; }
  .cover { border-radius: 18px; }
  .cta { padding: 24px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
