/* ============================================================================
   نهنگ مهاجر — وبلاگ (/blog)
   ----------------------------------------------------------------------------
   Design tokens mirrored 1:1 from web/src/styles/tokens.css & site/assets/styles.css.
   If tokens ever disagree, web/src/styles/tokens.css is the source of truth.

   Conventions:
   - RTL-native logical properties throughout (except physical transform).
   - WCAG AA contrast preserved (--muted #786C7D, --grad-strong #926899 -> #7A4F82).
   - Dana variable body (17px, line-height 2, ss02 Persian numerals), Morabba display.
   - Zero emojis in UI chrome; Phosphor 256-viewBox inline SVGs only.
   ========================================================================= */

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaVF.woff2') format('woff2-variations');
  font-weight: 10 990;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Morabba';
  src: url('../fonts/Morabba-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Morabba';
  src: url('../fonts/Morabba-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'Morabba', 'Dana', system-ui, sans-serif;
  --font-text: 'Dana', system-ui, sans-serif;

  --primary: #C5A1CB;
  --primary-light: #E8D5EC;
  --primary-lighter: #F3EAF5;
  --primary-dark: #9B6FA3;
  --primary-darker: #7A4F82;

  --bg: #FAFAFE;
  --surface: #FFFFFF;
  --surface-2: #F8F4FA;
  --text: #2D1F33;
  --text-2: #6B5A72;
  --muted: #786C7D;
  --border: #E8DEF0;
  --border-light: #F0E8F4;

  --grad-strong: linear-gradient(135deg, #926899 0%, #7A4F82 100%);

  --warn-bg: #FDF8EC;
  --warn-border: #F0DFB4;
  --warn-text: #8A6A32;
  --ok: #2E7D5B;

  --shadow-sm: 0 2px 8px rgba(155, 111, 163, .08);
  --shadow-md: 0 4px 20px rgba(155, 111, 163, .12);
  --shadow-lg: 0 10px 40px rgba(155, 111, 163, .16);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --wrap: 1120px;
  --measure: 760px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 2;
  letter-spacing: 0;
  font-feature-settings: "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: 0; margin: 0; }
p { margin: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }

:where(a, button, summary, input):focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4.5vw, 40px);
}
.wrap-narrow { max-width: var(--measure); }

.i { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; display: block; }
[dir="rtl"] .i-dir { transform: scaleX(-1); }

/* ---------- buttons (matches site/assets/styles.css) ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn .i { font-size: 1.12em; }

.btn-primary {
  background: var(--grad-strong);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0); }

.btn-lg { min-height: 56px; padding-inline: 30px; font-size: 1.06rem; }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .9rem; }

.btn-ghost {
  min-height: 42px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-darker);
  font-size: .92rem;
}
.btn-ghost:hover { background: var(--primary-lighter); border-color: var(--primary-light); }

@media (max-width: 430px) {
  .btn { white-space: normal; text-align: center; }
}

/* ---------- sticky header (.topbar) ---------------------------------------- */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: rgba(250, 250, 254, .86);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--border-light);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { border-radius: 22%; display: block; flex-shrink: 0; }
.brand-name { font-size: 1.06rem; color: var(--text); }
.brand-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--border);
  margin-inline: 2px;
}
.brand-sub {
  font-family: var(--font-text);
  font-size: .84rem;
  font-weight: 600;
  color: var(--primary-darker);
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
}

.topbar-nav {
  display: none;
  align-items: center;
  gap: 6px;
}
.topbar-nav a {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background-color .16s, color .16s;
}
.topbar-nav a:hover { background: var(--surface-2); color: var(--text); }
.topbar-nav a.is-active {
  background: var(--primary-lighter);
  color: var(--primary-darker);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-cta { min-height: 40px; padding: 6px 16px; font-size: .88rem; white-space: nowrap; }
@media (max-width: 520px) {
  .topbar-cta-ext { display: none; }
  .topbar-cta { padding: 6px 14px; font-size: .86rem; }
  .brand-name { font-size: .98rem; }
  .brand-sub { font-size: .78rem; padding: 2px 8px; }
}

.nav-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-darker);
  font-size: 20px;
}

@media (min-width: 820px) {
  .topbar-nav { display: flex; }
  .nav-toggle { display: none; }
}

.mobile-drawer {
  display: none;
  border-block-start: 1px solid var(--border-light);
  background: var(--surface);
  padding: 14px clamp(18px, 4.5vw, 40px) 18px;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer nav { display: grid; gap: 6px; }
.mobile-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface-2);
}
.mobile-drawer a.is-active {
  background: var(--primary-lighter);
  color: var(--primary-darker);
  font-weight: 700;
}
.mobile-drawer .btn { margin-block-start: 10px; width: 100%; }

/* ---------- blog hero & filters -------------------------------------------- */
.blog-hero {
  position: relative;
  padding-block: clamp(44px, 7vw, 76px) clamp(32px, 5vw, 52px);
  overflow: hidden;
  border-block-end: 1px solid var(--border-light);
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset-block-start: -35%;
  inset-inline: -10%;
  block-size: 145%;
  background:
    radial-gradient(ellipse 60% 55% at 50% 18%, rgba(197, 161, 203, .28), transparent 70%),
    radial-gradient(ellipse 40% 42% at 84% 10%, rgba(155, 111, 163, .12), transparent 70%);
  pointer-events: none;
}
.blog-hero-in { position: relative; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-block-end: 18px;
  padding: 6px 16px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: .84rem;
  font-weight: 600;
  color: var(--primary-darker);
}

.blog-hero h1 {
  margin: 0 auto 16px;
  max-width: 24ch;
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: balance;
}
.blog-hero h1 em {
  display: block;
  font-style: normal;
  background: linear-gradient(135deg, #9B6FA3 0%, #7A4F82 65%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-lead {
  margin: 0 auto;
  max-width: 60ch;
  font-size: clamp(.98rem, 2.2vw, 1.08rem);
  line-height: 2;
  color: var(--text-2);
}

/* Search bar (mirrors .composer visual polish) */
.blog-search {
  margin: 26px auto 0;
  max-width: 540px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
}
.blog-search:focus-within { border-color: var(--primary); box-shadow: var(--shadow-md); }
.blog-search-ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}
.blog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 6px 4px;
  font-size: 16px;
  color: var(--text);
}
.blog-search input:focus { outline: none; }
.blog-search input::placeholder { color: var(--muted); }
.blog-search button {
  min-height: 38px;
  padding-inline: 18px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
  color: var(--primary-darker);
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color .16s, color .16s;
}
.blog-search button:hover { background: var(--grad-strong); color: #fff; }

/* Category chips */
.cat-chips {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}
.cat-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 16px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: border-color .16s, background-color .16s, color .16s, transform .16s var(--ease);
}
.cat-chips a:hover {
  border-color: var(--primary);
  background: var(--surface-2);
  color: var(--primary-darker);
  transform: translateY(-1px);
}
.cat-chips a.is-active {
  background: var(--grad-strong);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ---------- archive bands & featured post ---------------------------------- */
.blog-section { padding-block: clamp(36px, 6vw, 60px); }
.blog-section-tint { background: var(--surface-2); border-block: 1px solid var(--border-light); }

.section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-block-end: 24px;
}
.section-bar h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--primary-darker);
}
.section-count {
  font-size: .86rem;
  color: var(--muted);
}

/* Featured lead card */
.mw-featured {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
@media (min-width: 860px) {
  .mw-featured { grid-template-columns: 1.05fr 1.25fr; }
}
@media (hover: hover) {
  .mw-featured:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}

.mw-featured-visual {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 3vw, 32px);
  background:
    radial-gradient(ellipse 85% 75% at 15% 15%, rgba(197, 161, 203, .38), transparent 68%),
    linear-gradient(150deg, #F3EAF5 0%, #E8D5EC 100%);
  border-block-end: 1px solid var(--border-light);
}
@media (min-width: 860px) {
  .mw-featured-visual { border-block-end: 0; border-inline-end: 1px solid var(--border-light); }
}
.mw-featured-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.mw-featured-visual.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 31, 51, .28) 0%, rgba(45, 31, 51, .52) 100%);
  z-index: 1;
  pointer-events: none;
}
.mw-featured-badges {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mw-featured-chat-teaser {
  position: relative;
  z-index: 2;
  margin-block-start: 22px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.mw-teaser-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary-darker);
}
.mw-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  flex-shrink: 0;
}
.mw-teaser-q {
  display: inline-block;
  padding: 8px 13px;
  border-radius: var(--r-md);
  border-start-start-radius: 4px;
  background: var(--grad-strong);
  color: #fff;
  font-size: .86rem;
  line-height: 1.75;
}
.mw-teaser-hint {
  margin-block-start: 8px;
  font-size: .8rem;
  color: var(--text-2);
  line-height: 1.7;
}

.mw-featured-body {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.6vw, 38px);
}
.mw-featured-body h2 {
  margin-block: 10px 12px;
  font-size: clamp(1.32rem, 3vw, 1.8rem);
  line-height: 1.55;
  color: var(--text);
}
.mw-featured-body h2 a { text-decoration: none; }
.mw-featured-body h2 a:hover { color: var(--primary-darker); }
.mw-featured-excerpt {
  color: var(--text-2);
  font-size: .98rem;
  line-height: 1.95;
  margin-block-end: 20px;
}
.mw-featured-foot {
  margin-block-start: auto;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badges & meta */
.mw-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--r-full);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.8;
  text-decoration: none;
  background: var(--primary-lighter);
  color: var(--primary-darker);
  border: 1px solid var(--primary-light);
}
.mw-pill-chat {
  background: var(--surface);
  color: var(--primary-darker);
  border-color: var(--border);
}
.mw-pill-chat .i { font-size: 13px; }

.mw-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: .82rem;
  color: var(--muted);
}
.mw-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.mw-meta-item .i { font-size: 14px; color: var(--primary-dark); }

.mw-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  color: var(--primary-darker);
  text-decoration: none;
}
.mw-read-link .i { transition: transform .18s var(--ease); }
.mw-read-link:hover .i { transform: translateX(-3px) scaleX(-1); }

/* ---------- article card grid (equal height, zero ragged bottom) ----------- */
.mw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 680px) { .mw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .mw-grid { grid-template-columns: repeat(3, 1fr); } }

.mw-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
@media (hover: hover) {
  .mw-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
}

.mw-card-cover {
  position: relative;
  height: 152px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-block-end: 1px solid var(--border-light);
  overflow: hidden;
}
.mw-card-cover--v1 { background: linear-gradient(145deg, #F6EFF8 0%, #EBD9EE 100%); }
.mw-card-cover--v2 { background: linear-gradient(145deg, #F3ECF6 0%, #E5D4EA 100%); }
.mw-card-cover--v3 { background: linear-gradient(145deg, #F8F3FA 0%, #EDE1F1 100%); }
.mw-card-cover--v4 { background: linear-gradient(145deg, #F5EEF7 0%, #E7D5EC 100%); }
.mw-card-cover--v5 { background: linear-gradient(145deg, #F7F1F9 0%, #EBDCEE 100%); }

.mw-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.mw-card-cover.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 31, 51, .22) 0%, rgba(45, 31, 51, .62) 100%);
  z-index: 1;
  pointer-events: none;
}
.mw-card-cover-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mw-card-cover-ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}
.mw-card-cover-kicker {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  color: var(--primary-darker);
  opacity: .88;
}
.mw-card-cover.has-img .mw-card-cover-kicker {
  color: #fff;
  opacity: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.mw-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 18px;
}
.mw-card-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
  margin-block-end: 10px;
}
.mw-card-body h3 a { text-decoration: none; }
.mw-card-body h3 a:hover { color: var(--primary-darker); }

.mw-card-excerpt {
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.9;
  margin-block-end: 16px;
}

.mw-card-chat-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-block-end: 16px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  font-size: .8rem;
  line-height: 1.7;
  color: var(--text-2);
}
.mw-card-chat-line .i {
  color: var(--primary-dark);
  font-size: 15px;
  margin-block-start: 4px;
}

.mw-card-foot {
  margin-block-start: auto;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
  color: var(--muted);
}

/* ---------- archive mid-page conversion strip ------------------------------ */
.mw-archive-cta {
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #fff 0%, var(--primary-lighter) 100%);
  border: 1px solid var(--primary-light);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 20px;
  align-items: center;
}
@media (min-width: 860px) {
  .mw-archive-cta { grid-template-columns: 1.35fr auto; }
}
.mw-archive-cta h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: var(--primary-darker);
  margin-block-end: 8px;
}
.mw-archive-cta p { color: var(--text-2); font-size: .96rem; max-width: 58ch; }
.mw-starter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 14px;
}
.mw-starter-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--primary-darker);
  text-decoration: none;
  transition: border-color .16s, background-color .16s, transform .16s var(--ease);
}
.mw-starter-chips a:hover { border-color: var(--primary); background: var(--surface-2); transform: translateY(-1px); }

/* ---------- single article header & breadcrumbs ---------------------------- */
.mw-article-head {
  padding-block: clamp(26px, 4vw, 44px) clamp(24px, 4vw, 34px);
  background:
    radial-gradient(ellipse 65% 70% at 50% 0%, rgba(197, 161, 203, .22), transparent 72%),
    var(--bg);
  border-block-end: 1px solid var(--border-light);
}
.mw-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-block-end: 16px;
  font-size: .82rem;
  color: var(--muted);
}
.mw-crumbs a { text-decoration: none; color: var(--text-2); }
.mw-crumbs a:hover { color: var(--primary-darker); text-decoration: underline; }
.mw-crumbs-sep { opacity: .5; }

.mw-article-title {
  margin-block: 12px 14px;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: balance;
}
.mw-article-lead {
  color: var(--text-2);
  font-size: clamp(.98rem, 2.2vw, 1.08rem);
  line-height: 2;
  margin-block-end: 18px;
}

/* ---------- single post 2-column reading grid ------------------------------ */
/* Soft tinted lavender canvas behind the white reading sheet & sidebar cards so
   the article body sits on its own clean paper surface rather than blending into
   the outer background. */
.mw-single-wrap {
  padding-block: clamp(26px, 4vw, 42px) clamp(48px, 7vw, 76px);
  background: #F3EEF7;
  border-block-end: 1px solid var(--border-light);
}
.mw-single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
@media (min-width: 1040px) {
  .mw-single-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
  }
}
.mw-single-main { min-width: 0; }

/* Distinct white paper container for the article's featured image + prose */
.mw-article-sheet {
  padding: clamp(20px, 3.8vw, 40px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Featured image inside the article sheet */
.mw-article-hero-figure {
  margin: 0 0 clamp(22px, 3.5vw, 32px);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.mw-article-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}
.mw-article-hero-figure figcaption {
  padding: 10px 16px;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  border-block-start: 1px solid var(--border-light);
}

/* ============================================================================
   ★ TOP-OF-POST CHATBOT PREVIEW CARD (the core conversion hook)
   Mirrors app.migrantwhale.com Message.jsx + site/index.html .demo-card
   ========================================================================= */
.mw-chat-card {
  margin-block-end: clamp(28px, 4.5vw, 42px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mw-chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px clamp(16px, 3vw, 24px);
  background: var(--surface-2);
  border-block-end: 1px solid var(--border-light);
}
.mw-chat-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mw-chat-head-text { min-width: 0; flex: 1; }
.mw-chat-head-name {
  display: block;
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.mw-chat-head-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}
.mw-chat-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
  border: 1px solid var(--primary-light);
  color: var(--primary-darker);
  font-size: .75rem;
  font-weight: 700;
}
@media (max-width: 460px) {
  .mw-chat-badge { display: none; }
}

.mw-chat-body {
  padding: clamp(18px, 3.2vw, 28px);
}

/* User's question bubble — exact RTL geometry from .demo-q & .msg.user .bubble */
.mw-chat-user-row {
  display: flex;
  justify-content: flex-start;
  margin-block-end: 18px;
}
.mw-chat-user {
  max-width: min(92%, 580px);
  padding: 12px 18px;
  border-radius: var(--r-lg);
  border-start-start-radius: 5px;
  background: var(--grad-strong);
  color: #fff;
  font-size: .98rem;
  line-height: 1.85;
  box-shadow: var(--shadow-sm);
}

/* Collapsible «منابع بررسی‌شده» drawer (matches .thinking-head in app.css) */
.mw-thinking {
  margin-block-end: 18px;
}
.mw-thinking summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  font-size: .82rem;
  cursor: pointer;
  transition: background-color .16s, border-color .16s;
}
.mw-thinking summary::-webkit-details-marker { display: none; }
.mw-thinking summary:hover { background: var(--primary-lighter); border-color: var(--primary-light); }
.mw-thinking-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--primary-light);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.mw-thinking-title { font-weight: 600; color: var(--text); }
.mw-thinking-hint { margin-inline-start: auto; font-size: .74rem; color: var(--muted); }
.mw-thinking-caret {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  transition: transform .2s var(--ease);
}
.mw-thinking[open] .mw-thinking-caret { transform: rotate(180deg); }

.mw-thinking-panel {
  margin-block-start: 8px;
  padding: 10px 14px;
  border-inline-start: 2px solid var(--border);
  display: grid;
  gap: 8px;
  font-size: .84rem;
  color: var(--text-2);
}
.mw-thinking-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mw-thinking-row .i { color: var(--primary-darker); font-size: 15px; }

/* Bot answer sections (exact .part-head & .wrapup from app.css) */
.mw-part-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-block-end: 10px;
}
.mw-part-ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.mw-part-head h2,
.mw-part-head h3 {
  font-size: .96rem;
  font-weight: 700;
  color: var(--primary-darker);
}
.mw-part-chip {
  margin-inline-start: auto;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 500;
}

.mw-chat-answer {
  color: var(--text);
  font-size: 1rem;
  line-height: 2;
}
.mw-chat-answer p + p { margin-block-start: .85em; }
@media (min-width: 560px) {
  .mw-chat-answer p,
  .mw-wrapup-text {
    text-align: justify;
    text-align-last: start;
  }
}

.mw-wrapup {
  margin-block-start: 18px;
  padding: 15px 17px;
  border-radius: var(--r-md);
  background: var(--primary-lighter);
  border: 1px solid var(--primary-light);
}
.mw-wrapup-text {
  color: var(--text);
  font-size: .97rem;
  line-height: 1.98;
}

.mw-kb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: 16px;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--border-light);
}
.mw-kb-tag {
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .74rem;
  font-weight: 500;
}

/* ★ Conversion Continuation Bridge inside the Chatbot Card */
.mw-chat-continue {
  padding: clamp(18px, 3vw, 24px) clamp(18px, 3.2vw, 28px);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--primary-lighter) 100%);
  border-block-start: 1px solid var(--border);
}
.mw-chat-continue-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-darker);
  margin-block-end: 4px;
}
.mw-chat-continue-sub {
  font-size: .9rem;
  color: var(--text-2);
  margin-block-end: 14px;
}

.mw-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 16px;
}
.mw-followup-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .84rem;
  text-decoration: none;
  transition: border-color .16s, background-color .16s, color .16s, transform .16s var(--ease);
}
.mw-followup-chip .i { color: var(--primary-dark); font-size: 14px; }
.mw-followup-chip:hover {
  border-color: var(--primary-dark);
  background: var(--surface);
  color: var(--primary-darker);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.mw-composer-bridge {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: border-color .18s, box-shadow .18s;
}
.mw-composer-bridge:focus-within {
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 600px) {
  .mw-composer-bridge {
    flex-direction: row;
    align-items: center;
    padding: 7px 14px 7px 7px;
  }
}
.mw-composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-inline: 4px;
}
.mw-composer-field .i { color: var(--primary-dark); font-size: 18px; }
.mw-composer-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 2px;
  /* 16px floor prevents iOS Safari auto-zoom on focus (same rule as web/app.css) */
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}
.mw-composer-input:focus { outline: none; }
.mw-composer-input::placeholder { color: var(--muted); }
.mw-composer-bridge .btn { flex-shrink: 0; }

.mw-cta-note {
  display: block;
  margin-block-start: 10px;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}
@media (min-width: 600px) {
  .mw-cta-note { text-align: start; padding-inline-start: 6px; }
}

/* ============================================================================
   ARTICLE PROSE TYPOGRAPHY
   ========================================================================= */
.mw-prose {
  font-size: 1.0625rem;
  line-height: 2.02;
  color: var(--text);
  overflow-wrap: break-word;
}
.mw-prose > * + * { margin-block-start: 1.1em; }
.mw-prose h2 {
  margin-block: 1.9em .55em;
  padding-block-start: .4em;
  font-size: clamp(1.26rem, 3vw, 1.58rem);
  line-height: 1.55;
  color: var(--primary-darker);
  scroll-margin-top: 86px;
}
.mw-prose > h2:first-child {
  margin-block-start: 0;
  padding-block-start: 0;
}

/* Images & figures inside article prose (standard WP editor & Gutenberg blocks) */
.mw-prose figure,
.mw-prose .wp-block-image,
.mw-prose .wp-caption {
  margin: 26px 0;
  max-width: 100% !important;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.mw-prose img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.mw-prose figure img,
.mw-prose .wp-block-image img,
.mw-prose .wp-caption img {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.mw-prose figcaption,
.mw-prose .wp-caption-text {
  padding: 10px 16px;
  font-size: .82rem;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
  border-block-start: 1px solid var(--border-light);
}
.mw-prose h3 {
  margin-block: 1.5em .45em;
  font-size: clamp(1.08rem, 2.4vw, 1.24rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}
.mw-prose p { color: var(--text); }
@media (min-width: 560px) {
  .mw-prose > p {
    text-align: justify;
    text-align-last: start;
  }
}
.mw-prose strong { font-weight: 700; color: var(--primary-darker); }
.mw-prose a:not(.btn):not(.mw-inline-link) {
  color: var(--primary-darker);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mw-prose a:not(.btn):hover { color: var(--primary-dark); }

.mw-prose ul,
.mw-prose ol {
  padding-inline-start: 22px;
  display: grid;
  gap: 8px;
}
.mw-prose li::marker { color: var(--primary-dark); font-weight: 700; }

.mw-prose blockquote {
  margin-inline: 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--primary-dark);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface-2);
  color: var(--text-2);
}

.mw-prose .mw-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.mw-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 480px;
}
.mw-prose th,
.mw-prose td {
  padding: 12px 15px;
  text-align: start;
  border-block-end: 1px solid var(--border-light);
}
.mw-prose thead th {
  background: var(--primary-lighter);
  color: var(--primary-darker);
  font-family: var(--font-display);
  font-weight: 700;
}
.mw-prose tbody tr:last-child td { border-block-end: 0; }

/* Inline citation links [۱] and bottom official sources list (behboodyab-grade E-E-A-T) */
.mw-prose a.mw-cite {
  display: inline-block;
  margin-inline: 2px;
  font-size: .78em;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
  vertical-align: super;
  line-height: 1;
}
.mw-prose a.mw-cite:hover {
  color: var(--primary-darker);
  text-decoration: underline;
}
.mw-sources {
  margin-block-start: 2.2em;
  padding-block-start: 1.4em;
  border-block-start: 1px solid var(--border);
  font-size: .88rem;
  line-height: 1.9;
  color: var(--muted);
}
.mw-prose .mw-sources h2 {
  margin-block: 0 .6em;
  padding-block-start: 0;
  font-size: 1.05rem;
  color: var(--text);
}
.mw-sources ol {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mw-sources li {
  scroll-margin-top: 90px;
}
.mw-sources cite {
  font-style: normal;
}
.mw-sources-num {
  color: var(--primary-darker);
  font-weight: 700;
  margin-inline-end: 4px;
}
.mw-sources-note {
  margin-block-start: 12px;
  font-size: .84rem;
  color: var(--muted);
}

/* ============================================================================
   ★ MID-ARTICLE CONVERSION & ACTION BOXES (Shortcodes)
   ========================================================================= */

/* 1. [mw_action_box] — «الان دقیقاً چه کاری باید بکنی؟» */
.mw-mid-box {
  margin-block: 28px;
  padding: clamp(20px, 3.2vw, 28px);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #fff 0%, var(--primary-lighter) 100%);
  border: 1px solid var(--primary-light);
  box-shadow: var(--shadow-md);
}
.mw-mid-box-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 12px;
}
.mw-mid-box-ic {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  font-size: 21px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.mw-mid-box-eyebrow {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.4;
}
.mw-mid-box-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.5;
}
.mw-mid-box-body {
  color: var(--text-2);
  font-size: .96rem;
  line-height: 1.95;
}
.mw-mid-steps {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.mw-mid-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--border-light);
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
}
.mw-mid-step-ic {
  width: 22px;
  height: 22px;
  margin-block-start: 3px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.mw-mid-box-foot {
  margin-block-start: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.mw-mid-box-note {
  font-size: .82rem;
  color: var(--muted);
}

/* 2. [mw_ask_box] — Compact Inline Chat Prompt */
.mw-ask-box {
  margin-block: 26px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.mw-ask-box-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary-darker);
}
.mw-ask-box-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 620px) {
  .mw-ask-box-row { flex-direction: row; align-items: center; }
}
.mw-ask-box-q {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 16px;
  color: var(--text);
  line-height: 1.75;
  transition: border-color .16s, box-shadow .16s;
}
.mw-ask-box-input:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary-lighter);
}
.mw-ask-box-input::placeholder { color: var(--muted); }
.mw-ask-box-hint {
  margin-block-start: 9px;
  font-size: .8rem;
  color: var(--muted);
}

/* 3. [mw_note_box] — Caveat (warn) & Experience Rail (tip) */
.mw-note-box {
  margin-block: 24px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .94rem;
  line-height: 1.9;
}
.mw-note-box--warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}
.mw-note-box--warn .mw-note-ic {
  background: var(--warn-border);
  color: var(--warn-text);
}
.mw-note-box--tip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--primary-dark);
  color: var(--text-2);
}
.mw-note-box--tip .mw-note-ic {
  background: var(--primary-lighter);
  color: var(--primary-darker);
}
.mw-note-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-block-start: 3px;
}
.mw-note-content { min-width: 0; flex: 1; }
.mw-note-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .96rem;
  color: inherit;
  margin-block-end: 4px;
}
.mw-note-box--tip .mw-note-title { color: var(--primary-darker); }
.mw-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-block-start: 8px;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  color: var(--primary-darker);
  text-decoration: none;
}
.mw-inline-link:hover { text-decoration: underline; }

/* Standing legal caveat under article (matches .kb-caveat) */
.mw-article-caveat {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-block-start: 32px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: .84rem;
  line-height: 1.85;
}
.mw-article-caveat-ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--warn-border);
  color: var(--warn-text);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
  margin-block-start: 2px;
}

/* ---------- desktop sticky sidebar ----------------------------------------- */
.mw-sidebar {
  display: none;
}
@media (min-width: 1040px) {
  .mw-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    inset-block-start: 86px;
  }
}

.mw-side-card {
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.mw-side-card--cta {
  background: linear-gradient(180deg, #fff 0%, var(--primary-lighter) 100%);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.mw-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 12px;
  font-family: var(--font-display);
  font-size: .94rem;
  font-weight: 700;
  color: var(--primary-darker);
}

.mw-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.mw-toc-list a {
  display: block;
  padding: 6px 11px;
  border-inline-start: 2px solid var(--border-light);
  font-size: .85rem;
  line-height: 1.65;
  color: var(--text-2);
  text-decoration: none;
  transition: color .15s, border-color .15s, background-color .15s;
}
.mw-toc-list a:hover { color: var(--primary-darker); background: var(--surface-2); }
.mw-toc-list a.is-active {
  border-inline-start-color: var(--primary-darker);
  background: var(--primary-lighter);
  color: var(--primary-darker);
  font-weight: 700;
}

.mw-side-cta-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 10px;
}
.mw-side-cta-brand h3 { font-size: .98rem; color: var(--text); line-height: 1.5; text-wrap: balance; }
.mw-side-cta-text { font-size: .88rem; color: var(--text-2); line-height: 1.85; margin-block-end: 14px; }
.mw-side-ticks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: .82rem;
  color: var(--text);
}
.mw-side-ticks li { display: flex; align-items: center; gap: 7px; }
.mw-side-ticks .i { color: var(--primary-darker); font-size: 14px; }
.mw-side-card--cta .btn { width: 100%; }

/* ---------- mobile always-on sticky CTA dock ------------------------------- */
.mw-mobile-sticky {
  position: fixed;
  inset-inline: 12px;
  inset-block-end: calc(10px + var(--safe-b));
  z-index: 35;
}
.mw-mobile-sticky-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px 8px 8px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--primary-light);
  box-shadow: 0 10px 30px rgba(122, 79, 130, .22);
  text-decoration: none;
  color: var(--text);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.mw-mobile-sticky-btn:active { transform: translateY(1px); }

.mw-mobile-sticky-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--primary-lighter);
  color: var(--primary-darker);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mw-mobile-sticky-dot {
  position: absolute;
  inset-block-end: 1px;
  inset-inline-end: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4CAF50;
  border: 2px solid var(--surface);
}
.mw-mobile-sticky-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.mw-mobile-sticky-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 800;
  color: var(--primary-darker);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mw-mobile-sticky-copy span {
  display: block;
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mw-mobile-sticky-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: var(--r-full);
  background: var(--grad-strong);
  color: #fff;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* Keep footer clear above the sticky mobile dock */
@media (max-width: 1039px) {
  body { padding-block-end: calc(78px + var(--safe-b)); }
}
@media (min-width: 1040px) {
  .mw-mobile-sticky { display: none; }
}

/* ---------- pagination ----------------------------------------------------- */
.mw-pagination {
  margin-block-start: 36px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.mw-pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}
.mw-pagination .page-numbers:hover { background: var(--primary-lighter); color: var(--primary-darker); }
.mw-pagination .page-numbers.current {
  background: var(--grad-strong);
  border-color: transparent;
  color: #fff;
}

/* ---------- closer & footer (exact match with site/index.html) ------------- */
.closer {
  padding-block: clamp(54px, 9vw, 92px);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(197, 161, 203, .26), transparent 70%),
    var(--bg);
  border-block-start: 1px solid var(--border-light);
}
.closer-in { text-align: center; }
.closer-mark { border-radius: 22%; box-shadow: var(--shadow-md); display: inline-block; }
.closer h2 {
  margin-block: 20px 12px;
  font-size: clamp(1.38rem, 4.2vw, 2rem);
  line-height: 1.55;
  color: var(--primary-darker);
}
.closer p { margin: 0 auto 26px; max-width: 56ch; color: var(--text-2); }

.foot {
  padding-block: 44px calc(28px + var(--safe-b));
  background: var(--surface-2);
  border-block-start: 1px solid var(--border);
}
.foot-main {
  display: grid;
  gap: 32px;
  padding-block-end: 30px;
}
.foot-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.foot-tagline {
  max-width: 40ch;
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.95;
}
.foot-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-block-start: 2px;
}
.foot-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 13px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-darker);
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.foot-social .i { font-size: 1.15em; }
.foot-social:hover {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}
.foot-col h3 {
  font-family: var(--font-display);
  font-size: .94rem;
  font-weight: 700;
  color: var(--text);
  margin-block-end: 12px;
}
.foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.foot-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: .9rem;
  text-decoration: none;
  transition: color .16s var(--ease);
}
.foot-list a:hover { color: var(--primary-darker); }
.foot-list .foot-cta-link {
  color: var(--primary-darker);
  font-weight: 700;
}
.foot-cta-link .i { font-size: 1.05em; }
.foot-bottom {
  padding-block-start: 22px;
  border-block-start: 1px solid var(--border);
  display: grid;
  gap: 10px;
}
.foot-note { max-width: 72ch; color: var(--muted); font-size: .83rem; line-height: 1.9; }
.foot-meta {
  justify-self: start;
  color: var(--muted);
  font-size: .8rem;
  unicode-bidi: isolate;
  direction: ltr;
}

@media (min-width: 760px) {
  .foot-main {
    grid-template-columns: minmax(0, 1.4fr) auto;
    align-items: start;
    justify-content: space-between;
    gap: 48px;
  }
  .foot-bottom {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
  }
  .foot-meta { justify-self: end; }
}

/* ---------- empty / 404 state ---------------------------------------------- */
.mw-empty {
  padding: clamp(44px, 8vw, 76px) 20px;
  text-align: center;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.mw-empty h2 { margin-block: 16px 10px; font-size: 1.4rem; color: var(--primary-darker); }
.mw-empty p { color: var(--text-2); max-width: 48ch; margin: 0 auto 22px; }
