/* Mirrors the inline nav/footer/button rules of the marketing pages (pricing.html).
   If the site chrome changes, re-sync these two blocks. */
:root { --font-display: "Poppins", "Noto Sans TC", system-ui, sans-serif; --font-body: "Noto Sans TC", "Poppins", system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-page); color: var(--text-body); font-family: var(--font-body); }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 32px; } /* same as the homepage */
a { text-decoration: none; }

  /* NAV */
  .nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  .nav .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
  .wordmark { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 24px; letter-spacing: -0.04em; color: var(--ink-900); line-height: 1; text-decoration: none; }
  .wordmark .i-dot { color: var(--orange-500); }
  .nav-links { display: flex; gap: 26px; margin-left: 12px; }
  .nav-links a { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--text-body); text-decoration: none; transition: color .18s; }
  .nav-links a:hover { color: var(--orange-500); }
  .nav-spacer { flex: 1; }
  .btn { font-family: var(--font-display); font-weight: 700; border: 0; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .18s; white-space: nowrap; }
  .btn-primary { background: var(--orange-500); color: var(--ink-900); }
  .btn-primary:hover { background: var(--orange-600); box-shadow: var(--shadow-orange); }
  .btn-dark { background: var(--ink-900); color: #fff; }
  .btn-dark:hover { background: #1c2436; }
  .btn-ghost { background: transparent; color: var(--text-strong); }
  .btn-ghost:hover { background: var(--grey-100); }
  .btn-sm { padding: 10px 18px; font-size: 14px; }
  .nav-user { position: relative; }
  .nav-avatar { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--white); color: var(--text-body); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; overflow: hidden; transition: border-color .15s; }
  .nav-avatar:hover { border-color: var(--ink-400); }
  .nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .nav-user-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow); min-width: 140px; padding: 6px; z-index: 30; }
  .nav-user-menu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-body); text-decoration: none; transition: background .15s; }
  .nav-user-menu a:hover { background: var(--grey-100); }
  .btn-lg { padding: 15px 26px; font-size: 16px; width: 100%; }


  /* FOOTER */
  footer { background: var(--ink-900); color: rgba(255,255,255,.7); padding: 56px 0 38px; margin-top: 64px; }
  footer .wrap { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
  footer .wordmark { color: #fff; }
  footer .about { font-size: 14px; line-height: 1.7; max-width: 320px; color: rgba(255,255,255,.55); margin-top: 12px; }
  footer h4 { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #fff; margin: 0 0 16px; }
  footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
  footer ul a { font-size: 14px; color: rgba(255,255,255,.6); text-decoration: none; transition: color .18s; }
  footer ul a:hover { color: var(--orange-400); }
  .footer-bottom { margin-top: 36px; padding-top: 22px; display: flex; font-size: 13px; color: rgba(255,255,255,.4); flex-wrap: wrap; gap: 12px; }
  .footer-bottom a { color: inherit; text-decoration: none; }

@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- blog ---------- */
:root {
  --blog-serif: "Source Serif 4", "Noto Serif TC", Georgia, Cambria, "Times New Roman", serif;
  --blog-column: 680px;
}
.post-main { max-width: var(--blog-column); margin: 0 auto; padding: 56px 24px 24px; }

/* index: hero, three-up grid, list */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.index-main { padding-top: 40px; padding-bottom: 24px; }
.index-hero { padding-bottom: 40px; }
.index-section { padding: 28px 0 40px; border-top: 1px solid var(--border); }
.section-label { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-muted); margin: 0 0 24px; letter-spacing: 0; }
.by { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.hero-link, .grid-link, .list-link { color: inherit; display: block; }
.hero-text h2, .grid-text h3, .list-text h3 { font-family: var(--font-display); color: var(--text-strong); margin: 0; }
.hero-text p, .grid-text p, .list-text p { font-family: var(--blog-serif); color: var(--text-muted); margin: 10px 0 0; }
.hero-link:hover h2, .grid-link:hover h3, .list-link:hover h3 { text-decoration: underline; }
.hero-link { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hero-post--nocover .hero-link { grid-template-columns: minmax(0, 1fr); }
.hero-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--grey-100); }
.hero-text h2 { font-size: 32px; line-height: 1.3; letter-spacing: -0.01em; }
.hero-text p { font-size: 18px; line-height: 1.7; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.grid-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--grey-100); margin-bottom: 16px; }
.grid-text h3 { font-size: 20px; line-height: 1.4; }
.grid-text p { font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.list-post { border-bottom: 1px solid var(--border); }
.list-link { display: flex; flex-direction: row-reverse; gap: 24px; align-items: flex-start; padding: 24px 0; }
.list-cover { width: 120px; height: 80px; object-fit: cover; border-radius: 4px; flex: none; background: var(--grey-100); }
.list-text { flex: 1; min-width: 0; }
.list-text h3 { font-size: 19px; line-height: 1.4; }
.list-text p { font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card { padding: 28px 0; border-bottom: 1px solid var(--border); }
.card-link { display: flex; gap: 24px; align-items: flex-start; color: inherit; }
.card-text { flex: 1; min-width: 0; }
.card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.card-title { font-family: var(--font-display); font-size: 22px; line-height: 1.35; margin: 0 0 8px; color: var(--text-strong); }
.card-link:hover .card-title { text-decoration: underline; }
.card-blurb { margin: 0; font-family: var(--blog-serif); font-size: 16px; line-height: 1.6; color: var(--text-body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-thumb { width: 136px; height: 100px; object-fit: cover; border-radius: 4px; flex: none; background: var(--grey-100); }
.empty { padding: 48px 0; color: var(--text-muted); }

/* tags */
.post-tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags li { font-size: 13px; padding: 5px 12px; border-radius: 99em; background: var(--grey-100); color: var(--text-body); }

/* article */
.post-head h1 { font-size: 40px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 14px; }
.post-subtitle { font-family: var(--blog-serif); font-size: 21px; line-height: 1.6; color: var(--text-muted); margin: 0 0 24px; }
.byline { margin: 24px 0 32px; font-size: 14px; color: var(--text-muted); }
.post-cover { margin: 0 0 40px; }
.post-cover img { width: 100%; height: auto; display: block; border-radius: 4px; }

.post-body { font-family: var(--blog-serif); font-size: 20px; line-height: 1.85; color: var(--text-body); overflow-wrap: anywhere; }
.post-body p { margin: 0 0 1.4em; }
.post-body h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.4; color: var(--text-strong); margin: 2.2em 0 0.7em; letter-spacing: -0.005em; }
.post-body h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.4; color: var(--text-strong); margin: 1.8em 0 0.6em; }
.post-body a { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--orange-500); }
.post-body blockquote { margin: 1.8em 0; padding: 0 0 0 22px; border-left: 3px solid var(--text-strong); color: var(--text-strong); font-size: 22px; line-height: 1.7; }
.post-body blockquote p { margin: 0 0 0.6em; }
.post-body blockquote em { font-style: normal; }
.post-body ul, .post-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.post-body li { margin-bottom: 0.5em; }
.post-body figure { margin: 2em 0; }
.post-body img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.post-body figcaption { margin-top: 10px; text-align: center; font-family: var(--font-body); font-size: 14px; color: var(--text-muted); }
.post-body .video { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; background: var(--grey-100); }
.post-body .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-body pre { background: var(--grey-100); border-radius: 6px; padding: 16px 18px; overflow-x: auto; font-size: 15px; line-height: 1.6; margin: 0 0 1.4em; }
.post-body code { font-size: 0.9em; background: var(--grey-100); padding: 0.1em 0.35em; border-radius: 4px; }
.post-body pre code { background: none; padding: 0; }
.post-body hr { border: 0; text-align: center; margin: 2.4em 0; }
.post-body hr::before { content: "···"; letter-spacing: 0.6em; color: var(--text-muted); }

.post-foot { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.related { margin-top: 56px; }
.related h2 { font-size: 20px; margin: 0 0 4px; }

@media (max-width: 960px) {
  .hero-link { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .post-main { padding: 36px 20px 16px; }
  .index-main { padding-top: 24px; }
  .hero-text h2 { font-size: 26px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .list-cover { width: 96px; height: 64px; }
  .post-head h1 { font-size: 30px; }
  .post-subtitle { font-size: 18px; }
  .post-body { font-size: 18px; line-height: 1.8; }
  .post-body blockquote { font-size: 19px; }
  .card-link { flex-direction: column-reverse; gap: 14px; }
  .card-thumb { width: 100%; height: 180px; }
  .wrap { padding: 0 20px; }
}
