/*
 * Clarity site styles shared by the blog, the legal pages and the 404 page.
 * Tokens match index.html. Fonts come from /fonts/fonts.css, loaded separately.
 *
 * Page chrome (.cl-nav, .cl-footer) and .cl-cta apply everywhere this file is
 * loaded. Everything that re-themes the old blog posts is scoped to body.cl-post
 * so it cannot leak into other pages.
 */

:root {
  --bg:        #E9EAE4;
  --panel:     #F2F3EE;
  --panel-2:   #E1E4DC;
  --primary:   #8A3B4C;
  --secondary: #3E6E7A;
  --text:      #1F2A29;
  --dark:      #16211F;
  --faint:     #979b95;
  --fb: 'Assistant', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fd: 'Noto Serif Hebrew', 'Assistant', Georgia, serif;
  --r: 6px;
  --r-sm: 3px;
  --sh-md: 0 6px 26px rgba(31,42,41,.10);
}

html { scroll-behavior: smooth; }
body.cl-page, body.cl-post, body.cl-blog {
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--fb) !important;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  opacity: 1 !important;
  animation: none !important;
}
.cl-wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── NAV ── */
.cl-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(233,234,228,.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,42,41,.14);
}
.cl-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.cl-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--fb); font-weight: 600; font-size: 16px; color: var(--dark); text-decoration: none; }
.cl-brand img { width: 26px; height: auto; display: block; }
.cl-brand span { color: var(--primary); }
.cl-nav-links { display: flex; align-items: center; gap: 22px; }
.cl-nav-links a { font-family: var(--fb); font-size: 15px; font-weight: 600; color: rgba(31,42,41,.75); text-decoration: none; }
.cl-nav-links a:hover { color: var(--primary); }
.cl-nav-links a.cl-btn, .cl-btn {
  display: inline-block; background: var(--primary); color: #fff !important;
  font-family: var(--fb); font-size: 14px; font-weight: 600; line-height: 1;
  padding: 11px 18px; border-radius: var(--r-sm); border: 0; text-decoration: none; cursor: pointer;
  transition: background .2s ease;
}
.cl-nav-links a.cl-btn:hover, .cl-btn:hover { background: #702f3d; color: #fff !important; }

/* ── FOOTER ── */
.cl-footer { border-top: 1px solid rgba(31,42,41,.12); background: var(--panel-2); padding: 36px 0; margin-top: 0; font-family: var(--fb); font-size: 14px; color: rgba(31,42,41,.62); }
.cl-footer a { color: inherit; text-decoration: none; }
.cl-footer a:hover { color: var(--primary); }
.cl-foot-grid { display: grid; grid-template-columns: auto auto; justify-content: space-between; align-items: center; row-gap: 16px; column-gap: 40px; }
.cl-foot-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--dark); font-size: 16px; }
.cl-foot-brand img { width: 24px; height: auto; }
.cl-foot-brand span { color: var(--primary); }
.cl-foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cl-foot-end { justify-self: end; text-align: right; }
.cl-foot-contact a { border-bottom: 1px solid rgba(31,42,41,.25); }
@media (max-width: 720px) {
  .cl-foot-grid { grid-template-columns: 1fr; justify-content: center; text-align: center; row-gap: 12px; }
  .cl-foot-grid > * { justify-self: center; text-align: center; }
  .cl-foot-links { justify-content: center; }
  .cl-nav-links a:not(.cl-btn) { display: none; }
}

/* ── CTA CARD (replaces the old offer cards inside posts) ── */
.cl-cta {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: var(--panel); border: 1px solid rgba(31,42,41,.16);
  border-radius: var(--r); box-shadow: var(--sh-md); padding: 34px 30px;
}
.cl-cta-tag { display: block; font-family: var(--fb); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--secondary); margin-bottom: 10px; }
.cl-cta h3 { font-family: var(--fd) !important; font-weight: 400 !important; font-size: clamp(22px, 3vw, 28px) !important; color: var(--dark) !important; line-height: 1.3; margin: 0 0 10px !important; }
.cl-cta p { color: rgba(31,42,41,.8) !important; margin: 0 0 20px !important; font-size: 16.5px !important; }
.cl-cta .cl-btn { padding: 15px 28px; font-size: 16px; }

/* ── SIMPLE PAGES (terms, 404) ── */
.cl-prose { max-width: 760px; margin: 0 auto; padding: 44px 24px 80px; font-size: 16.5px; }
.cl-prose h1 { font-family: var(--fd); font-weight: 400; font-size: clamp(30px, 5vw, 44px); line-height: 1.2; color: var(--dark); margin: 0 0 10px; letter-spacing: -.012em; }
.cl-prose h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(23px, 3.4vw, 30px); color: var(--dark); margin: 52px 0 6px; scroll-margin-top: 90px; letter-spacing: -.01em; }
.cl-prose h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin: 28px 0 8px; }
.cl-prose p { margin: 0 0 14px; }
.cl-prose ul, .cl-prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.cl-prose li { margin-bottom: 9px; }
.cl-prose strong { color: var(--dark); font-weight: 700; }
.cl-prose a { color: var(--secondary); border-bottom: 1px solid rgba(62,110,122,.4); text-decoration: none; }
.cl-prose a:hover { color: var(--primary); }
.cl-prose .cl-bar { width: 54px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); margin: 10px 0 22px; }
.cl-prose .cl-updated { font-size: 14px; color: rgba(31,42,41,.55); margin-bottom: 34px; }
.cl-prose .cl-box { background: var(--panel); border: 1px solid rgba(31,42,41,.16); border-radius: var(--r); padding: 20px 24px; margin: 22px 0; }
.cl-prose .cl-box.green { background: rgba(62,110,122,.08); border-color: rgba(62,110,122,.3); }
.cl-prose .cl-box p:last-child, .cl-prose .cl-box ul:last-child { margin-bottom: 0; }
.cl-prose .cl-note { font-size: 14.5px; color: rgba(31,42,41,.66); }
.cl-prose .cl-back { display: inline-block; font-size: 14.5px; font-weight: 700; margin-bottom: 30px; }

/* ═══════════════ BLOG POSTS: re-theme the old templates ═══════════════ */

body.cl-post h1, body.cl-post h2, body.cl-post h3, body.cl-post h4,
body.cl-post .display-4, body.cl-post .fw-bold {
  font-family: var(--fd) !important;
  font-weight: 400 !important;
  letter-spacing: -.012em;
  color: var(--dark);
}
body.cl-post strong, body.cl-post b { font-family: var(--fb); font-weight: 700; }
body.cl-post p, body.cl-post li { color: rgba(31,42,41,.88); font-size: 1.075rem; line-height: 1.8; }
body.cl-post .lead { font-size: 1.25rem; font-weight: 400; color: rgba(31,42,41,.78); opacity: 1; }
body.cl-post article a:not(.btn):not(.cl-btn):not(.share-button):not(.post-tag):not(.back-to-blog-fab):not(.author-cta) {
  color: var(--secondary); text-decoration: underline; text-decoration-color: rgba(62,110,122,.4); text-underline-offset: 3px;
}
body.cl-post article a:not(.btn):hover { color: var(--primary); }
body.cl-post img { max-width: 100%; height: auto; }
body.cl-post .text-muted { color: rgba(31,42,41,.6) !important; }
body.cl-post .bg-light { background: var(--panel) !important; }
body.cl-post .border, body.cl-post .rounded.border { border-color: rgba(31,42,41,.16) !important; }
body.cl-post blockquote { border-inline-start: 3px solid var(--primary); padding-inline-start: 18px; color: rgba(31,42,41,.8); font-family: var(--fd); }
body.cl-post #reading-progress { background: var(--primary) !important; }
body.cl-post section[style*="#fafafa"], body.cl-post section[style*="fafafa"] { background: var(--panel-2) !important; }

/* hero: Bootstrap family */
body.cl-post article > header.bg-dark {
  background: var(--panel-2) !important; color: var(--text) !important;
  border-bottom: 1px solid rgba(31,42,41,.12); padding-top: 3.5rem !important; padding-bottom: 2.5rem !important;
}
body.cl-post article > header.bg-dark .text-white,
body.cl-post article > header.bg-dark .lead { color: rgba(31,42,41,.78) !important; }
body.cl-post article > header.bg-dark h1 { color: var(--dark) !important; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.18; }
body.cl-post article > header.bg-dark .text-muted { color: rgba(31,42,41,.6) !important; font-size: .95rem; }

/* hero: "post-hero" family, which had no styles at all */
body.cl-post .post-hero { background: var(--panel-2); border-bottom: 1px solid rgba(31,42,41,.12); padding: 56px 0 40px; }
body.cl-post .post-hero .container { max-width: 760px; }
body.cl-post .post-breadcrumb { font-size: .88rem; margin-bottom: 1.4rem; color: rgba(31,42,41,.6); }
body.cl-post .post-breadcrumb a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(31,42,41,.2); }
body.cl-post .post-breadcrumb .separator { margin: 0 .45rem; color: var(--faint); }
body.cl-post .post-title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin: 0 0 .8rem; }
body.cl-post .post-subtitle { font-size: 1.15rem; color: rgba(31,42,41,.75); margin: 0 0 1.2rem; }
body.cl-post .post-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; color: rgba(31,42,41,.62); }
body.cl-post .post-meta-item { display: inline-flex; align-items: center; gap: 6px; }
body.cl-post .post-meta-item span { color: inherit; font-size: inherit; }

/* content card, tags, share */
body.cl-post .post-content-wrapper { background: var(--panel) !important; border-radius: var(--r) !important; box-shadow: var(--sh-md) !important; }
body.cl-post .post-image-caption { font-size: .9rem; color: rgba(31,42,41,.6); text-align: center; }
body.cl-post .post-tags-section, body.cl-post .post-share { border-top: 1px solid rgba(31,42,41,.14); margin-top: 2rem; padding-top: 1.5rem; }
body.cl-post .post-tags-title, body.cl-post .post-share-title { font-size: 1.05rem !important; font-family: var(--fb) !important; font-weight: 700 !important; }
body.cl-post .post-tags { display: flex; flex-wrap: wrap; gap: .6rem; }
body.cl-post .post-tag { font-family: var(--fb) !important; display: inline-block; background: var(--panel-2); color: var(--secondary) !important; border-radius: 999px; padding: 4px 14px; font-size: .85rem; text-decoration: none !important; }
body.cl-post .post-tag:hover { background: var(--secondary); color: #fff !important; }
body.cl-post .share-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; }
body.cl-post .share-button, body.cl-post .copy-link-button {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--panel) !important; color: var(--primary) !important; border: 1px solid rgba(138,59,76,.4) !important; text-decoration: none !important; cursor: pointer;
}
body.cl-post .share-button:hover, body.cl-post .copy-link-button:hover { background: var(--primary) !important; color: #fff !important; }
body.cl-post .back-to-blog-fab { background: var(--primary) !important; color: #fff !important; box-shadow: var(--sh-md) !important; }

/* Bootstrap components */
body.cl-post .btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--primary); --bs-btn-active-border-color: var(--primary); --bs-btn-active-color: #fff; }
body.cl-post .btn-outline-info, body.cl-post .btn-outline-success { --bs-btn-color: var(--secondary); --bs-btn-border-color: var(--secondary); --bs-btn-hover-bg: var(--secondary); --bs-btn-hover-border-color: var(--secondary); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--secondary); --bs-btn-active-border-color: var(--secondary); --bs-btn-active-color: #fff; }
body.cl-post .accordion { --bs-accordion-bg: var(--panel); --bs-accordion-color: var(--text); --bs-accordion-border-color: rgba(31,42,41,.16); --bs-accordion-btn-color: var(--dark); --bs-accordion-btn-bg: var(--panel); --bs-accordion-active-color: var(--dark); --bs-accordion-active-bg: var(--panel-2); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(138,59,76,.2); }
body.cl-post .accordion-button { font-family: var(--fb); font-weight: 700; }

/* author block: the old one was a dark gradient with inline styles */
body.cl-post .author-section { background: var(--panel-2) !important; }
body.cl-post .author-section::before { display: none !important; }
body.cl-post .author-section div[style*="backdrop-filter"],
body.cl-post .author-section .author-bio-card {
  background: var(--panel) !important; border: 1px solid rgba(31,42,41,.16) !important; box-shadow: var(--sh-md) !important; backdrop-filter: none !important;
}
body.cl-post .author-section h2, body.cl-post .author-section h3, body.cl-post .author-section h4,
body.cl-post .author-section p, body.cl-post .author-section span, body.cl-post .author-section li,
body.cl-post .author-section .author-name, body.cl-post .author-section .author-bio { color: var(--text) !important; }
body.cl-post .author-section .author-title, body.cl-post .author-section p[style*="64ffda"] { color: var(--secondary) !important; }
body.cl-post .author-section img { border-color: var(--panel-2) !important; }
body.cl-post .author-section a[style], body.cl-post .author-section .author-cta.primary {
  background: var(--primary) !important; color: #fff !important; border: 0 !important; box-shadow: none !important; text-decoration: none !important;
}
body.cl-post .author-section .author-cta.secondary { background: transparent !important; color: var(--primary) !important; border: 1px solid var(--primary) !important; }

/* gradient-filled text (the author name) must stay readable on the light background */
body.cl-post [style*="background-clip"], body.cl-post [style*="background-clip: text"] {
  background: none !important; -webkit-text-fill-color: var(--dark) !important; color: var(--dark) !important;
}

/* ═══════════════ BLOG LISTING ═══════════════ */
body.cl-blog .cl-blog-header { padding: 64px 0 36px; border-bottom: 1px solid rgba(31,42,41,.12); }
body.cl-blog .cl-blog-header h1 { font-family: var(--fd); font-weight: 400; font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -.012em; color: var(--dark); margin: 0 0 12px; }
body.cl-blog .cl-blog-header p { color: rgba(31,42,41,.72); font-size: 1.05rem; max-width: 560px; margin: 0; }
body.cl-blog .filter-row { padding: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.cl-blog .filter-btn { background: none; border: 1.5px solid rgba(31,42,41,.2); color: rgba(31,42,41,.7); font-family: var(--fb); font-size: .85rem; font-weight: 600; padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
body.cl-blog .filter-btn:hover { border-color: var(--primary); color: var(--primary); }
body.cl-blog .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
body.cl-blog .blog-grid { padding: 36px 0 80px; display: grid; grid-template-columns: 1fr; }
body.cl-blog .post-card { display: flex; flex-direction: column; gap: 8px; padding: 28px 0; border-bottom: 1px solid rgba(31,42,41,.14); }
body.cl-blog .post-card:first-child { border-top: 1px solid rgba(31,42,41,.14); }
body.cl-blog .post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.cl-blog .post-tag { display: inline-block; background: var(--panel-2); color: var(--secondary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; }
body.cl-blog .post-date, body.cl-blog .post-read { font-size: .82rem; color: var(--faint); }
body.cl-blog .post-title { font-family: var(--fd); font-size: 1.3rem; font-weight: 400; color: var(--dark); line-height: 1.3; text-decoration: none; }
body.cl-blog .post-card:hover .post-title { color: var(--primary); }
body.cl-blog .post-excerpt { font-size: 1rem; color: rgba(31,42,41,.78); line-height: 1.7; margin: 0; }
body.cl-blog .post-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .9rem; font-weight: 700; color: var(--primary); text-decoration: none; }
body.cl-blog .no-posts { padding: 60px 0; text-align: center; color: var(--faint); }
