/* PopupBox dashboard components: sites, popup cards with live thumbnails, template gallery, install, stats. */

/* Sidebar site list */
.shell__section { margin: 20px 12px 6px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.ws-switch { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; }
.ws-switch a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; color: var(--text); font-size: .9rem; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ws-switch a:hover { background: var(--bg); }
.ws-switch a.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.ws-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.ws-dot--live { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* Page & site headers */
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title h1 { margin: 0; }
.page-title p.muted { margin: 6px 0 0; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ws-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.ws-head__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ws-head__title h1 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.site-avatar { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; font-weight: 800; font-size: 1.2rem; }
.site-domain { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.site-domain:hover { color: var(--blue); }
.icon--inline { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ws-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); width: fit-content; max-width: 100%; }
.ws-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; }
.ws-tabs a .icon { width: 17px; height: 17px; }
.ws-tabs a:hover { color: var(--ink); background: var(--bg); }
.ws-tabs a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
.breadcrumb { margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.narrow-page { max-width: 620px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.field-help { margin: -10px 0 0; }

/* Dashboard site cards */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.site-card { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s, border-color .12s; }
.site-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--text); }
.site-card__head { display: flex; align-items: center; gap: 12px; }
.site-card__name { display: grid; min-width: 0; }
.site-card__name strong { color: var(--ink); font-size: 1.05rem; }
.site-card__stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.site-card__stats strong { color: var(--ink); }
.site-card--new { place-items: center; place-content: center; gap: 8px; min-height: 180px; border-style: dashed; color: var(--blue); font-weight: 800; box-shadow: none; }
.site-card--limit { padding: 20px 28px; text-align: center; }
.site-card--limit .muted { max-width: 30em; font-weight: 500; }
.badge--draft { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge--draft::before { background: var(--line-strong); }

/* KPIs */
.kpis--compact { margin-bottom: 18px !important; }
.kpi--link { text-decoration: none; transition: border-color .12s; }
.kpi--link:hover { border-color: var(--blue); }

/* Popup list */
.popup-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.popup-card { display: grid; grid-template-columns: auto 168px minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 14px 16px 14px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s, opacity .15s; }
.popup-card:hover { box-shadow: var(--shadow); }
.popup-card.is-live { border-left: 4px solid var(--ok); padding-left: 7px; }
.popup-card.is-dragging { opacity: .5; }
.popup-card.drop-before { box-shadow: 0 -3px 0 var(--blue), var(--shadow); }
.popup-card.drop-after { box-shadow: 0 3px 0 var(--blue), var(--shadow); }
.popup-card__grip { display: grid; place-items: center; width: 26px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: #c9b9c2; cursor: grab; }
.popup-card__grip:hover { background: var(--bg); color: var(--muted); }
.popup-card__thumb { display: block; border-radius: 12px; overflow: hidden; }
.popup-card__body { display: grid; gap: 8px; min-width: 0; }
.popup-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.popup-card__title a { color: var(--ink); font-size: 1.05rem; font-weight: 800; text-decoration: none; }
.popup-card__title a:hover { color: var(--blue); }
.popup-card__stats { display: flex; gap: 18px; margin: 0; }
.popup-card__stats div { display: grid; text-align: right; }
.popup-card__stats dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.popup-card__stats dd { margin: 0; color: var(--ink); font-size: 1.1rem; font-weight: 800; }
.popup-card__actions { display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: .78rem; font-weight: 600; }
.list-hint { margin-top: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--ink); }
.toggle-form { margin: 0; }
.toggle-form.is-busy { opacity: .6; pointer-events: none; }

/* Live thumbnails (popup core in stage mode, scaled) */
.thumb { position: relative; display: block; width: 168px; height: 105px; overflow: hidden; border-radius: 12px; background: #f4eef1; box-shadow: inset 0 0 0 1px var(--line); }
.thumb--lg { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.thumb__site { position: absolute; inset: 0; background:
  linear-gradient(#e9dfe4, #e9dfe4) 8% 10% / 24% 5% no-repeat,
  linear-gradient(#efe7eb, #efe7eb) 8% 30% / 60% 16% no-repeat,
  linear-gradient(#f1eaee, #f1eaee) 8% 70% / 26% 22% no-repeat,
  linear-gradient(#f1eaee, #f1eaee) 50% 70% / 26% 22% no-repeat,
  linear-gradient(#f1eaee, #f1eaee) 92% 70% / 26% 22% no-repeat, #fbf8f9; }
.thumb__stage { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; transform-origin: 0 0; pointer-events: none; }

/* Actions menu */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover, .menu[open] > summary { background: var(--bg); border-color: var(--line); }
.icon-btn--danger:hover { background: var(--error-bg); color: var(--error); }
.menu__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.menu__panel a, .menu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.menu__panel a:hover, .menu__panel button:hover { background: var(--bg); }
.menu__panel .icon { width: 17px; height: 17px; color: var(--muted); }
.menu__panel form { margin: 0; }
.menu__danger, .menu__danger .icon { color: var(--error) !important; }

/* Onboarding */
.onboarding { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 34px; border-radius: 28px; background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 100%); border: 1px solid #f6d3dc; }
.onboarding__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 16px; background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(var(--brand-rgb), .35); }
.onboarding h2 { font-size: 1.6rem; }
.steps-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps-list li { display: flex; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); }
.steps-list p { margin: 2px 0 0; }
.steps-list__num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; }
.steps-list li.is-done .steps-list__num { background: var(--ok); }

/* Template gallery */
.gallery-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.chip-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filter__btn { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.chip-filter__btn:hover { border-color: var(--ink); }
.chip-filter__btn[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.toggle--brand .swatch { display: inline-block; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; vertical-align: -3px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-strong); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.tpl form { height: 100%; margin: 0; }
.tpl__button { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); font: inherit; text-align: left; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tpl__button:hover, .tpl__button:focus-visible { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 16px 40px rgba(var(--brand-rgb), .16); }
.tpl__preview { display: block; padding: 10px 10px 0; }
.tpl__preview .thumb { border-radius: 14px; }
.tpl__meta { display: grid; gap: 4px; padding: 14px 16px 6px; }
.tpl__name { color: var(--ink); font-size: 1.02rem; font-weight: 800; }
.tpl__desc { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tpl__layout { color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tpl__cta { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 10px 16px 16px; color: var(--blue); font-weight: 800; font-size: .9rem; opacity: 0; transition: opacity .15s; }
.tpl__cta .icon { width: 16px; height: 16px; }
.tpl__button:hover .tpl__cta, .tpl__button:focus-visible .tpl__cta { opacity: 1; }
.tpl[hidden] { display: none; }

/* Install */
.install-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.install-grid .panel { margin: 0; }
.install-grid__wide { grid-column: 1 / -1; }
.snippet { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; padding: 14px 14px 14px 18px; border-radius: 16px; background: #22122b; }
.snippet pre { flex: 1; min-width: 0; margin: 0; overflow-x: auto; color: #ffd8e2; font: .86rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.code-block { margin: 10px 0; padding: 12px 16px; border-radius: 12px; background: #22122b; color: #ffd8e2; font: .86rem/1.5 var(--mono); overflow-x: auto; }
.install-check { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.howto { border-bottom: 1px solid var(--line); }
.howto summary { padding: 12px 0; font-weight: 700; color: var(--ink); cursor: pointer; }
.howto p { margin: 0 0 14px; }

/* Settings */
.settings-form .panel, .settings-form .sticky-actions, .settings-form + .danger-zone { max-width: 820px; }
.settings-form .sticky-actions { margin-bottom: 28px; }
.danger-zone .inline-form { align-items: flex-end; }
.danger-zone .inline-form .field { flex: 1 1 260px; }
.danger-zone .inline-form .alert { flex-basis: 100%; }
.panel .card-title + p { margin-top: 0; }
.color-input { display: flex; align-items: center; gap: 8px; }
.color-input input[type="color"] { flex: none; width: 46px; height: 46px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; }
.color-input input[type="text"] { max-width: 130px; font-family: var(--mono); }

/* Leads & stats */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.field--inline { display: flex; align-items: center; gap: 10px; }
.field--inline > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.field--inline > span .icon { margin: 0; }
.field--inline select { min-width: 220px; width: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.panel--flush { padding: 6px 12px !important; }
.nowrap { white-space: nowrap; }
.truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { text-align: right !important; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; }
.stats-toolbar { margin-bottom: 16px; }
.segmented a.segmented__btn { text-decoration: none; }
.chart { margin: 0; }
.chart svg { width: 100%; height: 240px; display: block; }
.chart__grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__bar { fill: #f6c3cf; }
.chart__bar--conv { fill: var(--blue); }
.chart__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink); font-size: .86rem; font-weight: 600; }
.chart__key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #f6c3cf; }
.chart__key--conv { margin-left: 10px; background: var(--blue); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 36px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }
.empty .icon { width: 32px; height: 32px; color: var(--blue); }
.empty p { margin: 0; max-width: 460px; }

.pb-toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: #21162a; color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); }
.pb-toast--error { background: var(--error); }

@media (max-width: 1100px) {
  .popup-card { grid-template-columns: auto 140px minmax(0, 1fr) auto; }
  .popup-card__stats { display: none; }
  .thumb:not(.thumb--lg) { width: 140px; height: 88px; }
}
@media (max-width: 760px) {
  .popup-card { grid-template-columns: minmax(0, 1fr) auto; }
  .popup-card__grip, .popup-card__thumb { display: none; }
  .onboarding, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .onboarding { padding: 22px; }
  .app-shell .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-shell .kpi { padding: 12px 14px; }
  .app-shell .kpi__icon { display: none; }
  .app-shell .kpi__value { font-size: 1.3rem; white-space: nowrap; }
  .app-shell .kpi__body { display: grid; gap: 0; }
}
@media (max-width: 560px) {
  .integration__head { flex-wrap: wrap; }
  .integration__title { flex: 1 1 200px; }
  /* One scrollable row instead of three rows of tabs */
  .ws-tabs { flex-wrap: nowrap; width: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ws-tabs::-webkit-scrollbar { display: none; }
  .ws-tabs a { flex: none; white-space: nowrap; }
  .chip-filter { flex-wrap: nowrap; width: 100%; max-width: 100%; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chip-filter::-webkit-scrollbar { display: none; }
  .chip-filter__btn { flex: none; white-space: nowrap; }
  .popup-card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  .popup-card.is-live { padding-left: 13px; }
  .popup-card__actions { justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
}

/* Installation status (ping), A/B test, own templates (v0.2) */
.ping { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -8px 0 18px; color: var(--ink); font-size: .88rem; font-weight: 600; }
.install-grid .ping { margin: 0 0 14px; }
.ping a { font-weight: 700; }
.ping .muted { font-weight: 400; }
.ping__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.ping--running .ping__dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.ping--stale .ping__dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.badge--ab { display: inline-flex; align-items: center; gap: 4px; background: #ede9fe; color: #6d28d9; }
.badge--ab::before { display: none; }
.badge--ab .icon { width: 13px; height: 13px; }
.ab-tag { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: .78rem; font-weight: 800; }
.ab-tag--b { background: #ede9fe; color: #6d28d9; }
.ab-table tr.is-winner th, .ab-table tr.is-winner td { background: var(--ok-bg); }
.ab-verdict { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--ink); font-weight: 600; }
.ab-verdict .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.ab-verdict--ok { background: var(--ok-bg); color: #065f3b; }
.ab-verdict--warn { background: var(--warn-bg); color: var(--warn); }
.page-title h1 .badge { vertical-align: middle; font-size: .8rem; }
.tpl { position: relative; }
.tpl--own .tpl__button { border-color: #d8ccfb; }
.tpl--own .tpl__layout { color: #6d28d9; }
.tpl__delete { position: absolute; top: 16px; right: 16px; margin: 0; }
.tpl__delete .icon-btn { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); }

/* ---------- Marketing site (landing, pricing) ---------- */
.mk-hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, #e9e1ff 0, transparent 60%), radial-gradient(900px 400px at -10% 20%, #ffe9e5 0, transparent 55%); }
.mk-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.mk-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--blue); font-size: .82rem; font-weight: 700; }
.mk-hero h1 { margin: 18px 0 14px; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; }
.mk-hero h1 em { font-style: normal; color: var(--blue); }
.mk-lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.mk-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.mk-section { padding: 72px 0; }
.mk-section--tint { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mk-section__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.mk-section__head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.03em; }
.mk-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mk-feature { padding: 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.mk-section--tint .mk-feature { background: var(--bg); }
.mk-feature__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.mk-feature h3 { margin-bottom: 6px; }
.mk-feature p { margin: 0; color: var(--muted); }
.mk-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.mk-step { position: relative; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.mk-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; }
.mk-step p { margin: 0; color: var(--muted); }
.mk-pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1040px; margin: 0 auto; }
.mk-plan { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.mk-plan--featured { border: 2px solid var(--blue); box-shadow: var(--shadow); }
.mk-plan__price { font-size: 2.3rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.mk-plan__price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.mk-plan > .muted { margin: 0; min-height: 3.2em; } /* same price line in every card */
.mk-plan__flag { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: 0; vertical-align: middle; }
.mk-plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mk-plan li { display: flex; gap: 8px; align-items: flex-start; }
.mk-plan li .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--ok); }
.mk-plan .btn { margin-top: auto; }
.mk-final { padding: 56px 32px; border-radius: 32px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; text-align: center; }
.mk-final h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.mk-final p { color: rgba(255, 255, 255, .85); }
@media (max-width: 960px) {
  .mk-hero__grid, .mk-features, .mk-pricing { grid-template-columns: 1fr; }
  .mk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Hero illustration: a browser window with a popup over it */
.mk-demo { position: relative; border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); overflow: visible; }
.mk-demo__bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mk-demo__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mk-demo__page { display: grid; gap: 12px; padding: 22px; border-radius: 0 0 22px 22px; background: #f6f1f4; min-height: 330px; }
.mk-demo__page b, .mk-demo__page span, .mk-demo__cards i { display: block; border-radius: 8px; background: #e9dfe4; }
.mk-demo__page b { width: 60%; height: 26px; }
.mk-demo__page span { width: 80%; height: 11px; }
.mk-demo__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.mk-demo__cards i { height: 110px; }
.mk-demo__popup { position: absolute; left: 50%; top: 54%; display: grid; gap: 10px; width: min(300px, 78%); padding: 26px 24px 22px; border-radius: 20px; background: #fff; box-shadow: 0 30px 70px rgba(74, 21, 56, .28); transform: translate(-50%, -50%); text-align: center; animation: mk-pop .7s cubic-bezier(.2, .9, .3, 1.2) both .3s; }
.mk-demo__popup strong { color: var(--ink); font-size: 1.3rem; letter-spacing: -.02em; }
.mk-demo__popup p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.mk-demo__x { position: absolute; top: 8px; right: 14px; color: var(--muted); font-size: 1.2rem; }
.mk-demo__input { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .88rem; text-align: left; }
.mk-demo__btn { padding: 11px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 800; }
.mk-demo__float { position: absolute; right: -16px; bottom: -20px; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 16px; background: var(--navy); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); }
.mk-demo__float .icon { color: #ffd1dc; }
@keyframes mk-pop { from { opacity: 0; transform: translate(-50%, -44%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { .mk-demo__popup { animation: none; } }

@media (max-width: 600px) {
  .mk-steps { grid-template-columns: 1fr; }
  .mk-hero { padding: 44px 0 40px; }
  .mk-demo__float { right: 8px; }
}

/* Integrations */
.integrations-intro { max-width: 760px; margin: 0 0 20px; }
.integrations-intro p { margin: 0 0 6px; }
.integrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; align-items: start; }
.integrations .panel { margin-bottom: 0; }
.integration { display: grid; gap: 16px; scroll-margin-top: 90px; }
.integration:target { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft), var(--shadow-sm); }
.integration__head { display: flex; align-items: center; gap: 14px; }
.integration__title { flex: 1; min-width: 0; }
.integration__title h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }
.integration__title p { margin: 2px 0 0; }
.integration__logo { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em; }
.integration__logo--ecomail { background: #19b394; }
.integration__logo--smartemailing { background: #1d5bd8; }
.integration__logo--mailchimp { background: #ffe01b; color: #241c15; }
.integration__logo--mailerlite { background: #09a85a; }
.integration .badge--error { background: var(--error-bg); color: var(--error); }
.integration__meta { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); font-size: .9rem; }
.integration__meta div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.integration__meta dt { color: var(--muted); }
.integration__meta dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.integration__error dt, .integration__error dd { color: var(--error); }
.integration__form { gap: 16px; }
.integration__form .alert { margin: 0; }
.integration__fields { display: grid; gap: 14px; }
.integration__fields label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.integration__saved { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: .78rem; font-weight: 700; }
.integration__help { font-weight: 400; }
.integration__popups { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.integration__popups legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-weight: 600; font-size: .92rem; }
.integration__popup-list { display: grid; gap: 6px; max-height: 190px; margin: 0 0 0 32px; padding: 0; overflow-y: auto; list-style: none; }
.integration__popups:has(input[value="all"]:checked) .integration__popup-list { display: none; }
.integration__consent { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-bg); }
.integration__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 4px; }
.integration__disconnect { margin-left: auto; background: transparent; color: var(--error); border-color: transparent; }
.integration__disconnect:hover { background: var(--error-bg); color: var(--error); }
@media (max-width: 600px) {
  .integration__disconnect { margin-left: 0; }
}
.popup-ids { margin: 14px 0; }
.popup-ids code { white-space: nowrap; word-break: normal; }
/* Auth pages: branded visual with a sample popup (no stock photo) */
.auth-visual--plain { background: radial-gradient(circle at 18% 14%, rgba(255, 255, 255, .16) 0 90px, transparent 91px), radial-gradient(circle at 88% 36%, rgba(255, 255, 255, .1) 0 64px, transparent 65px), linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 48%, var(--blue) 100%); }
.auth-visual__popup { top: 40%; }
.auth-visual__gift { font-size: 2.2rem; line-height: 1; }
