/* SommBot blog — article + index styling, reusing the site's design tokens */

.blog-hero { padding: 72px 0 28px; }
.blog-hero .eyebrow { color: var(--wine); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.blog-hero h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; margin: 10px 0 12px; }
.blog-hero p { color: var(--ink); max-width: 620px; font-size: 18px; line-height: 1.6; }

/* index grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; padding: 20px 0 80px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px; text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card .cluster-tag { align-self: flex-start; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--wine); background: var(--blush); border-radius: 999px; padding: 4px 11px; margin-bottom: 14px; }
.post-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.22; letter-spacing: -.01em; margin: 0 0 10px; }
.post-card p { color: var(--ink); font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.post-card .post-meta { margin-top: auto; color: var(--ink); font-size: 13px; }
.post-card .read-more { color: var(--wine); font-weight: 600; font-size: 14.5px; margin-top: 12px; }

/* article */
.post-wrap { max-width: 740px; margin: 0 auto; padding: 0 20px; }
.breadcrumb { font-size: 13.5px; color: var(--ink); padding: 30px 0 0; }
.breadcrumb a { color: var(--wine); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.post-head { padding: 18px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.post-head .cluster-tag { display: inline-block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--wine); background: var(--blush); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.post-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; }
.post-head .dek { font-size: 19px; line-height: 1.55; color: var(--ink); margin: 0 0 16px; }
.post-head .post-meta { font-size: 14px; color: var(--ink); margin-bottom: 8px; }

.post-body { font-size: 18px; line-height: 1.72; color: var(--ink); padding: 22px 0 8px; }
.post-body h2 { font-family: var(--font-display); font-weight: 600; font-size: 27px; line-height: 1.25; letter-spacing: -.01em; margin: 42px 0 14px; }
.post-body h3 { font-weight: 700; font-size: 20px; margin: 30px 0 10px; }
.post-body p { margin: 0 0 20px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 9px; }
.post-body a { color: var(--wine); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.post-body a:hover { color: var(--wine-bright); }
.post-body blockquote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--wine-rose); font-family: var(--font-display); font-size: 21px; line-height: 1.5; color: var(--wine-deep); }
.post-body strong { font-weight: 700; }

.post-faq { margin: 44px 0 8px; border-top: 1px solid var(--line); padding-top: 30px; }
.post-faq h2 { font-family: var(--font-display); font-weight: 600; font-size: 25px; margin: 0 0 16px; }
.post-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.post-faq summary { font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; float: right; color: var(--wine); font-weight: 400; }
.post-faq details[open] summary::after { content: "\2013"; }
.post-faq .faq-a { padding-top: 10px; color: var(--ink); line-height: 1.62; font-size: 16.5px; }

.post-cta { margin: 40px 0 10px; background: var(--blush); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px; text-align: center; }
.post-cta h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.post-cta p { color: var(--ink); margin: 0 auto 18px; max-width: 460px; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 46px 0 80px; border-top: 1px solid var(--line); padding-top: 22px; }
.post-nav a { color: var(--wine); text-decoration: none; font-weight: 600; font-size: 15px; max-width: 46%; }
.post-nav a:hover { text-decoration: underline; }
.post-nav .nx { text-align: right; margin-left: auto; }

/* in-article figures: diagrams + demo */
.post-figure { margin: 32px 0; }
.post-figure svg { display: block; width: 100%; height: auto; }
.post-figure figcaption { margin-top: 11px; font-size: 14px; color: var(--ink); text-align: center; line-height: 1.5; }
.post-figure figcaption a { color: var(--wine); }
.post-demo a { text-decoration: none; display: block; }
.post-demo img { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* homepage "From the blog" section */
.blog-latest .section-head { text-align: center; margin-bottom: 8px; }
.blog-latest-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); padding: 20px 0 0; }
.blog-latest-more { text-align: center; margin-top: 30px; }

@media (max-width: 640px) { .post-body { font-size: 17px; } .blog-hero { padding: 52px 0 20px; } }

/* category filter buttons on the blog index */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 30px; }
.blog-filters button {
  padding: 8px 18px; border-radius: 980px; font-size: 14px; font-weight: 600;
  border: 1.5px solid rgba(17, 17, 20, 0.14); color: var(--ink); background: #fff;
  cursor: pointer; transition: all 0.2s ease;
}
.blog-filters button:hover { border-color: var(--wine); color: var(--wine); }
.blog-filters button.on { background: var(--wine); border-color: var(--wine); color: #fff; }

/* "ask the sommelier" hook box at the top of consumer posts */
.post-hook {
  display: flex; align-items: center; gap: 16px;
  background: var(--blush); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 6px 0 30px; font-size: 15.5px; line-height: 1.5;
}
.post-hook .post-hook-ic { font-size: 24px; }
.post-hook b { display: block; }
.post-hook .btn { flex-shrink: 0; padding: 10px 20px; font-size: 14.5px; }
@media (max-width: 640px) { .post-hook { flex-direction: column; align-items: flex-start; } }

/* ---------- designed data tables (styled like a diagram card) ---------- */
.post-table { overflow-x: auto; margin: 30px 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: #fff; }
.post-body thead th { background: var(--wine); color: #fff; font-weight: 600; text-align: left; padding: 13px 16px; font-size: 13.5px; letter-spacing: .015em; white-space: nowrap; }
.post-body tbody td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); vertical-align: top; line-height: 1.45; }
.post-body tbody tr:nth-child(even) { background: var(--blush); }
.post-body tbody td:first-child { font-weight: 600; }
.post-body table + * { margin-top: 4px; }

/* ---------- table of contents (anchor menu) ---------- */
.post-toc { background: var(--blush); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px 20px; margin: 4px 0 32px; }
.post-toc .toc-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--wine); margin-bottom: 10px; }
.post-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.post-toc li { counter-increment: toc; margin: 7px 0; font-size: 15.5px; line-height: 1.4; padding-left: 30px; position: relative; }
.post-toc li::before { content: counter(toc); position: absolute; left: 0; top: 0; width: 21px; height: 21px; background: var(--wine); color: #fff; border-radius: 50%; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.post-toc a { color: var(--ink); text-decoration: none; }
.post-toc a:hover { color: var(--wine); text-decoration: underline; }
.post-body h2[id], .post-faq[id] { scroll-margin-top: 88px; }

/* ---------- back-to-top button ---------- */
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--wine); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; z-index: 60; border: none; cursor: pointer; }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--wine-bright); }
.back-to-top svg { width: 20px; height: 20px; stroke: #fff; }
