/* ==========================================================================
   Kartio v2 public page — CUSTOM BLOCKS (Page Builder phase 2): heading · rich text · links · single media · divider ·
   FAQ · opening hours · testimonials · CTA banner.  Loaded only when the card renders at least one (see _TemplateLayout).
   Spec: docs/kartio-design B2-CustomBlocks + R-Notes «بلوک‌های سفارشی». Tokens only (server-emitted fallback keeps working).
   Sections: 0 shared · 1 heading/prose · 2 links · 3 media · 4 divider · 5 FAQ · 6 hours · 7 testimonials · 8 CTA · 9 per-template
   ========================================================================== */

/* ---------- 0. Shared ---------- */
:root {
  --cb-open: #13773F;   --cb-open-bg: #E2F4E8;
  --cb-soon: #8A4B00;   --cb-soon-bg: #FDF1DC;   --cb-soon-dot: #D97706;
  --cb-closed: #B42318; --cb-closed-bg: #FDECEA;
  --cb-off: #66655F;    --cb-off-bg: #ECEBE6;
  --cb-err: #B42318;    --cb-err-bg: #FDECEA;
  --cb-gold: #F1D27A;   --cb-gold-ink: #5C4100;
}
html[data-theme="dark"] {
  --cb-open: #5FD08E;   --cb-open-bg: rgb(95 208 142 / .14);
  --cb-soon: #F5B84B;   --cb-soon-bg: rgb(245 184 75 / .14);   --cb-soon-dot: #F5B84B;
  --cb-closed: #FFB4AB; --cb-closed-bg: rgb(255 120 110 / .14);
  --cb-off: #A9A3BA;    --cb-off-bg: rgb(255 255 255 / .08);
  --cb-err: #FFB4AB;    --cb-err-bg: rgb(255 120 110 / .14);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --cb-open: #5FD08E;   --cb-open-bg: rgb(95 208 142 / .14);
    --cb-soon: #F5B84B;   --cb-soon-bg: rgb(245 184 75 / .14);   --cb-soon-dot: #F5B84B;
    --cb-closed: #FFB4AB; --cb-closed-bg: rgb(255 120 110 / .14);
    --cb-off: #A9A3BA;    --cb-off-bg: rgb(255 255 255 / .08);
    --cb-err: #FFB4AB;    --cb-err-bg: rgb(255 120 110 / .14);
  }
}

.k-cb { min-width: 0; }
.k-cb-empty {
  display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; padding: 18px 14px;
  border: 1.5px dashed var(--k-border); border-radius: var(--k-radius-lg, 16px); color: var(--k-text-2); font-size: var(--k-fs-sm);
}
.k-cb-empty b { color: var(--k-text); font-size: var(--k-fs-md); }
.k-cb-err {
  margin: 6px 0 0; padding: 6px 10px; border-radius: var(--k-radius-sm, 10px); background: var(--cb-err-bg); color: var(--cb-err);
  font-size: var(--k-fs-sm); font-weight: 700; line-height: 1.7;
}
/* builder status badges (held for review / gold plan badge) - never emitted on a public page */
.k-cb-badges { position: absolute; inset-block-start: -9px; inset-inline-start: 10px; z-index: 4; display: flex; gap: 4px; pointer-events: none; }
.k-cb-badge { height: 20px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; line-height: 1; box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.k-cb-badge--pending { background: #FDF1DC; color: #8A4B00; border: 1px solid #F2D9A8; }
.k-cb-badge--pro { background: var(--cb-gold); color: var(--cb-gold-ink); border: 1px solid #DDB850; }

/* ---------- 1. Heading + rich text ---------- */
.k-cb-heading { display: flex; flex-direction: column; gap: 4px; text-align: start; padding-block: 4px 0; }
.k-cb-heading[data-align="center"] { text-align: center; }
.k-cb-heading[data-align="end"] { text-align: end; }
.k-cb-h { font-family: var(--k-font-display); font-size: var(--k-fs-xl); font-weight: 800; line-height: 1.45; text-wrap: balance; overflow-wrap: anywhere; }
.k-cb-sub { color: var(--k-text-2); font-size: var(--k-fs-md); line-height: 1.9; text-wrap: pretty; }
@media (min-width: 768px) { .k-cb-heading { max-width: 68ch; } .k-cb-heading[data-align="center"] { margin-inline: auto; } .k-cb-heading[data-align="end"] { margin-inline-start: auto; } }
@media (min-width: 1024px) { .k-cb-heading { padding-top: calc(4px * 1.25); } }

.k-cb-prose { font-size: var(--k-fs-md); line-height: 2.05; color: var(--k-text); overflow-wrap: anywhere; }
.k-body .k-cb-prose p { margin: 0 0 .75em; }
.k-body .k-cb-prose > :last-child { margin-bottom: 0; }
.k-body .k-cb-prose ul, .k-body .k-cb-prose ol { margin: 0 0 .75em; padding-inline-start: 1.5em; }
.k-body .k-cb-prose ul { list-style: disc; }
.k-body .k-cb-prose ol { list-style: decimal; }
.k-cb-prose li { margin-bottom: .2em; }
.k-cb-prose li::marker { color: var(--k-accent-text, var(--k-accent)); }
.k-cb-prose a { color: var(--k-accent-text, var(--k-accent)); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.k-cb-prose strong { font-weight: 800; }
@media (min-width: 768px) { .k-cb-prose { font-size: 1rem; max-width: 68ch; } }

/* ---------- 2. Links ---------- */
.k-cb-links { display: grid; gap: 10px; }
.k-cb-link {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; min-width: 0;
  border-radius: var(--k-radius-md, 14px); background: var(--k-surface); border: 1px solid var(--k-border);
  box-shadow: var(--k-shadow-1, none); color: var(--k-text); font-size: var(--k-fs-md); font-weight: 700; line-height: 1.4;
  transition: transform var(--k-dur-fast, 160ms) var(--k-ease-out), background var(--k-dur-fast, 160ms), border-color var(--k-dur-fast, 160ms);
}
.k-cb-link__t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.k-cb-link__ic { color: var(--k-accent-text, var(--k-accent)); }
.k-cb-link__go { opacity: .55; transition: transform var(--k-dur-fast, 160ms) var(--k-ease-out), opacity var(--k-dur-fast, 160ms); }
.k-cb-link__host { font-size: var(--k-fs-sm); font-weight: 500; color: var(--k-text-2); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-cb-link.is-primary { background: var(--k-accent); color: var(--k-on-accent, #fff); border-color: transparent; min-height: 52px; font-weight: 800; }
.k-cb-link.is-primary .k-cb-link__ic, .k-cb-link.is-primary .k-cb-link__go { color: inherit; }
.k-cb-link.is-primary .k-cb-link__t { text-align: center; }
.k-cb-link.is-primary .k-cb-link__go { opacity: .85; }
@media (hover: hover) {
  .k-cb-link:hover { transform: translateY(-1px); }
  .k-cb-link:hover .k-cb-link__go { transform: translateX(-3px); opacity: 1; }
  .k-cb-link:not(.is-primary):hover { border-color: var(--k-accent); }
}
@media (min-width: 768px) {
  .k-cb-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-cb-links--buttons .k-cb-link.is-primary { grid-column: 1 / -1; }
}

/* ---------- 3. Single media ---------- */
.k-cb-media { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.k-cb-media__a { display: block; border-radius: var(--k-radius-lg, 16px); overflow: hidden; background: var(--k-accent-soft); cursor: zoom-in; }
.k-cb-media__a[href^="https"]:not([data-k-lb]), .k-cb-media__a[href^="tel"], .k-cb-media__a[href^="mailto"] { cursor: pointer; }
.k-cb-media img { width: 100%; height: auto; max-height: 720px; object-fit: cover; display: block; }
.k-cb-media__cap { color: var(--k-text-2); font-size: var(--k-fs-sm); line-height: 1.8; }
@media (min-width: 1440px) { .k-cb-media { max-width: 840px; margin-inline: auto; width: 100%; } }

/* ---------- 4. Divider ---------- */
.k-cb-divider { --cb-size: 48px; --cb-scale: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.k-cb-divider[data-size="24"] { --cb-size: 24px; }
.k-cb-divider[data-size="72"] { --cb-size: 72px; }
@media (min-width: 768px) { .k-cb-divider { --cb-scale: 1.15; } }
@media (min-width: 1024px) { .k-cb-divider { --cb-scale: 1.25; } }
.k-cb-divider--line, .k-cb-divider--ornament { padding-block: calc(var(--cb-size) * var(--cb-scale) / 2 - var(--k-panel-gap, 14px) / 2); }
.k-cb-divider--space { height: calc(var(--cb-size) * var(--cb-scale) - var(--k-panel-gap, 14px)); min-height: 0; }
.k-cb-divider__line { display: block; width: 100%; height: 1px; background: var(--k-border); }
.k-cb-divider__orn { display: inline-flex; gap: 10px; align-items: center; color: var(--k-accent-text, var(--k-accent)); }
.k-cb-divider__orn i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); opacity: .85; }
.k-cb-divider__orn i:nth-child(2) { width: 9px; height: 9px; opacity: 1; }
/* the spacer is drawn only in the builder (data-kd-ui) */
.k-cb-divider__space {
  width: 100%; height: 100%; min-height: 28px; display: grid; place-items: center; border: 1.5px dashed var(--k-border); border-radius: 10px;
  font-size: var(--k-fs-xs); color: var(--k-text-2);
}

/* ---------- 5. FAQ ---------- */
.k-faq { gap: 0; }
.k-faq > .k-h { margin-bottom: 6px; }
.k-faq__list { display: flex; flex-direction: column; }
.k-faq__col { display: contents; }
.k-faq__item { order: var(--i, 0); border-top: 1px solid var(--k-border); interpolate-size: allow-keywords; }
.k-faq__item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; min-height: 52px; padding: 10px 2px;
  font-size: var(--k-fs-md); font-weight: 700; line-height: 1.7; -webkit-tap-highlight-color: transparent;
}
.k-faq__item summary::-webkit-details-marker { display: none; }
.k-faq__q { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.k-faq__chev { color: var(--k-text-2); transition: transform 220ms ease-out; }
.k-faq__item[open] .k-faq__chev { transform: rotate(180deg); }
.k-faq__a { padding: 0 2px 14px; color: var(--k-text-2); font-size: var(--k-fs-md); line-height: 1.95; }
.k-faq__a p { white-space: pre-line; overflow-wrap: anywhere; }
.k-faq__none { color: var(--cb-err); font-weight: 700; }
.k-faq__item.is-empty { background: var(--cb-err-bg); border-radius: var(--k-radius-sm, 10px); }
.k-faq__item.is-empty .k-faq__q { color: var(--cb-err); }
/* open/close height transition (220ms ease-out) via ::details-content + interpolate-size; other engines simply snap */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="none"]) .k-faq__item::details-content {
    block-size: 0; overflow: clip; transition: block-size 220ms ease-out, content-visibility 220ms ease-out allow-discrete;
  }
  html:not([data-motion="none"]) .k-faq__item[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .k-faq__chev { transition: none; } }
html[data-motion="none"] .k-faq__chev { transition: none; }
/* «نمایش همه (n)»: without JS everything shows; with JS the rows past the 5th are collapsed until the button is pressed */
.k-faq__all {
  margin-top: 6px; min-height: 42px; border: 0; border-radius: var(--k-radius-md, 12px); background: var(--k-accent-soft); color: var(--k-accent-text, var(--k-accent));
  font-weight: 800; font-size: var(--k-fs-md); width: 100%;
}
html:not([data-js]) .k-faq__all { display: none; }
html[data-js] .k-faq.is-collapsible:not(.is-all) .k-faq__x { display: none; }
.k-faq.is-all .k-faq__all { display: none; }
/* b: two independent columns, desktop only (accordion below 1024) */
@media (min-width: 1024px) {
  .k-faq--b .k-faq__list { flex-direction: row; gap: 0 28px; align-items: flex-start; }
  .k-faq--b .k-faq__col { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
  .k-faq--b .k-faq__item { order: 0; }
}
/* c: cards */
.k-faq--c .k-faq__list { display: grid; gap: 10px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.k-faq--c .k-faq__item { border: 1px solid var(--k-border); border-radius: var(--k-radius-md, 14px); padding: 2px 14px; background: transparent; }
.k-faq--c .k-faq__item[open] { background: var(--k-accent-soft); border-color: transparent; }
@media (min-width: 768px) { .k-faq--c .k-faq__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.k-faq--c .k-faq__list > .k-faq__col { display: contents; }

/* ---------- 6. Opening hours ---------- */
.k-hrs__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.k-hrs__head > b { font-size: var(--k-fs-lg); font-weight: 800; }
.k-hrs__pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 14px; font-size: var(--k-fs-sm); font-weight: 800; white-space: nowrap; line-height: 1;
  background: var(--cb-closed-bg); color: var(--cb-closed);
}
.k-hrs__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.k-hrs__pill.is-open { background: var(--cb-open-bg); color: var(--cb-open); }
.k-hrs__pill.is-soon { background: var(--cb-soon-bg); color: var(--cb-soon); }
.k-hrs__pill.is-soon .k-hrs__dot { background: var(--cb-soon-dot); }
.k-hrs__pill.is-holiday { background: var(--cb-off-bg); color: var(--cb-off); }
.k-hrs__pill.is-open .k-hrs__dot { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); animation: cb-pulse 2s ease-in-out infinite; }
@keyframes cb-pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .k-hrs__pill.is-open .k-hrs__dot { animation: none; } }
html[data-motion="none"] .k-hrs__pill.is-open .k-hrs__dot { animation: none; }
.k-hrs__sub { margin: 0; color: var(--k-text-2); font-size: var(--k-fs-md); line-height: 1.8; }
.k-hrs__sub[hidden] { display: none; }
.k-hrs__list { display: flex; flex-direction: column; gap: 2px; }
.k-hrs__list li { display: flex; justify-content: space-between; gap: 14px; font-size: var(--k-fs-md); padding: 6px 10px; border-radius: var(--k-radius-sm, 8px); line-height: 1.7; }
.k-hrs__list li > span:last-child { color: var(--k-text); font-variant-numeric: tabular-nums; text-align: end; }
.k-hrs__list li.is-today { background: var(--k-accent-soft); font-weight: 800; }
.k-hrs__list li.is-off > span:last-child { color: var(--k-text-2); }
.k-hrs__list--today { margin-top: 2px; }
.k-hrs__more > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: var(--k-radius-md, 12px);
  background: var(--k-accent-soft); font-size: var(--k-fs-md); font-weight: 700; margin-bottom: 4px;
}
.k-hrs__more > summary::-webkit-details-marker { display: none; }
.k-hrs__chev { transition: transform 200ms ease-out; }
.k-hrs__more[open] .k-hrs__chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .k-hrs__chev { transition: none; } }
/* c: weekly schedule — a strip of day cells */
.k-hrs__week { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: none; }
.k-hrs__week::-webkit-scrollbar { display: none; }
.k-hrs__day { scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--k-radius-md, 12px); border: 1px solid var(--k-border); font-size: var(--k-fs-sm); line-height: 1.7; }
.k-hrs__day b { font-size: var(--k-fs-md); }
.k-hrs__day.is-today { background: var(--k-accent-soft); border-color: transparent; }
.k-hrs__day.is-off { color: var(--k-text-2); }
@media (min-width: 768px) { .k-hrs__week { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; } }
/* b on wide screens: a 2-column table (day | hours) */
@media (min-width: 1024px) { .k-hrs--b .k-hrs__list--table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; } }
/* location chip (living-card) */
.k-hrs-chipwrap { display: flex; margin-bottom: 8px; }
.k-hrs__pill--chip { height: 26px; padding: 0 10px; font-size: var(--k-fs-xs); }
/* pocket: the first hours block lives in the side rail from 768 up */
@media (min-width: 768px) { .k-pk .k-cb-hours[data-in-rail="1"] { display: none; } }
.k-pk-rcard--hours { gap: 8px; }
.k-pk-rcard--hours .k-hrs__list li { padding: 4px 8px; font-size: var(--k-fs-sm); }

/* ---------- 7. Testimonials ---------- */
.k-tst__track { display: flex; gap: 10px; min-width: 0; }
.k-tst__card {
  margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px; min-width: 0;
  border: 1px solid var(--k-border); border-radius: var(--k-radius-md, 14px); background: transparent;
}
.k-tst__stars { font-size: var(--k-fs-md); }
.k-tst__q { margin: 0; }
.k-tst__q p { font-size: var(--k-fs-md); line-height: 2; overflow-wrap: anywhere; white-space: pre-line; }
.k-tst__by { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.k-tst__av {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  color: var(--k-on-accent, #fff); background: var(--k-accent);
}
.k-tst__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.k-tst__who b { font-size: var(--k-fs-md); }
.k-tst__who small { font-size: var(--k-fs-sm); color: var(--k-text-2); }
.k-tst__more { align-self: flex-start; border: 0; background: none; padding: 0; font-weight: 800; font-size: var(--k-fs-sm); color: var(--k-accent-text, var(--k-accent)); }
.k-tst__more[hidden] { display: none; }
/* long text: 4 lines + «ادامه» (only when JS can add the button) */
html[data-js] .k-tst__card.is-long:not(.is-open) .k-tst__q p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
/* a: cards — phones scroll sideways, tablet 2 cols, desktop 3 cols (no scroll) */
.k-tst--a .k-tst__track { overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: none; }
.k-tst--a .k-tst__track::-webkit-scrollbar { display: none; }
.k-tst--a .k-tst__card { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
@media (min-width: 768px) {
  .k-tst--a .k-tst__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .k-tst--a .k-tst__card { flex: none; }
}
@media (min-width: 1024px) { .k-tst--a .k-tst__track { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* b: slider — native scroll-snap, NO autoplay */
.k-tst--b .k-tst__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.k-tst--b .k-tst__track::-webkit-scrollbar { display: none; }
.k-tst--b .k-tst__card { flex: 0 0 100%; scroll-snap-align: center; border: 0; padding: 4px 2px; }
.k-tst--b .k-tst__q p { font-size: var(--k-fs-lg); }
.k-tst--b .k-tst__q::before { content: "\201D"; display: block; font-family: var(--k-font-display); font-size: 44px; line-height: .6; height: 20px; color: var(--k-accent); font-weight: 800; }
.k-tst__dots { display: flex; gap: 5px; justify-content: center; margin-top: 10px; }
.k-tst__dots i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--k-border); transition: width 200ms ease-out, background 200ms; }
.k-tst__dots i.is-on { width: 18px; background: var(--k-accent); }
@media (min-width: 768px) { .k-tst--b .k-tst__card { flex-basis: 100%; } }
/* scroll-driven dots (Chromium): the dot for slide i grows while the track's scroll progress is near i/(n-1) */
@supports (animation-timeline: scroll()) and (timeline-scope: --k-tst) {
  .k-tst--b .k-tst__scope { timeline-scope: --k-tst; }
  .k-tst--b .k-tst__track { scroll-timeline: --k-tst inline; }
  .k-tst--b .k-tst__dots i {
    transition: none; animation: cb-dot linear both; animation-timeline: --k-tst;
    animation-range: calc(100% * (var(--i) - 1) / (var(--n) - 1)) calc(100% * (var(--i) + 1) / (var(--n) - 1));
  }
  .k-tst--b .k-tst__dots i.is-on { animation: cb-dot linear both; }
}
@keyframes cb-dot { 0%, 100% { width: 6px; background: var(--k-border); } 50% { width: 18px; background: var(--k-accent); } }
/* c: list */
.k-tst--c .k-tst__track { flex-direction: column; }
.k-tst--c .k-tst__card { flex-direction: column; }
@media (min-width: 768px) { .k-tst--c .k-tst__track { max-width: 760px; } }

/* ---------- 8. CTA banner ---------- */
.k-cta {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px; padding: 20px;
  border-radius: var(--k-radius-lg, 22px); color: #fff; --cta-fg: #fff;
  background: radial-gradient(80% 120% at 0% 0%, var(--k-accent-400, #8B7CF6), transparent), var(--k-accent-800, #3B2FA8);
}
.k-cta--b { background: var(--k-accent-900, #1E1A2C); border: 1px solid var(--k-accent-700, rgb(179 168 255 / .25)); }
.k-cta--c { background: var(--k-accent-900, #1E1A2C); }
.k-cta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.k-cta--c.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(10 8 16 / .82), rgb(10 8 16 / .42)); }
.k-cta__ring { position: absolute; inset-inline-end: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; border: 22px solid rgb(255 255 255 / .08); z-index: -1; pointer-events: none; }
.k-cta__txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.k-cta__kicker { font-size: var(--k-fs-sm); opacity: .82; font-weight: 600; }
.k-cta--b .k-cta__kicker { color: var(--k-accent-300, #B3A8FF); opacity: 1; }
.k-cta__title { font-family: var(--k-font-display); font-size: clamp(1.0625rem, .92rem + 1.1vw, 1.375rem); line-height: 1.65; font-weight: 800; text-wrap: balance; overflow-wrap: anywhere; }
.k-cta[data-len="long"] .k-cta__title { font-size: clamp(.95rem, .88rem + .7vw, 1.125rem); line-height: 1.75; }
.k-cta .k-cta__btn {
  align-self: flex-start; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: var(--k-radius-md, 12px); background: #fff; color: var(--k-accent-800, #3B2FA8); font-size: var(--k-fs-md); font-weight: 800; line-height: 1.2; text-decoration: none;
  transition: transform var(--k-dur-fast, 160ms) var(--k-ease-out);
}
.k-cta.k-cta--b .k-cta__btn { background: var(--k-accent); color: var(--k-on-accent, #fff); }
.k-cta .k-cta__btn.is-invalid { opacity: .6; cursor: not-allowed; outline: 2px dashed #FFB4AB; outline-offset: 2px; }
@media (hover: hover) { a.k-cta__btn:hover { transform: translateY(-1px); } }
@media (min-width: 768px) {
  .k-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; }
  .k-cta .k-cta__btn { align-self: center; }
}
@media (min-width: 1440px) { .k-cta { max-width: 900px; margin-inline: auto; width: 100%; } }
/* decorative ring turns with the scroll - expressive motion only */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html[data-motion="expressive"] .k-cta__ring { animation: cb-ring linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes cb-ring { from { transform: rotate(-90deg) scale(.86); } to { transform: rotate(90deg) scale(1.12); } }

/* ---------- 9. Per template ---------- */
/* «کارت زنده»: glass panels already come from tpl-living-card.css; only rhythm tweaks */
.k-lc .k-cb-heading { padding-inline: 4px; }
.k-lc .k-cb-prose, .k-lc .k-cb-media__cap { padding-inline: 4px; }
.k-lc .k-faq__item summary { min-height: 54px; }
@media (min-width: 1024px) { .k-lc .k-cb-h { font-size: 1.5rem; } }

/* «مجله»: unboxed editorial - ruled lists, display-face headings, square CTA */
.k-ed .k-cb-h { font-weight: var(--ed-dw, 400); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.25; }
.k-ed .k-cb-sub { font-family: var(--k-font-body-long, inherit); font-size: var(--ed-body-fs, 1rem); }
.k-ed .k-cb-prose { font-family: var(--k-font-body-long, inherit); font-size: var(--ed-body-fs, 1rem); line-height: 2.1; }
.k-ed .k-cb-link { border-radius: var(--ed-r-ctl, 0); border-color: var(--ed-rule); background: none; box-shadow: none; }
.k-ed .k-cb-link.is-primary { background: var(--k-text); color: var(--k-bg); border-color: var(--k-text); }
.k-ed .k-faq__item { border-top-color: var(--ed-rule); }
.k-ed .k-faq__item:last-child, .k-ed .k-faq__col:last-child .k-faq__item:last-child { border-bottom: 1px solid var(--ed-rule); }
.k-ed .k-faq__item summary { font-family: var(--k-font-display); font-weight: var(--ed-dw, 400); font-size: 1.125rem; }
.k-ed .k-faq__a { font-family: var(--k-font-body-long, inherit); font-size: var(--ed-body-fs, 1rem); }
.k-ed .k-faq--c .k-faq__item { border-color: var(--ed-rule); border-radius: var(--ed-r-box, 0); background: none; }
.k-ed .k-faq--c .k-faq__item[open] { background: var(--k-accent-soft); }
.k-ed .k-hrs__list li { border-radius: 0; border-bottom: 1px solid var(--k-border); padding-inline: 2px; }
.k-ed .k-hrs__list li.is-today { background: none; color: var(--k-accent-text, var(--k-accent)); }
.k-ed .k-tst__card { border-radius: 0; border-color: var(--ed-rule); }
.k-ed .k-tst__q p { font-family: var(--k-font-body-long, inherit); font-size: var(--ed-body-fs, 1rem); }
.k-ed .k-tst--b .k-tst__q p { font-size: 1.25rem; line-height: 2; }
.k-ed .k-tst__av { border-radius: 0; }
.k-ed .k-cta { border-radius: 0; }
.k-ed .k-cb-divider__line { background: var(--ed-rule); }
.k-ed .k-cb-media__a { border-radius: var(--ed-r-box, 0); }
.k-ed .k-hrs__pill, .k-ed .k-hrs__day { border-radius: var(--ed-r-ctl, 0); }
.k-ed .k-tst__more, .k-ed .k-faq__all { border-radius: 0; }
@media (min-width: 1024px) {
  .k-ed-sec--cb-hours, .k-ed-sec--cb-links, .k-ed-sec--cb-singlemedia { grid-column: 1 / span 8; }
  .k-ed-sec--cb-heading, .k-ed-sec--cb-richtext { grid-column: 1 / span 8; }
  .k-ed-sec--custom.k-ed-sec--plain { margin-top: 36px; }
}

/* «جیبی»: app cards inside the tab panels, compact type */
.k-pk .k-cb-h { font-size: 1.125rem; }
.k-pk .k-cb-link { border-radius: var(--kp-r-ctl, var(--k-radius-md)); }
.k-pk .k-faq--b .k-faq__list { flex-direction: column; }
.k-pk .k-faq--b .k-faq__col { display: contents; }
.k-pk .k-faq--b .k-faq__item { order: var(--i, 0); }
.k-pk .k-cta { border-radius: var(--kp-r-panel, var(--k-radius-lg)); }
.k-pk .k-tst--a .k-tst__card { flex-basis: min(82%, 280px); }
@media (min-width: 768px) {
  .k-pk .k-tst--a .k-tst__track { grid-template-columns: minmax(0, 1fr); }
  .k-pk .k-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .k-pk .k-cta .k-cta__btn { align-self: flex-start; }
}
