/* ============================================================
   Cleenie — content system: sub-page nav, breadcrumbs, blog,
   article template, FAQ accordion, 404. Reuses tokens from
   cleenie.css (:root). Mobile-first, sharp, on-brand.
   ============================================================ */

/* ---------- Solid nav for content pages ---------- */
.nav.solid {
  position: sticky;
  background: rgba(250, 252, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(22, 54, 92, 0.07);
}
.nav .nav-links a.active { color: var(--blue-deep); }

/* mobile: collapse links, keep trial button */
@media (max-width: 860px) {
  .nav-cta .btn-ghost { display: none; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--blue-deep); }
.crumbs .sep { color: #c2d2e6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Generic page hero ---------- */
.page-hero {
  position: relative;
  padding: 116px 0 56px;
  background: linear-gradient(180deg, #f2f8ff, var(--bg));
  overflow: hidden;
}
.page-hero .shell { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 18px 0 16px;
  max-width: 760px;
}
.page-hero .lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
  text-wrap: pretty;
}
.page-hero .badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-top: 16px;
}

/* ---------- Blog index ---------- */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 40px;
}
.cat-pill {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.cat-pill:hover { border-color: #cfe2f6; color: var(--blue-deep); }
.cat-pill.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cfe2f6; }
.post-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
}
.post-cover svg { width: 54px; height: 54px; opacity: 0.95; position: relative; z-index: 2; }
.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 15%, rgba(255,255,255,0.28), transparent 45%);
}
.cover-guides { background: linear-gradient(135deg, #4a90e2, #2d6fc4); }
.cover-comparisons { background: linear-gradient(135deg, #5aa0e6, #3f7fbf); }
.cover-tips { background: linear-gradient(135deg, #57c690, #2c9e68); }
.post-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-cat {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-deep);
}
.post-card h3 {
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 10px 0 9px;
  text-wrap: balance;
}
.post-card p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); flex: 1; text-wrap: pretty; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #c2d2e6; }

/* ---------- Article ---------- */
.article {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 1fr;
  padding: 48px 0 20px;
}
.article > * { grid-column: 2; }
.article-shell { padding: 0 28px; }

.article-head { margin-bottom: 14px; }
.article-cat {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-deep);
}
.article h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 14px 0 18px;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 26px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.article-byline .ava {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6fb1f5, var(--blue));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
}
.article-byline b { color: var(--ink); font-weight: 600; }
.article-byline .sep { color: #c2d2e6; }

/* direct-answer summary box (AEO) */
.answer-box {
  background: linear-gradient(135deg, #f0f7ff, #eaf3fe);
  border: 1px solid #d6e6fb;
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 28px 0;
}
.answer-box .lbl {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-deep);
  display: block;
  margin-bottom: 8px;
}
.answer-box p { font-size: 16.5px; line-height: 1.6; color: var(--ink); margin: 0; text-wrap: pretty; }

/* table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
}
.toc h2 {
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
}
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 8px; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.4;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--blue);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--blue-deep); }

/* prose */
.prose { font-size: 17px; line-height: 1.75; color: var(--ink); }
.prose > p { margin: 0 0 20px; text-wrap: pretty; }
.prose h2 {
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 44px 0 16px;
  padding-top: 8px;
  scroll-margin-top: 90px;
  text-wrap: balance;
}
.prose h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  margin: 30px 0 12px;
  scroll-margin-top: 90px;
}
.prose a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--blue); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 4px; display: flex; flex-direction: column; gap: 11px; }
.prose li { padding-left: 28px; position: relative; line-height: 1.6; text-wrap: pretty; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--blue);
  transform: rotate(45deg);
}
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; }
.prose ol > li::before {
  content: counter(li);
  position: absolute;
  left: 0; top: 1px;
  width: 20px; height: 20px;
  background: var(--tint);
  color: var(--blue-deep);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.prose strong { font-weight: 600; color: var(--ink); }
.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--blue);
  font-size: 18px;
  color: var(--ink-soft);
  font-style: italic;
}

/* key takeaway callout */
.takeaway {
  background: #f6fbf8;
  border: 1px solid #cdeede;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 26px 0;
  display: flex;
  gap: 14px;
}
.takeaway .ic {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
}
.takeaway p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.takeaway b { color: var(--ink); }

/* stat cards (citable data) */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; } }
.stat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-box .n { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--blue-deep); }
.stat-box .l { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }

/* comparison table */
.table-wrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
table.compare th, table.compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.compare thead th { background: var(--tint); font-weight: 600; color: var(--ink); font-size: 13.5px; }
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare td:first-child { font-weight: 500; color: var(--ink); }
table.compare .yes { color: #2c9e68; font-weight: 600; }
table.compare .no { color: #c25151; }
table.compare .hl { background: #f3f9ff; }

/* in-article CTA block */
.cta-block {
  background: linear-gradient(150deg, #ecf5ff, #dbeafe);
  border: 1px solid #d2e4f9;
  border-radius: 20px;
  padding: 32px 30px;
  margin: 40px 0;
  text-align: center;
}
.cta-block h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; text-wrap: balance; }
.cta-block p { font-size: 15px; color: var(--ink-soft); margin-bottom: 20px; max-width: 460px; margin-left: auto; margin-right: auto; }

/* author bio end block */
.author-block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin: 36px 0;
}
.author-block .ava {
  width: 52px; height: 52px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #6fb1f5, var(--blue));
  color: #fff; font-weight: 600; font-size: 18px;
  display: grid; place-items: center;
}
.author-block .nm { font-size: 15px; font-weight: 600; }
.author-block .bio { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 4px; }

/* ---------- FAQ accordion ---------- */
.faq-section { padding: 84px 0; }
.faq-section.tint { background: linear-gradient(180deg, var(--bg), #f1f7fe 50%, var(--bg)); }
.faq-list { max-width: 760px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.prose .faq-list { margin-top: 20px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] { border-color: #cfe2f6; box-shadow: var(--shadow-md); }
.faq-q {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .chev {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--blue-deep);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.2s ease;
}
.faq-item[open] .faq-q .chev { transform: rotate(180deg); background: var(--blue); color: #fff; }
.faq-a { padding: 0 24px 22px; }
.faq-a p { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.faq-a p + p { margin-top: 12px; }
.faq-a a { color: var(--blue-deep); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faq-in 0.3s ease; }
}
@keyframes faq-in { from { transform: translateY(-6px); } to { transform: none; } }

/* ---------- Related posts ---------- */
.related { padding: 16px 0 84px; }
.related .post-grid { margin-top: 28px; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 140px 28px 80px;
}
.notfound .big {
  font-size: clamp(72px, 16vw, 150px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #6fb1f5, var(--blue-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 600; margin: 12px 0 12px; }
.notfound p { color: var(--ink-soft); font-size: 16px; max-width: 440px; margin: 0 auto 28px; line-height: 1.6; }
.notfound .links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* shared section heading for content pages */
.content-head { max-width: 680px; margin: 0 auto 8px; text-align: center; }
.content-head h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 12px 0 14px;
  text-wrap: balance;
}
.content-head p { color: var(--ink-soft); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
