/* ===========================================================
   J Project Master — SEO 教學文章共用樣式 (blog.css)
   預設主題：點起來 POS（靛紫）
   .theme-dateok：約丫 DateOK 預約系統（藍 / 青）
   =========================================================== */
:root {
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-line: #c7d2fe;
  --accent-2: #8b5cf6;

  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e5e9f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;

  --ok: #059669; --ok-soft: #ecfdf5;
  --warn: #b45309; --warn-soft: #fffbeb;
  --danger: #dc2626; --danger-soft: #fef2f2;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
  --font: 'Plus Jakarta Sans', 'Inter', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --header-h: 64px;
}
body.theme-dateok {
  --accent: #1765e0;
  --accent-dark: #0f4fb8;
  --accent-soft: #eef4ff;
  --accent-line: #c6ddfb;
  --accent-2: #0fb5ae;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--bg); line-height: 1.8; font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0; letter-spacing: -.01em; }

/* ── Topbar ─────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 1rem; padding: 0 22px; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,.3); font-size: 1rem; }
.brand-name { font-weight: 800; color: var(--ink); font-size: 1rem; display: block; }
.brand-sub { font-size: .7rem; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.topbar-spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 700; font-size: .9rem; border-radius: 11px; padding: .6rem 1.1rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent-dark); }
.read-bar { position: absolute; left: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .1s linear; }
.topbar .hide-sm { }

/* ── Shell ──────────────────────────────── */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 22px; }
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 1.4rem 0 .2rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb i { font-size: .6rem; color: #cbd5e1; }

/* ── Hero ───────────────────────────────── */
.post-hero { padding: 1.2rem 0 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 2.2rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 800; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: .32rem .85rem; border-radius: 999px; letter-spacing: .02em; }
.post-hero h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 900; margin: 1.1rem 0 .85rem; }
.post-hero .lead { font-size: 1.12rem; color: var(--muted); }
.post-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.3rem; font-size: .86rem; color: var(--muted); }
.post-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.post-meta i { color: var(--accent); }

/* ── Article body ───────────────────────── */
article { font-size: 1.06rem; }
article h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); font-weight: 900; margin: 2.8rem 0 .4rem; scroll-margin-top: 90px; }
article h2 .n { color: var(--accent); margin-right: .5rem; }
article h3 { font-size: 1.18rem; font-weight: 800; margin: 1.8rem 0 .4rem; }
article p { margin: .85rem 0; }
article ul, article ol { margin: .85rem 0; padding-left: 1.3rem; }
article li { margin: .4rem 0; }
article strong { color: var(--ink); }
article a { font-weight: 600; border-bottom: 1px solid var(--accent-line); }
article a:hover { text-decoration: none; border-bottom-color: var(--accent); }

.lead-in { font-size: 1.14rem; color: var(--text); background: var(--bg-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 1.1rem 1.3rem; margin: 0 0 1.4rem; }

/* TOC */
.toc-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 2rem 0; }
.toc-box .toc-title { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.toc-box ol { margin: 0; padding-left: 1.2rem; }
.toc-box li { margin: .35rem 0; }
.toc-box a { color: var(--text); font-weight: 600; border: 0; }
.toc-box a:hover { color: var(--accent-dark); }

/* Callouts */
.callout { border-radius: 14px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; border: 1px solid var(--line); background: var(--bg-soft); display: flex; gap: .9rem; }
.callout i { margin-top: .2rem; font-size: 1.1rem; flex-shrink: 0; }
.callout .c-body { min-width: 0; }
.callout b { color: var(--ink); display: block; margin-bottom: .2rem; }
.callout.tip { background: var(--accent-soft); border-color: var(--accent-line); }
.callout.tip i { color: var(--accent-dark); }
.callout.ok { background: var(--ok-soft); border-color: #a7f3d0; }
.callout.ok i { color: var(--ok); }
.callout.warn { background: var(--warn-soft); border-color: #fde68a; }
.callout.warn i { color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1.6rem 0; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; color: var(--ink); }
.yes { color: var(--ok); font-weight: 800; }
.no { color: var(--danger); font-weight: 800; }

/* Feature / check cards */
.check-list { list-style: none; padding: 0; margin: 1.3rem 0; }
.check-list li { position: relative; padding: .55rem 0 .55rem 2rem; border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: .65rem; color: var(--ok); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 1.6rem 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; background: #fff; box-shadow: var(--shadow); }
.card .card-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-size: 1.1rem; margin-bottom: .8rem; }
.card h4 { font-size: 1.05rem; margin-bottom: .3rem; }
.card p { font-size: .92rem; color: var(--muted); margin: 0; }

/* FAQ */
.faq { margin: 1.6rem 0; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 0 1.2rem; margin-bottom: .8rem; background: #fff; box-shadow: var(--shadow); }
.faq summary { font-weight: 800; color: var(--ink); cursor: pointer; padding: 1.1rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\2b"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-a { padding: .9rem 0 1.1rem; color: var(--text); }

/* CTA */
.cta { margin: 3rem 0 1rem; border-radius: 20px; padding: 2.4rem; text-align: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow-lg); }
.cta h3 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 900; }
.cta p { color: rgba(255,255,255,.9); max-width: 520px; margin: .7rem auto 1.4rem; }
.cta .btn-cta { background: #fff; color: var(--accent-dark); font-weight: 800; padding: .85rem 1.8rem; border-radius: 12px; display: inline-flex; align-items: center; gap: .5rem; }
.cta .btn-cta:hover { transform: translateY(-2px); text-decoration: none; }

/* Related posts */
.related { margin: 3rem 0 1rem; }
.related h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rel-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; background: #fff; transition: .15s; display: block; }
.rel-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.rel-card .rk { font-size: .72rem; font-weight: 800; color: var(--accent); letter-spacing: .05em; }
.rel-card .rt { font-weight: 800; color: var(--ink); margin: .3rem 0; line-height: 1.5; }
.rel-card .rd { font-size: .88rem; color: var(--muted); margin: 0; }

/* Footer */
footer.site { border-top: 1px solid var(--line); margin-top: 3rem; background: var(--bg-soft); }
footer.site .wrap { padding-top: 2.2rem; padding-bottom: 2.4rem; }
.foot-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .9rem; }
.foot-links a { color: var(--muted); font-weight: 600; }
.foot-links a:hover { color: var(--accent-dark); }
.foot-copy { font-size: .82rem; color: var(--muted); margin-top: 1.2rem; }

/* Blog hub */
.hub-hero { text-align: center; padding: 2.4rem 0 1rem; }
.hub-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 900; }
.hub-hero p { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 1rem auto 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 2.4rem 0; }
.hub-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.hub-card .hub-top { padding: 1.3rem 1.4rem; background: linear-gradient(135deg, var(--accent-soft), #fff); }
.hub-card .hub-tag { font-size: .72rem; font-weight: 800; color: var(--accent-dark); letter-spacing: .05em; }
.hub-card .hub-t { font-size: 1.18rem; font-weight: 900; color: var(--ink); margin: .45rem 0 .5rem; line-height: 1.45; }
.hub-card .hub-d { font-size: .92rem; color: var(--muted); padding: 0 1.4rem 1.3rem; margin: 0; flex: 1; }
.hub-card .hub-more { padding: 0 1.4rem 1.3rem; font-weight: 800; color: var(--accent-dark); font-size: .9rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .hide-sm { display: none; }
  .cta { padding: 1.8rem 1.3rem; }
}
