/* ==========================================================================
   Flukko website — blog article only
   Header · cover · answer box · figure · share · CTA · author · related · reading progress
   (contents list, prose, tables, FAQ and callouts come from style.css)
   ========================================================================== */

/* ---------- Header ---------- */
.post-hero { padding-bottom: 40px; }
.post-hero__inner { max-width: 920px; }
.post-hero h1 { max-width: none; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.1; }
.post-hero .page-hero__lead { max-width: 720px; }

.post-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.post-tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.2s;
}
a.post-tag:hover { background: var(--brand-100); color: var(--brand-700); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}
.post-meta__author { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.post-meta__author strong { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.post-meta__author small { display: block; font-size: 12.5px; }
.post-meta__avatar,
.author-box__avatar {
  flex: none;
  display: inline-flex;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand);
}
.post-meta__avatar { width: 36px; height: 36px; }
.post-meta__avatar img,
.author-box__avatar img { width: 100%; height: 100%; }
.post-meta__item { display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; }
.post-meta__item::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #b9c6d8; margin-right: 8px; }

/* ---------- Cover ---------- */
.post-cover { max-width: 1040px; margin-bottom: 56px; }
.post-cover img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ---------- Body ---------- */
.post { padding-top: 0; }
/* Let wide content (the comparison table scrolls in .table-wrap) shrink instead of widening the page on phones */
.post .legal__grid > * { min-width: 0; }
.post__body > section { scroll-margin-top: calc(var(--header-h) + 24px); }
.post__body h2 { font-size: clamp(23px, 2.5vw, 28px); }
.post__body ol:not(.step-list) { margin-top: 14px; padding-left: 22px; list-style: decimal; display: grid; gap: 8px; }

.answer-box {
  margin-bottom: 32px;
  padding: 26px 30px;
  border: 1px solid #cdeedb;
  border-left: 4px solid var(--wa);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f1fcf5, #f5f9ff);
}
.prose > .answer-box + .legal-summary,
.prose > section.answer-box { margin-top: 0; padding-top: 26px; border-top: 1px solid #cdeedb; }
.answer-box h2 { font-size: 18px; color: var(--wa-dark); }
.answer-box p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }

.post-figure { margin: 24px 0 0; }
.post-figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.post-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }

/* Comparison table: the first column names the feature */
.post__body table td:first-child { white-space: nowrap; }
.post__body table td:nth-child(3) { color: var(--ink-2); }

/* ---------- Share (in the contents column) ---------- */
.post-share { margin-top: 28px; }
.post-share__row { display: flex; gap: 8px; }
.post-share__row a,
.post-share__row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.post-share__row a:hover,
.post-share__row button:hover { border-color: var(--brand); color: var(--brand); }
.post-share__row svg { width: 17px; height: 17px; }
.post-share__row button.is-copied { border-color: var(--wa); background: #e8f9ef; color: var(--wa-dark); }

/* ---------- CTA + author ---------- */
.post-cta {
  position: relative;
  overflow: hidden;
  margin-top: 56px;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--bg-dark);
  color: #c6d2e4;
  isolation: isolate;
}
.post-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  right: -140px;
  top: -200px;
  border-radius: 50%;
  background: rgba(1, 107, 252, 0.5);
  filter: blur(70px);
}
.post-cta h2 { color: #fff; font-size: clamp(21px, 2.4vw, 26px); }
.post-cta p { margin-top: 10px; }
.post-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.prose .post-cta a { text-decoration: none; }

.author-box {
  display: flex;
  gap: 18px;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.author-box__avatar { width: 56px; height: 56px; }
.author-box p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.author-box p.author-box__name { margin-top: 0; color: var(--ink); font-size: 16px; font-weight: 700; }

/* ---------- Related articles ---------- */
.related-posts[hidden] { display: none; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.related-card:hover { border-color: #cfdbec; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.related-card .post-tag { align-self: flex-start; }
.related-card h3 { margin-top: 12px; font-size: 18px; line-height: 1.35; }
.related-card h3 a { color: var(--ink); }
.related-card h3 a::after { content: ""; position: absolute; inset: 0; }
.related-card p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.related-card time { margin-top: auto; padding-top: 16px; color: var(--muted); font-size: 13.5px; }
.related-posts__all { margin-top: 32px; text-align: center; }

/* ---------- Reading progress ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #3d8bff);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .related-grid { grid-template-columns: 1fr; }
  .post-share { padding: 0 18px 14px; }
}

@media (max-width: 640px) {
  .post-cover { margin-bottom: 36px; }
  .post-cover img { border-radius: var(--radius-lg); }
  .answer-box { padding: 20px; }
  .post-cta { padding: 26px 22px; }
  .post-cta__actions .btn { width: 100%; }
  .post__body table td:first-child { white-space: normal; }
  .author-box { flex-direction: column; }
}
