/* Shapai blog + 404 pages (src/views/blog-*.html, 404.html). Shared tokens, header, footer, buttons and dialogs are copied from home.css so the site reads as one product. */

@font-face {
  font-family: 'Rubik Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Arimo');
  size-adjust: 103%;
  ascent-override: 90.8%;
  descent-override: 24.3%;
  line-gap-override: 0%;
}

:root {
  --brand: #1fbfc0;
  --deep: #0e7c86;
  --cream: #f3fbfb;
  --ink: #17252e;
  --butter: #f6c85f;
  --muted: #3e525a;
  --primary: #0e7c86; /* used by the legal modals' inline styles */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Rubik', 'Rubik Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.page {
  width: 100%;
  background: var(--cream);
  overflow-x: hidden;
}

.wrap {
  max-width: 1264px;
  margin: 0 auto;
  padding: 0 32px;
}

.stack-56 {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.stack-40 {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

h1,
h2,
h3 {
  margin: 0;
}

/* ---------- shared bits ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.15s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-deep {
  background: var(--deep);
  color: #fff;
}
.btn-butter {
  background: var(--butter);
  color: var(--ink);
  font-weight: 700;
}
.btn-lg {
  font-size: 18px;
  padding: 18px 32px;
}
.btn-butter.btn-lg {
  padding: 18px 36px;
}

.eyebrow {
  font-weight: 700;
  color: var(--deep);
  font-size: 16px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}

h2 {
  font-size: 42px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

/* ---------- header ---------- */
.site-header {
  max-width: 1264px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 48px;
  height: auto;
  object-fit: contain;
}
.brand-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--deep);
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-weight: 500;
  font-size: 16px;
}
.nav-a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
}
.nav-a:hover {
  color: var(--deep);
}
.btn-nav {
  padding: 12px 24px;
}


/* ---------- mascot (404) ---------- */
.mascot {
  position: relative;
  width: 300px;
}
/* 3D mascot: raster body + SVG eyes overlay (viewBox = image pixels, so it scales at every size) */
.mascot3d {
  position: relative;
  display: block;
}
.mascot3d img {
  display: block;
  width: 100%;
  height: auto;
  /* satin body: tones down the render's gloss (eyes are a separate SVG layer, unfiltered) */
  filter: saturate(0.88) contrast(0.94) brightness(0.99);
}
.mascot-art img {
  display: block;
  width: 100%;
  height: auto;
}
.mascot3d .m-eyes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}


/* ---------- footer + legal dialogs ---------- */
/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #e6eff2;
}
.footer-inner {
  max-width: 1264px;
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.footer-tag,
.footer-copy {
  font-size: 15px;
  color: #b3c4ca;
}
.footer-copy {
  font-size: 14px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
}
.footer-nav a,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
}
.link-btn {
  background: none;
  border: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.footer-nav a:hover,
.link-btn:hover {
  color: #fff;
  text-decoration: underline;
}
.socials {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
}
.footer-nav .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #b3c4ca;
}
.footer-nav .social:hover {
  color: #fff;
}
.site-footer :focus-visible {
  outline-color: #fff;
}

/* ---------- legal modals (ported from style.css) ---------- */
.modal {
  width: min(700px, calc(100% - 40px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
.modal-box {
  background: #fff;
  color: var(--ink);
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  max-height: 80dvh;
  border-radius: 24px;
  position: relative;
  padding: 40px;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-close {
  position: sticky;
  top: -24px;
  left: -24px;
  float: left;
  z-index: 100;
  background: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: -24px;
  margin-left: -24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}
.modal-close:hover {
  color: var(--deep);
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
.modal-box h2 {
  margin-bottom: 25px;
  font-size: 1.8rem;
  color: var(--deep);
  letter-spacing: 0;
}
.modal-content {
  font-size: 1rem;
  line-height: 1.8;
}
.modal-content h3 {
  margin: 20px 0 10px;
  font-size: 1.2rem;
}
.modal-box::-webkit-scrollbar {
  width: 8px;
}
.modal-box::-webkit-scrollbar-track {
  background: transparent;
}
.modal-box::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 10px;
}


/* ---------- animations ---------- */
.bounce {
  transform-origin: 50% 100%;
  animation: hop 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
/* squash on take-off and landing, stretch in the air */
@keyframes hop {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  8% {
    transform: translateY(0) scale(1.07, 0.9);
  }
  20% {
    transform: translateY(-22px) scale(0.95, 1.07);
  }
  32% {
    transform: translateY(0) scale(1.09, 0.88);
  }
  40% {
    transform: translateY(-7px) scale(0.98, 1.03);
  }
  48% {
    transform: translateY(0) scale(1.03, 0.97);
  }
  54% {
    transform: translateY(0) scale(1, 1);
  }
}
.float {
  animation: floaty 5s ease-in-out infinite;
}
.mascot3d[data-mood='calm'] .eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}
.eyes-track {
  transition: transform 0.2s ease-out;
}
/* curious (blog hero): occasional blink + slow gaze drift; the small post avatar stays static */
.blog-hero .mascot3d[data-mood='curious'] .eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 7s infinite;
}
.blog-hero .mascot3d[data-mood='curious'] .eyes-gaze {
  animation: gaze 9s ease-in-out infinite;
}
@keyframes gaze {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(16px, -10px);
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}

/* tablet: nav drops to its own row so the join button stays beside the logo */
@media (min-width: 641px) and (max-width: 951px) {
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .eyes-track {
    transition: none;
  }
  .float,
  .bounce,
  .mascot3d[data-mood] .eye,
  .blog-hero .mascot3d[data-mood='curious'] .eye,
  .blog-hero .mascot3d[data-mood='curious'] .eyes-gaze,
  .btn {
    animation: none;
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
  .modal-box {
    animation: none;
  }
  .faq-plus,
  .modal-close {
    transition: none;
  }
}

[id] {
  scroll-margin-top: 16px;
}

[id] {
  scroll-margin-top: 16px;
}

/* =====================================================================
   Blog-specific styles
   ===================================================================== */
:root {
  --line: #dce8ea;
  --mint: #cdeff0;
  --measure: 720px;
  --shadow: 0 8px 28px rgba(14, 124, 134, 0.1);
  --shadow-hover: 0 18px 44px rgba(14, 124, 134, 0.2);
}

/* clip (not hidden) so position: sticky keeps working for the filter bar and the TOC */
.page {
  overflow-x: clip;
}

.btn-ghost {
  background: #fff;
  color: var(--deep);
  border: 2px solid var(--deep);
  font-weight: 600;
}
.wa-ico {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

.blog-main,
.post-main {
  max-width: 1264px;
  margin: 0 auto;
  padding: 8px 32px 96px;
}

/* ---------- generated covers (shared by list cards, featured card, related cards) ---------- */
.post-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 400 / 220;
  background-color: var(--cv-bg);
  background-image: radial-gradient(var(--cv-dot) 1.6px, transparent 1.7px);
  background-size: 18px 18px;
}
.post-cover svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tone-brand {
  --cv-bg: #1fbfc0;
  --cv-dot: rgba(255, 255, 255, 0.32);
  --cv-a: rgba(255, 255, 255, 0.22);
  --cv-b: rgba(14, 124, 134, 0.28);
  --cv-ring: rgba(255, 255, 255, 0.7);
  --cv-ink: #0b6870;
}
.tone-butter {
  --cv-bg: #f6c85f;
  --cv-dot: rgba(255, 255, 255, 0.4);
  --cv-a: rgba(255, 255, 255, 0.32);
  --cv-b: rgba(224, 160, 30, 0.35);
  --cv-ring: rgba(255, 255, 255, 0.8);
  --cv-ink: #17252e;
}
.tone-mint {
  --cv-bg: #cdeff0;
  --cv-dot: rgba(14, 124, 134, 0.14);
  --cv-a: rgba(255, 255, 255, 0.7);
  --cv-b: rgba(31, 191, 192, 0.25);
  --cv-ring: rgba(14, 124, 134, 0.4);
  --cv-ink: #0e7c86;
}
.tone-deep {
  --cv-bg: #0e7c86;
  --cv-dot: rgba(255, 255, 255, 0.16);
  --cv-a: rgba(255, 255, 255, 0.12);
  --cv-b: rgba(23, 37, 46, 0.25);
  --cv-ring: rgba(255, 255, 255, 0.5);
  --cv-ink: #0e7c86;
}
.cv-a {
  fill: var(--cv-a);
}
.cv-b {
  fill: var(--cv-b);
}
.cv-ring {
  fill: none;
  stroke: var(--cv-ring);
  stroke-width: 2;
  stroke-dasharray: 6 9;
}
.cv-tile {
  fill: #fff;
  filter: drop-shadow(0 8px 12px rgba(23, 37, 46, 0.18));
}
.cover-ico {
  fill: none;
  stroke: var(--cv-ink);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cover-ico .fill {
  fill: var(--cv-ink);
  stroke: none;
}
.cover-ico .dots {
  stroke-width: 6;
}

.cat-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--mint);
  color: #0b5f67;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

/* ---------- blog list: hero ---------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 32px;
  background: linear-gradient(135deg, #fff 0%, #e2f6f6 100%);
  border-radius: 40px;
  padding: 56px 56px;
  margin-bottom: 28px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.blog-hero h1 {
  font-size: 46px;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -1px;
  text-wrap: balance;
}
.blog-hero p {
  margin: 0;
  font-size: 19px;
  color: var(--muted);
  max-width: 620px;
  text-wrap: pretty;
}
.blog-hero .btn {
  margin-top: 6px;
}
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.hero-disc,
.hero-ring {
  position: absolute;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}
.hero-disc {
  width: min(270px, 100%);
  background: var(--mint);
}
.hero-ring {
  width: min(330px, 100%);
  border: 2px dashed #8fd6d8;
}
.blog-hero .mascot {
  width: 180px;
}
.hero-chip {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(14, 124, 134, 0.16);
}
.hc-1 {
  top: 12%;
  left: 0;
  transform: rotate(-4deg);
}
.hc-2 {
  top: 40%;
  right: -4%;
  transform: rotate(3deg);
  background: var(--butter);
  font-weight: 700;
}
.hc-3 {
  bottom: 14%;
  left: -2%;
  transform: rotate(3deg);
}
.hc-4 {
  top: 2%;
  right: 12%;
  transform: rotate(2deg);
}

/* ---------- blog list: filters ---------- */
.blog-filters {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(14, 124, 134, 0.16);
  overflow-x: auto;
  scrollbar-width: none;
}
.blog-filters::-webkit-scrollbar {
  display: none;
}
.filter-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.filter-btn:hover {
  background: var(--mint);
}
.filter-btn.active {
  background: var(--deep);
  color: #fff;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.section-header::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to left, #bfe3e5, transparent);
}
.section-header h2 {
  font-size: 28px;
  letter-spacing: -0.5px;
}
.featured-posts {
  margin-bottom: 52px;
}
.category-section {
  margin-bottom: 48px;
}
#feed-container {
  transition: opacity 0.2s;
}

/* ---------- blog list: cards ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.post-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 18px;
}
.post-card h2 {
  font-size: 21px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.post-card:hover h2 a {
  color: var(--deep);
}
.post-card .excerpt {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.post-footer .date {
  font-size: 14px;
  color: #4b5c64;
}
.read-more {
  position: relative;
  z-index: 2;
  font-weight: 700;
  color: var(--deep);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.read-more:hover {
  text-decoration: underline;
}

/* featured: one large horizontal card that outranks the grid */
.featured-posts .posts-grid {
  grid-template-columns: 1fr;
}
.featured-posts .post-card {
  flex-direction: row;
  min-height: 340px;
  border-radius: 36px;
}
.featured-posts .post-cover {
  flex: 0 0 46%;
  aspect-ratio: auto;
}
.featured-posts .post-body {
  justify-content: center;
  gap: 16px;
  padding: 40px 44px 32px;
}
.featured-posts .post-card h2 {
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -0.5px;
}
.featured-posts .post-card .excerpt {
  font-size: 18px;
  -webkit-line-clamp: 4;
}
.featured-posts .post-footer {
  margin-top: 8px;
  border-top: 0;
  padding-top: 0;
}
.featured-posts .read-more {
  background: var(--deep);
  color: #fff;
  border-radius: 999px;
  padding: 0 24px;
}
.featured-posts .read-more:hover {
  text-decoration: none;
  background: #0b6870;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 24px;
  background: #fff;
  border-radius: 999px;
  font-weight: 600;
  color: var(--deep);
  box-shadow: var(--shadow);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.page-btn:hover {
  background: var(--deep);
  color: #fff;
  transform: translateY(-2px);
}
.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}
.page-info {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--mint);
  font-weight: 700;
  color: #0b5f67;
}

/* ---------- post page ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 848px);
  justify-content: center;
  gap: 32px;
  align-items: start;
}
.post-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border-radius: 36px;
  padding: 36px 64px 56px;
  box-shadow: var(--shadow);
}
.crumbs {
  order: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  color: #4b5c64;
  min-width: 0;
}
.crumbs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-weight: 600;
  color: var(--deep);
}
.crumbs a:hover {
  text-decoration: underline;
}
.crumbs .sep {
  flex: none;
  color: #8aa0a6;
}
.crumb-cur {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-cat {
  order: 1;
  margin-bottom: 14px;
}
.post-meta {
  order: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 0 0 22px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.author-av {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--mint);
  overflow: hidden;
}
.av-mascot {
  width: 38px;
}
.blog-date {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5c64;
}
.blog-author {
  order: -1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.read-time {
  margin-inline-start: auto;
  background: var(--cream);
  border: 1px solid #cfe9ea;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
  white-space: nowrap;
}
.read-time[hidden] {
  display: none;
}

/* The article's own <h1> becomes the header title: article is transparent to layout so its children
   can be ordered against the breadcrumb / tag / meta row without touching the DOM order. */
.article-body {
  display: contents;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  overflow-wrap: break-word;
}
.article-body > * {
  order: 4;
  min-width: 0;
}
.article-body > h1 {
  order: 2;
}
.article-body h1 {
  font-size: 44px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 22px;
  text-wrap: balance;
}
.article-body h2 {
  position: relative;
  padding-inline-start: 20px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 52px 0 18px;
}
.article-body h2::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(to bottom, var(--brand), var(--butter));
}
.article-body h3 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  margin: 32px 0 10px;
}
.article-body p {
  margin: 0 0 22px;
  text-wrap: pretty;
}
.article-body strong {
  font-weight: 700;
}
.article-body a {
  color: var(--deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: #8fd6d8;
  text-underline-offset: 4px;
}
.article-body a:hover {
  text-decoration-color: var(--deep);
}
.article-body ul,
.article-body ol {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.article-body li {
  position: relative;
  margin-bottom: 12px;
  padding-inline-start: 34px;
}
.article-body ul > li::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--mint);
}
.article-body ol {
  counter-reset: li;
}
.article-body ol > li {
  counter-increment: li;
  padding-inline-start: 46px;
}
.article-body ol > li::before {
  content: counter(li);
  position: absolute;
  inset-inline-start: 0;
  top: 0.28em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.article-body blockquote {
  position: relative;
  margin: 30px 0;
  padding: 22px 28px;
  background: linear-gradient(135deg, #fff8e3, #fff3d1);
  border-inline-start: 6px solid var(--butter);
  border-radius: 8px 24px 24px 8px;
  color: var(--ink);
  font-size: 19px;
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.article-body code {
  background: var(--cream);
  padding: 2px 8px;
  border-radius: 8px;
  direction: ltr;
  unicode-bidi: embed;
  font-size: 0.9em;
}

/* "בקצרה" / key takeaways callout */
.key-takeaways {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e6f8f8 0%, #f3fbfb 100%);
  border: 1px solid #bfe3e5;
  border-radius: 28px;
  padding: 24px 30px 10px;
  margin: 8px 0 32px;
}
.key-takeaways::after {
  content: '';
  position: absolute;
  top: -40px;
  inset-inline-end: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--butter);
  opacity: 0.28;
  pointer-events: none;
}
.key-takeaways > * {
  position: relative;
  z-index: 1;
}
.article-body .key-takeaways h3 {
  margin-top: 0;
  color: var(--deep);
}

/* FAQ section: classes are added by script, DOM text/structure untouched (FAQ JSON-LD reads it) */
.article-body .faq-q {
  margin: 14px 0 0;
  padding: 18px 26px 4px;
  font-size: 19px;
  background: var(--cream);
  border: 1px solid #cfe9ea;
  border-bottom: 0;
  border-inline-start: 5px solid var(--brand);
  border-radius: 22px 22px 0 0;
}
.article-body .faq-a {
  margin: 0;
  padding: 0 26px;
  font-size: 17px;
  color: var(--muted);
  background: var(--cream);
  border-inline: 1px solid #cfe9ea;
  border-inline-start: 5px solid var(--brand);
}
.article-body .faq-a-last {
  padding-bottom: 20px;
  border-bottom: 1px solid #cfe9ea;
  border-radius: 0 0 22px 22px;
}

/* tables */
.table-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.article-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}
.article-body th {
  background: var(--deep);
  color: #fff;
  padding: 15px 12px;
  text-align: center;
  font-weight: 700;
  vertical-align: middle;
}
.article-body td {
  padding: 13px 12px;
  text-align: center;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  background: #fff;
}
.article-body tbody tr:nth-child(even) td {
  background: #f3fbfb;
}
.article-body td:first-child,
.article-body th:first-child {
  text-align: start;
  font-weight: 700;
}
.article-body td:first-child {
  width: 28%;
}
.article-body td:last-child {
  background: #e6f8f8;
  font-weight: 600;
  color: var(--deep);
}
.article-body tbody tr:nth-child(even) td:last-child {
  background: #d9f2f3;
}

/* WhatsApp chat mockups (ported from the old style.css, restyled like the homepage phones) */
.article-body .whatsapp-container {
  max-width: 400px;
  margin: 32px auto;
  padding: 0;
}
.article-body .chat-label {
  text-align: center;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.article-body .whatsapp-chat {
  background: var(--ink);
  border-radius: 40px;
  padding: 10px;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: auto;
  line-height: 1.5;
  font-size: 15px;
}
.article-body .chat-header {
  background: var(--deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 31px 31px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}
.article-body .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
.article-body .avatar img {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}
.article-body .chat-body {
  background: #e4f1f1;
  border-radius: 0 0 31px 31px;
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-body .msg {
  font-size: 15px;
  line-height: 1.5;
  text-align: start;
  overflow-wrap: anywhere;
}
.article-body .msg.user {
  align-self: flex-end;
  max-width: 84%;
  background: #bfebec;
  border-radius: 20px 20px 6px 20px;
  padding: 9px 14px;
}
.article-body .msg.agent {
  align-self: flex-start;
  max-width: 90%;
  background: #fff;
  border-radius: 20px 20px 20px 6px;
  padding: 10px 14px;
}
.article-body .msg.agent.tip {
  background: #fff3d1;
}
.article-body .msg p {
  margin: 0 0 4px;
}
.article-body .msg-link {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
  max-width: 100%;
  color: var(--deep);
  text-decoration: underline;
  word-break: break-all;
}
.article-body .msg.user .msg-link {
  display: block;
  text-align: left;
}
.article-body .msg-time {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #55656c;
  direction: ltr;
  text-align: left;
}

/* ---------- after the article: related posts + CTA ---------- */
.post-after {
  max-width: 1140px;
  margin: 48px auto 0;
}
.related-posts {
  margin: 0 0 44px;
}
.related-title {
  font-size: 30px;
  margin-bottom: 22px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.related-card .post-cover {
  aspect-ratio: 400 / 190;
}
.related-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 22px 22px;
}
.related-card h3 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover h3 {
  color: var(--deep);
}
.related-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--deep);
}
.back-link:hover {
  text-decoration: underline;
}

/* CTA block (moved into the article by script, so it must beat .article-body rules) */
.cta-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 32px;
  background: linear-gradient(135deg, #0e7c86 0%, #0a5f68 100%);
  color: #fff;
  border-radius: 32px;
  padding: 32px 40px;
  margin: 44px 0;
  text-align: start;
  box-shadow: 0 16px 40px rgba(14, 124, 134, 0.28);
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -80px;
  inset-inline-end: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.cta-mascot {
  position: relative;
  flex: none;
  width: 132px;
  height: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}
.article-body .cta-mascot {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.cta-copy {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.cta-section h3,
.article-body .cta-section h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}
.cta-section p,
.article-body .cta-section p {
  margin: 0 0 12px;
  font-size: 17px;
  color: #e6f6f7;
  max-width: 460px;
}
.cta-section a.btn,
.article-body .cta-section a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.cta-section :focus-visible {
  outline-color: #fff;
}

/* ---------- table of contents (wide screens only) ---------- */
.toc {
  display: none;
}
@media (min-width: 1100px) {
  .post-layout:has(.toc:not([hidden])) {
    grid-template-columns: minmax(0, 848px) 260px;
  }
  .toc:not([hidden]) {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
  }
}
.toc-card {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 26px;
  padding: 22px 18px 16px;
  box-shadow: var(--shadow);
}
.toc-title {
  margin: 0 8px 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--deep);
}
.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc-list a {
  display: block;
  padding: 8px 12px;
  margin-bottom: 2px;
  border-inline-start: 3px solid var(--line);
  border-radius: 4px 12px 12px 4px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.toc-list a:hover {
  background: var(--cream);
  color: var(--deep);
}
.toc-list a.active {
  background: var(--cream);
  border-color: var(--brand);
  color: var(--deep);
  font-weight: 700;
}

/* ---------- 404 ---------- */
.nf {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 88px 24px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.nf .nf-code {
  margin: 0;
  font-weight: 700;
  color: var(--deep);
  font-size: 16px;
}
.nf h1 {
  font-size: 52px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  text-wrap: balance;
}
.nf .nf-desc {
  margin: 0;
  font-size: 20px;
  color: var(--muted);
  max-width: 520px;
  text-wrap: balance;
}
.nf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}
.guide-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.guide-chips a {
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s;
}
.guide-chips a:hover {
  background: var(--mint);
}

/* ---------- tablet ---------- */
@media (max-width: 1023px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blog-hero {
    padding: 40px 36px;
    grid-template-columns: 1.4fr 0.6fr;
  }
  .blog-hero h1 {
    font-size: 38px;
  }
  .hero-chip {
    display: none;
  }
  .hero-art {
    min-height: 220px;
  }
  .hero-disc {
    width: 190px;
  }
  .hero-ring {
    width: 232px;
  }
  .blog-hero .mascot {
    width: 130px;
  }
  .featured-posts .post-card h2 {
    font-size: 28px;
  }
  .featured-posts .post-body {
    padding: 28px 28px 22px;
  }
  .post-col {
    padding: 32px 40px 48px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 641px) and (max-width: 860px) {
  .featured-posts .post-card {
    flex-direction: column;
    min-height: 0;
  }
  .featured-posts .post-cover {
    flex: none;
    aspect-ratio: 400 / 190;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
    gap: 8px 12px;
  }
  .brand-logo {
    width: 40px;
  }
  .brand-name {
    font-size: 24px;
  }
  .btn-nav {
    padding: 10px 20px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 0;
    font-size: 14px;
    border-top: 1px solid var(--line);
    padding-top: 2px;
  }
  .nav-a {
    padding: 0 2px;
  }
  .btn-lg {
    font-size: 17px;
    padding: 16px 24px;
    text-align: center;
  }
  h2 {
    font-size: 30px;
  }
  .footer-inner {
    padding: 36px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .modal-close {
    margin-top: -20px;
    margin-left: -16px;
    top: -20px;
    left: -16px;
  }
  .modal-box {
    padding: 28px 20px;
    max-height: 85vh;
  }
  .modal-box h2 {
    font-size: 1.4rem;
  }

  .blog-main,
  .post-main {
    padding: 4px 14px 56px;
  }
  .blog-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 22px 32px;
    border-radius: 28px;
    margin-bottom: 20px;
  }
  .hero-art {
    order: -1;
    min-height: 140px;
    justify-content: flex-start;
  }
  .hero-disc {
    width: 128px;
  }
  .hero-ring {
    width: 150px;
  }
  .blog-hero .mascot {
    width: 98px;
    margin-inline-start: 15px;
  }
  .hero-chip {
    display: none;
  }
  .blog-hero h1 {
    font-size: clamp(28px, 8vw, 34px);
  }
  .blog-hero p {
    font-size: 17px;
  }
  .blog-hero .btn {
    width: 100%;
  }
  .blog-filters {
    top: 6px;
    margin-bottom: 28px;
    width: auto;
    border-radius: 24px;
  }
  .filter-btn {
    padding: 0 16px;
    font-size: 15px;
  }
  .section-header h2 {
    font-size: 24px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .post-cover {
    aspect-ratio: 400 / 175;
  }
  .featured-posts .post-card {
    flex-direction: column;
    min-height: 0;
    border-radius: 28px;
  }
  .featured-posts .post-cover {
    flex: none;
    aspect-ratio: 400 / 190;
  }
  .featured-posts .post-body {
    padding: 22px 24px 18px;
  }
  .featured-posts .post-card h2 {
    font-size: 25px;
  }
  .featured-posts .post-card .excerpt {
    font-size: 16px;
  }

  .post-col {
    padding: 22px 20px 36px;
    border-radius: 28px;
  }
  .article-body {
    font-size: 17px;
  }
  .article-body h1 {
    font-size: clamp(28px, 8vw, 34px);
  }
  .article-body h2 {
    font-size: 25px;
    margin-top: 40px;
  }
  .article-body h3 {
    font-size: 20px;
  }
  .read-time {
    margin-inline-start: 0;
  }
  .article-body table {
    font-size: 14px;
    min-width: 460px;
  }
  .article-body th:first-child,
  .article-body td:first-child {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -4px 0 8px rgba(23, 37, 46, 0.08);
  }
  .article-body th:first-child {
    background: var(--deep);
  }
  .article-body td:first-child {
    background: #fff;
  }
  .article-body tbody tr:nth-child(even) td:first-child {
    background: #f3fbfb;
  }
  .key-takeaways {
    padding: 20px 20px 6px;
  }
  .article-body .faq-q {
    padding: 16px 18px 2px;
    font-size: 18px;
  }
  .article-body .faq-a {
    padding: 0 18px;
    font-size: 16px;
  }
  .article-body .faq-a-last {
    padding-bottom: 16px;
  }
  .related-title {
    font-size: 24px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .cta-section {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
    border-radius: 26px;
    gap: 14px;
  }
  .cta-copy {
    align-items: center;
  }
  .cta-mascot {
    width: 108px;
  }
  .cta-section h3,
  .article-body .cta-section h3 {
    font-size: 22px;
  }

  .nf {
    padding: 56px 16px 64px;
  }
  .nf h1 {
    font-size: clamp(32px, 9.4vw, 40px);
  }
  .nf .nf-desc {
    font-size: 17px;
  }
  .nf-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .nf-actions .btn {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .related-card,
  .page-btn,
  .toc-list a {
    transition: none;
  }
  .post-card:hover,
  .related-card:hover,
  .page-btn:hover {
    transform: none;
  }
}

/* Lucide icons (inline SVG, no emoji) */
.lucide {
  flex: none;
}
.sec-ico {
  width: 28px;
  height: 28px;
  color: var(--brand);
}
.btn-ico {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-arrow {
  width: 20px;
  height: 20px;
}

/* yes/no marks inside post bodies (Lucide check / x) */
.mark-yes {
  color: var(--deep);
}
.mark-no {
  color: #9aa9b0;
}
