/* ============================================================
   TOPTUT — COMPONENTS
   Cards · Article body · Callouts · Code · Author bio
   Sidebar · Glass icons · Forms · Pagination · Hero · Tools
   ============================================================ */

/* ---------- Generic two-column shell ---------- */
.layout {
  max-width: var(--max-w); margin: 0 auto; padding: 48px;
  display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 52px;
}
.layout-narrow { max-width: 900px; margin: 0 auto; padding: 48px; }

/* ============================================================
   POST CARDS
   ============================================================ */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 62px; }
.post-card-big { grid-column: 1 / -1; }

.post-card, .post-card-big {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s, border-color 0.28s;
  position: relative;
}
.post-card-big { box-shadow: var(--shadow-md); }
.post-card::after { display: none; }
.post-card:hover, .post-card-big:hover {
  box-shadow: 0 18px 44px oklch(40% 0.06 285 / 0.16); transform: translateY(-5px); border-color: oklch(82% 0.09 285);
}
.card-img-wrap { position: relative; overflow: hidden; flex-shrink: 0; background: var(--bg-2); }
.card-img { width: 100%; object-fit: cover; display: block; transition: transform 0.55s var(--ease-out), filter 0.4s; }
.post-card-big .card-img { aspect-ratio: 16/7; }
.post-card .card-img { aspect-ratio: 16/9; }
.post-card-big .gen-thumb { aspect-ratio: 16/7; }
.post-card .gen-thumb { aspect-ratio: 16/9; }
.post-feature-img .frame .gen-thumb { aspect-ratio: auto; height: 100%; }
.card-img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(20% 0.06 270 / 0.5), transparent 50%);
  opacity: 0; transition: opacity 0.35s;
}
.post-card:hover .card-img, .post-card-big:hover .card-img { transform: scale(1.045); }
.post-card:hover .card-img-wrap::after, .post-card-big:hover .card-img-wrap::after { opacity: 1; }
/* hover "Read Article" pills removed for a cleaner, premium feel */
.card-read-pill { display: none !important; }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-card-big .card-body { padding: 26px 28px 24px; }
.card-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--purple); margin-bottom: 8px; font-family: var(--font-body); display: flex; align-items: center; gap: 8px; }
.card-read-time { font-size: 10px; color: var(--muted); font-weight: 500; background: var(--bg); border: 1px solid var(--border); padding: 2px 8px; border-radius: 100px; }
.card-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.4px;
  color: var(--navy); line-height: 1.34; flex: 1; transition: color 0.2s;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-big .card-title { font-size: 23px; -webkit-line-clamp: 3; margin-bottom: 10px; }
.post-card .card-title { font-size: 15.5px; -webkit-line-clamp: 3; margin-bottom: 8px; }
.post-card:hover .card-title, .post-card-big:hover .card-title { color: var(--purple); }
.card-excerpt { font-size: 13.5px; color: var(--muted); line-height: 1.62; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-author { font-size: 11px; color: var(--navy-mid); font-weight: 600; font-family: var(--font-body); }
.card-date { font-size: 11px; color: var(--muted); font-weight: 400; }
.card-sep { width: 3px; height: 3px; background: oklch(80% 0.02 285); border-radius: 50%; }

/* ---------- Article list ---------- */
.article-list { display: flex; flex-direction: column; }
.article-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 0;
  border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: padding 0.2s; position: relative;
}
.article-item:last-child { border-bottom: none; }
.article-item::before {
  content: ''; position: absolute; left: -16px; top: 0; bottom: 0; width: 3px;
  background: var(--grad-brand); transform: scaleY(0); transform-origin: top; transition: transform 0.3s ease;
}
.article-item:hover { padding-left: 10px; }
.article-item:hover::before { transform: scaleY(1); }
.article-item:hover .article-title { color: var(--purple); }
.article-img-wrap { width: 104px; min-width: 104px; height: 72px; overflow: hidden; border-radius: 11px; flex-shrink: 0; background: var(--bg-2); }
.article-img-wrap .gen-thumb { padding: 9px; aspect-ratio: auto; height: 100%; }
.article-img-wrap .gen-thumb-title { font-size: 10px; -webkit-line-clamp: 2; letter-spacing: -0.2px; }
.article-img-wrap .gen-thumb-mark .name { display: none; }
.article-img-wrap .gen-thumb-cat { display: none; }
.article-img-wrap .gen-thumb-mark { top: 8px; left: 9px; }
.article-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease, filter 0.3s; }
.article-item:hover .article-img { transform: scale(1.08); filter: brightness(0.92) saturate(1.1); }
.article-body { flex: 1; min-width: 0; }
.article-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); margin-bottom: 5px; font-family: var(--font-body); }
.article-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; letter-spacing: -0.3px; color: var(--navy); line-height: 1.35; margin-bottom: 6px; transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { font-size: 10.5px; color: var(--muted); font-family: var(--font-body); }

/* ============================================================
   AUTO-GENERATED FEATURED IMAGE (fallback)
   ============================================================ */
.gen-thumb {
  position: relative; width: 100%; height: 100%; aspect-ratio: 16/9;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--gt-a, oklch(46% 0.2 285)) 0%, var(--gt-b, oklch(54% 0.18 330)) 100%);
}
.gen-thumb::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(oklch(100% 0 0 / 0.07) 1px, transparent 1px), linear-gradient(90deg, oklch(100% 0 0 / 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 80% 10%, black, transparent 75%);
  mask-image: radial-gradient(ellipse 120% 90% at 80% 10%, black, transparent 75%);
}
.gen-thumb::after {
  content: ''; position: absolute; width: 60%; aspect-ratio: 1; right: -10%; top: -25%;
  background: radial-gradient(circle, oklch(100% 0 0 / 0.22), transparent 70%); filter: blur(6px);
}
.gen-thumb-mark { position: absolute; top: 16px; left: 18px; display: flex; align-items: center; gap: 7px; z-index: 2; }
.gen-thumb-mark .dot { width: 10px; height: 10px; border-radius: 3px; background: #fff; box-shadow: 0 0 12px oklch(100% 0 0 / 0.7); }
.gen-thumb-mark .name { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: -0.2px; opacity: 0.92; }
.gen-thumb-title { position: relative; z-index: 2; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.5px; line-height: 1.18; font-size: clamp(15px, 2vw, 22px); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gen-thumb-cat { position: relative; z-index: 2; font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-top: 8px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 26px; align-self: start; position: sticky; top: 98px; }
.sidebar-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.sidebar-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple); margin-bottom: 14px; font-family: var(--font-body); }
.search-wrap { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1.5px solid var(--border); border-radius: 11px; padding: 7px 8px 7px 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.search-wrap:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px oklch(48% 0.22 285 / 0.1); }
.search-input { flex: 1; border: none; background: transparent; font-family: var(--font-body); font-size: 13px; color: var(--navy); outline: none; min-width: 0; }
.search-input::placeholder { color: var(--muted); }
.search-btn { background: var(--purple); color: #fff; border: none; border-radius: 8px; padding: 7px 15px; font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.search-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-purple); }

.topic-list { display: flex; flex-direction: column; gap: 8px; }
.topic-item { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; text-decoration: none; color: inherit; transition: all 0.22s; position: relative; overflow: hidden; }
.topic-item::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, oklch(93% 0.05 285 / 0.5), transparent); transition: left 0.5s ease; }
.topic-item:hover::after { left: 100%; }
.topic-item:hover { border-color: oklch(80% 0.1 285); box-shadow: var(--shadow-sm); transform: translateX(3px); }
.topic-img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex-shrink: 0; transition: transform 0.25s; }
.topic-item:hover .topic-img { transform: scale(1.08); }
.topic-name { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--navy); transition: color 0.2s; letter-spacing: -0.2px; }
.topic-item:hover .topic-name { color: var(--purple); }
.topic-arrow { margin-left: auto; font-size: 13px; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.topic-item:hover .topic-arrow { transform: translateX(4px); color: var(--purple); }

/* Free Tools CTA card */
.tools-sidebar-card { background: var(--grad-brand); color: #fff; border: none; position: relative; overflow: hidden; }
.tools-sidebar-card::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(oklch(100% 0 0 / 0.06) 1px, transparent 1px), linear-gradient(90deg, oklch(100% 0 0 / 0.06) 1px, transparent 1px); background-size: 32px 32px; }
.tools-sidebar-card > * { position: relative; z-index: 1; }
.tools-sidebar-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; margin-bottom: 8px; }
.tools-sidebar-sub { font-size: 12.5px; opacity: 0.85; line-height: 1.55; margin-bottom: 16px; }
.tools-sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.tss { background: oklch(100% 0 0 / 0.15); border-radius: 10px; padding: 10px 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tss-num { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1; }
.tss-label { font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.78; margin-top: 4px; font-family: var(--font-body); }
.btn-sidebar { display: block; background: #fff; color: var(--purple); padding: 12px 20px; border-radius: 10px; text-align: center; font-family: var(--font-body); font-size: 13px; font-weight: 700; text-decoration: none; transition: all 0.22s; box-shadow: 0 4px 20px oklch(0% 0 0 / 0.18); }
.btn-sidebar:hover { transform: translateY(-2px); box-shadow: 0 8px 28px oklch(0% 0 0 / 0.26); }

/* ============================================================
   SINGLE POST  (unified width: head, feature & body share the
   content-column width; sidebar sticky alongside)
   ============================================================ */
.single { position: relative; }
.single-bg { position: absolute; top: 0; left: 0; right: 0; height: 600px; overflow: hidden; z-index: 0; pointer-events: none; }
.single-grid {
  position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto;
  padding: 52px 48px 96px; display: grid; grid-template-columns: minmax(0,1fr) 330px;
  gap: 56px; align-items: start;
}
.single-main { min-width: 0; }
.single.is-wide .single-grid { grid-template-columns: minmax(0,1fr); max-width: 940px; }
.single.is-wide .sidebar { display: none; }
.post-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 22px; font-weight: 500; }
.post-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.post-breadcrumb a:hover { color: var(--purple); }
.post-breadcrumb .sep { opacity: 0.5; }
.post-cat-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid oklch(83% 0.09 285); border-radius: 100px; padding: 6px 16px 6px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple);
  text-decoration: none; box-shadow: var(--shadow-sm);
}
.post-cat-badge .ico { width: 22px; height: 22px; border-radius: 7px; background: var(--grad-brand); display: flex; align-items: center; justify-content: center; }
.post-cat-badge .ico svg { width: 12px; height: 12px; stroke: #fff; fill: none; }
.post-title { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 50px); font-weight: 700; line-height: 1.12; letter-spacing: -1.6px; color: var(--navy); text-wrap: balance; margin-bottom: 20px; }
.post-deck { font-size: 18px; line-height: 1.7; color: var(--navy-mid); max-width: 680px; text-wrap: pretty; margin-bottom: 28px; }
.post-meta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 30px; }
.post-author-chip { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.post-author-chip .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow-sm); background: var(--bg-2); }
.post-author-chip .who { line-height: 1.3; }
.post-author-chip .who .name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--navy); letter-spacing: -0.2px; }
.post-author-chip .who .role { font-size: 11.5px; color: var(--muted); }
.meta-dot { width: 4px; height: 4px; border-radius: 50%; background: oklch(80% 0.02 285); }
.post-meta-bit { font-size: 12.5px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.post-meta-bit svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; }

.post-feature { position: relative; margin: 6px 0 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-xl); border: 1px solid var(--border); aspect-ratio: 16/8; background: var(--bg-2); }
.post-feature img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-feature .gen-thumb { padding: 38px; }
.post-feature .gen-thumb-title { font-size: clamp(22px, 3.4vw, 38px); -webkit-line-clamp: 4; }

/* Article body */
.prose { max-width: 100%; font-size: 17.5px; line-height: 1.88; color: oklch(28% 0.03 275); margin-top: 44px; }
.prose > * + * { margin-top: 1.6em; }
.prose p { text-wrap: pretty; }
.prose h2 { font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.25; color: var(--navy); margin-top: 2.2em; margin-bottom: 0.15em; scroll-margin-top: 96px; }
.prose h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.3; color: var(--navy); margin-top: 1.9em; scroll-margin-top: 96px; }
.prose h2 + p, .prose h3 + p { margin-top: 0.6em; }
.prose a { color: var(--purple); text-decoration: underline; text-decoration-color: oklch(80% 0.1 285); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.prose a:hover { text-decoration-color: var(--purple); }
.prose strong { color: var(--navy); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--purple); }
.prose img, .prose figure img { width: 100%; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.prose figure { margin-top: 1.8em; }
.prose figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 10px; }
.prose hr { border: none; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose blockquote { border-left: 3px solid var(--purple); padding: 6px 0 6px 24px; margin-left: 0; font-size: 19px; line-height: 1.7; color: var(--navy-mid); font-style: italic; }

/* inline code */
.prose code, code.inline { font-family: var(--font-mono); font-size: 0.86em; background: var(--purple-dim); color: oklch(40% 0.18 290); padding: 2px 7px; border-radius: 6px; border: 1px solid oklch(88% 0.05 290); white-space: nowrap; }
/* code block */
.prose pre, pre.wp-block-code { font-family: var(--font-mono); background: var(--ink); color: oklch(90% 0.02 285); border-radius: 14px; padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.62; box-shadow: var(--shadow-md); position: relative; border: 1px solid oklch(30% 0.04 280); }
.prose pre code, pre.wp-block-code code { background: none; border: none; padding: 0; color: inherit; white-space: pre; font-size: inherit; }
.code-wrap { position: relative; margin-top: 1.4em; }
.code-copy { position: absolute; top: 10px; right: 10px; z-index: 2; background: oklch(100% 0 0 / 0.1); color: oklch(90% 0.02 285); border: 1px solid oklch(100% 0 0 / 0.18); border-radius: 7px; padding: 5px 11px; font-size: 11px; font-weight: 600; font-family: var(--font-body); cursor: pointer; transition: all 0.18s; }
.code-copy:hover { background: oklch(100% 0 0 / 0.2); }

/* Key Takeaway callout */
.callout {
  position: relative; border-radius: 18px; padding: 26px 36px 26px 28px;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, oklch(94% 0.05 262 / 0.55), transparent 60%),
    var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid oklch(87% 0.05 280); box-shadow: var(--shadow-md), inset 0 1px 0 oklch(100% 0 0 / 0.7);
  margin: 0.4em 0;
}
.callout::before { content: ''; position: absolute; right: 14px; left: auto; top: 18px; bottom: 18px; width: 5px; border-radius: 100px; background: linear-gradient(180deg, oklch(54% 0.23 286), oklch(58% 0.2 248)); }
.callout-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 12px; letter-spacing: -0.2px; }
.callout-head .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-purple); }
.callout-head .ico svg { width: 16px; height: 16px; stroke: #fff; fill: none; }
.callout p { font-size: 14.5px; line-height: 1.62; color: var(--navy-mid); }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--navy); }

/* ============================================================
   AUTHOR BIO
   ============================================================ */
.author-bio {
  margin-top: 48px; border-radius: 22px; padding: 30px; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 130% at 0% 0%, oklch(94% 0.05 285 / 0.9), transparent 55%),
    radial-gradient(ellipse 70% 130% at 100% 100%, oklch(95% 0.04 250 / 0.9), transparent 55%),
    var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.author-bio::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: linear-gradient(oklch(50% 0.12 282 / 0.045) 1px, transparent 1px), linear-gradient(90deg, oklch(50% 0.12 282 / 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 100% 0%, black, transparent 70%);
  mask-image: radial-gradient(ellipse 90% 80% at 100% 0%, black, transparent 70%);
}
.author-bio > * { position: relative; z-index: 1; }
.author-bio-top { display: flex; gap: 22px; align-items: flex-start; }
.author-bio-avatar { width: 88px; height: 88px; border-radius: 20px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--bg-2); }
.author-bio-main { flex: 1; min-width: 0; }
.author-bio-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple); margin-bottom: 6px; }
.author-bio-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--navy); }
.author-bio-role { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.author-bio-desc { font-size: 14.5px; line-height: 1.65; color: var(--navy-mid); }
.author-bio-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.author-website { display: inline-flex; align-items: center; gap: 7px; background: var(--purple); color: #fff; font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 9px 16px; border-radius: 10px; transition: all 0.2s; box-shadow: var(--shadow-purple); }
.author-website:hover { transform: translateY(-2px); box-shadow: 0 8px 22px oklch(25% 0 0 / 0.15); }
.author-website svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.author-social { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--navy-mid); text-decoration: none; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.author-social:hover { color: #fff; background: var(--purple); border-color: var(--purple); }
.author-social svg { width: 16px; height: 16px; fill: currentColor; }

/* Related posts */
.related-wrap { margin-top: 16px; margin-bottom: 112px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ============================================================
   FORMS (contact)
   ============================================================ */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--navy); letter-spacing: -0.1px; }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 14.5px; color: var(--navy);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 11px;
  padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px oklch(48% 0.22 285 / 0.1); }
.field-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.form-status { padding: 13px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.form-status.ok { background: oklch(95% 0.06 150); color: oklch(40% 0.12 150); border: 1px solid oklch(85% 0.1 150); }
.form-status.err { background: oklch(95% 0.05 25); color: oklch(48% 0.16 25); border: 1px solid oklch(85% 0.09 25); }

/* ============================================================
   MICRO-INTERACTIONS (all transform/opacity — GPU cheap)
   ============================================================ */
.post-feature img { transition: transform 0.6s var(--ease-out); }
.post-feature:hover img { transform: scale(1.035); }
.post-cat-badge { transition: transform 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s; }
.post-cat-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: oklch(78% 0.1 282); }
.post-cat-badge .ico { transition: transform 0.25s var(--ease-spring); }
.post-cat-badge:hover .ico { transform: rotate(-6deg) scale(1.08); }
.sidebar-card { transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.sidebar-card:not(.tools-sidebar-card):hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tools-sidebar-card { transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.tools-sidebar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-author-chip .avatar { transition: transform 0.25s var(--ease-spring), box-shadow 0.25s; }
.post-author-chip:hover .avatar { transform: scale(1.06); box-shadow: var(--shadow-md); }
.post-author-chip:hover .who .name { color: var(--purple); }
.post-author-chip .who .name { transition: color 0.2s; }
.author-bio-avatar { transition: none; }
.related-grid .card-read-pill { display: none; }
.btn-ghost svg, .author-website svg, .go svg { transition: transform 0.2s var(--ease-out); }
.code-copy:active { transform: scale(0.94); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   PAGINATION + TAGS
   ============================================================ */
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 36px; }
.page-btn, .pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card); color: var(--navy-mid); font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.18s; }
.page-btn:hover, .pagination a.page-numbers:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-dim); }
.page-btn.active, .page-btn.current, .pagination .page-numbers.current { background: var(--purple); color: #fff; border-color: var(--purple); box-shadow: 0 2px 10px oklch(25% 0 0 / 0.14); }
.pagination .page-numbers.dots { border: none; background: none; }
.page-btn.wide { padding: 0 16px; }
.page-btn.dots { border: none; background: none; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.post-tag { font-size: 12px; font-weight: 600; color: var(--purple); background: var(--purple-dim); border: 1px solid oklch(88% 0.05 290); border-radius: 100px; padding: 5px 13px; text-decoration: none; transition: all 0.2s; }
.post-tag:hover { background: var(--purple); color: #fff; }

/* ============================================================
   GUTENBERG / WORDPRESS BLOCK COMPAT (inside .prose)
   ============================================================ */
.prose .wp-block-group { margin-top: 1.4em; }
.prose .wp-block-group.is-style-cs-about,
.prose .is-style-cs-about,
.prose .wp-block-group.is-style-default > .wp-block-group {
  position: relative; border-radius: 18px; padding: 24px 36px 24px 26px;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, oklch(94% 0.05 262 / 0.5), transparent 60%), var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid oklch(87% 0.05 280); box-shadow: var(--shadow-md), inset 0 1px 0 oklch(100% 0 0 / 0.7);
}
.prose .is-style-cs-about::before {
  content: ''; position: absolute; right: 14px; left: auto; top: 18px; bottom: 18px; width: 5px; border-radius: 100px; background: linear-gradient(180deg, oklch(54% 0.23 286), oklch(58% 0.2 248));
}
.prose .is-style-cs-about p:first-child { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--navy); }
.prose .is-style-cs-note {
  position: relative; border-radius: 14px; padding: 18px 20px 18px 22px;
  background: var(--bg-2); border: 1px solid var(--border); border-left: 4px solid var(--purple);
  font-size: 15px; color: var(--navy-mid);
}
.prose .is-style-cs-note strong { color: var(--navy); }
.prose .is-style-cs-stat { text-align: center; padding: 24px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border); }
.prose .is-style-cs-stat .cs-stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: -2px; margin: 0; background: linear-gradient(100deg, oklch(50% 0.25 286), oklch(54% 0.22 268), oklch(58% 0.2 244)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.prose .is-style-cs-stat .cs-stat-label { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.prose .is-style-cs-about > * + * { margin-top: 10px; }
.prose .is-style-cs-about p { font-size: 15px; }

.prose .wp-block-columns { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 1.6em; }
.prose .wp-block-column { flex: 1; min-width: 220px; }
.prose .wp-block-column h4 { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; color: var(--purple); text-transform: uppercase; margin-bottom: 10px; }
.prose .wp-block-column ul { padding-left: 1.2em; }
.prose .wp-block-column li { font-size: 15px; margin-top: 0.4em; }

.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.prose .wp-block-button__link, .prose .wp-element-button {
  display: inline-flex; align-items: center; gap: 8px; background: var(--purple); color: #fff !important;
  padding: 13px 24px; border-radius: 12px; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  text-decoration: none; box-shadow: var(--shadow-purple); transition: transform 0.2s, box-shadow 0.2s;
}
.prose .wp-block-button__link:hover, .prose .wp-element-button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px oklch(25% 0 0 / 0.16); }
.prose .wp-block-image.aligncenter, .prose figure.aligncenter { text-align: center; }
.prose .wp-block-image.is-resized img, .prose figure.is-resized img { width: auto; box-shadow: none; border: none; }
.prose .has-text-align-center { text-align: center; }
.prose .wp-block-separator { max-width: 100%; }
/* Tables (good for wide technical posts) */
.prose .wp-block-table, .prose figure.wp-block-table { overflow-x: auto; margin-top: 1.7em; border-radius: 13px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0; background: var(--card); }
.prose th, .prose td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--purple-dim); color: var(--navy); font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: -0.2px; }
.prose tbody tr:nth-child(even) { background: var(--bg-2); }
.prose tbody tr:last-child td { border-bottom: none; }
.prose .wp-block-list { padding-left: 1.4em; }

/* ============================================================
   PREMIUM SINGLE-POST POLISH (SaaS / AI editorial)
   ============================================================ */
.post-cat-badge { background: var(--card); border-color: var(--border); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: none; backdrop-filter: none; }
.post-meta-row { border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.post-feature { border-radius: 24px; box-shadow: 0 30px 64px oklch(38% 0.05 285 / 0.20); }
.post-feature::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.45), inset 0 0 0 1px oklch(100% 0 0 / 0.06); }
/* Lead paragraph — editorial lift on the first prose paragraph */
.prose > p:first-of-type { font-size: 19.5px; line-height: 1.7; color: var(--navy-mid); }
.prose > p:first-of-type strong { color: var(--navy); }

@media (max-width: 1024px) {
  .layout, .single-grid { grid-template-columns: 1fr; gap: 40px; }
  .single.is-wide .single-grid { max-width: 760px; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .layout, .layout-narrow { padding: 32px 20px 60px; }
  .single-grid { padding: 36px 20px 70px; }
  .featured-grid { grid-template-columns: 1fr; }
  .prose { font-size: 16.5px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sidebar { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-bio-top { flex-direction: column; }
  .post-feature { aspect-ratio: 16/10; }
}
