/* ==========================================================================
   Integrations page pass: flat marketing overrides
   Scoped under .mk-int-page so styles do not leak site-wide.
   Parent enqueues this after site.css.
   ========================================================================== */

.mk-int-page {
  --int-ink: #182021;
  --int-blue: #047857;
  --int-line: #e6e8ea;
  --int-muted: #5c6566;
  --int-paper: #ffffff;
  background: var(--int-paper);
  color: var(--int-ink);
}

/* Page head: assets/css/page-head.css, shared with every inner page. */

/* ---- Sections by purpose ---- */
.mk-int-page .lx-int-section + .lx-int-section {
  margin-top: clamp(40px, 5vw, 64px);
}

.mk-int-page .lx-int-section-head {
  margin: 0 0 18px;
}

.mk-int-page .lx-int-section-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--int-ink);
}

.mk-int-page .lx-int-section-head p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--int-muted);
}

.mk-int-page .lx-int-section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}

.mk-int-page .lx-int-section-head--row p a {
  font-weight: 600;
  color: var(--int-blue);
}

/* ---- Grid ---- */
.mk-int-page .lx-int-body {
  padding: 0 0 clamp(48px, 6vw, 80px);
  background: var(--int-paper);
}

.mk-int-page .lx-int-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mk-int-page .lx-int-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
  padding: 28px 26px 24px;
  background: var(--int-paper);
  border: 1px solid var(--int-line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgb(24 32 33 / 0.04), 0 8px 20px -12px rgb(24 32 33 / 0.18);
  color: inherit;
  text-decoration: none;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms var(--ease-soft),
    box-shadow 180ms var(--ease-soft);
}

/* The whole card is a link: it lifts and its border turns blue, and the arrow moves. */
.mk-int-page .lx-int-card:hover,
.mk-int-page .lx-int-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--int-blue);
  box-shadow: 0 18px 32px -20px rgb(24 32 33 / 0.38);
}

.mk-int-page .lx-int-card:focus-visible {
  outline: 2px solid var(--int-blue);
  outline-offset: 3px;
}

.mk-int-page .lx-int-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--int-muted);
  transition:
    color 180ms var(--ease-soft),
    transform 180ms var(--ease-out);
}

.mk-int-page .lx-int-card:hover .lx-int-arrow,
.mk-int-page .lx-int-card:focus-visible .lx-int-arrow {
  color: var(--int-blue);
  transform: translate(2px, -2px);
}

.mk-int-page .lx-int-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--int-line);
  color: var(--int-ink);
}

/* Every card gets the same logo tile (size, border, padding), with the logo centred at one size. */
.mk-int-page .lx-int-card .lx-int-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  margin: 0 0 18px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--int-line);
  border-radius: 14px;
}

.mk-int-page .lx-int-card .lx-int-icon img {
  display: block;
  width: 32px;
  height: 32px;
  max-width: none;
  object-fit: contain;
}

.mk-int-page .lx-int-cat {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--int-muted);
}

.mk-int-page .lx-int-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--int-ink);
}

.mk-int-page .lx-int-card p {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--int-muted);
}

.mk-int-page .lx-int-checks {
  display: grid;
  gap: 8px;
  margin: 2px 0 20px;
  padding: 0;
  list-style: none;
}

.mk-int-page .lx-int-checks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--int-ink);
}

.mk-int-page .lx-int-checks li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--int-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Under a section title: the checks sit in one row, wrapping on small screens. */
.mk-int-page .lx-int-checks--row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 10px 0 0;
}

.mk-int-page .lx-int-checks--row li { color: var(--int-muted); }

.mk-int-page .lx-int-status {
  margin-top: auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--int-blue);
}

.mk-int-page .lx-int-note {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--int-muted);
}

.mk-int-page .lx-int-note a {
  color: var(--int-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mk-int-page .lx-int-note a:hover {
  color: var(--int-blue);
}

/* ---- Final CTA: keep shared halfway footer bridge ---- */
.mk-int-page .lx-final {
  margin-top: calc(var(--final-half, 80px) + 12px);
}

.mk-int-page .lx-final-card {
  background: #fff;
  border: 1px solid var(--int-line);
  border-radius: 18px;
  box-shadow:
    0 10px 24px rgb(24 32 33 / 0.06),
    0 28px 56px rgb(24 32 33 / 0.12);
}

.mk-int-page .lx-final .lx-h2 {
  color: var(--int-ink);
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-weight: 500;
}

.mk-int-page .lx-final .lx-sub {
  color: var(--int-muted);
}

@media (max-width: 960px) {
  .mk-int-page .lx-int-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones: single column. Keep shared .lx-final footer bridge untouched. */
@media (max-width: 820px) {
  .mk-int-page .lx-int-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .mk-int-page .lx-int-card {
    width: 100%;
    min-width: 0;
    padding: 24px 20px 20px;
  }

}

/* ==========================================================================
   Integration pages: /integrations/<slug>/
   A header with the logo, name and maker, a tab row, a hero, the text, and a
   Resources panel. Built on the same tokens as the Integrations page.
   ========================================================================== */

.mk-intg-page {
  --intg-soft: #f6f7f9;
  --intg-pale: #ecfdf5;
}

/* ---- Header: logo, name, by, button, tab row ---- */
.mk-intg-head {
  padding: 22px 0 0;
  background: var(--int-paper);
  border-bottom: 1px solid var(--int-line);
}

.mk-intg-head .lx-crumbs {
  margin-bottom: 22px;
}

.mk-intg-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  padding-bottom: 24px;
}

.mk-intg-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 76px;
  height: 76px;
  background: #fff;
  border: 1px solid var(--int-line);
  border-radius: 18px;
}

.mk-intg-logo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.mk-intg-titletext {
  flex: 1 1 14rem;
  min-width: 0;
}

.mk-intg-titletext h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--int-ink);
}

.mk-intg-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 6px 0 0;
  font-size: 0.9375rem;
  color: var(--int-muted);
}

.mk-intg-by a {
  color: var(--int-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mk-intg-by a:hover {
  color: var(--int-blue);
}

.mk-intg-chip {
  padding: 2px 11px;
  border: 1px solid var(--int-line);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--int-muted);
}

.mk-intg-cta {
  margin-left: auto;
}

.mk-intg-tabs {
  display: flex;
  gap: 4px 30px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mk-intg-tabs::-webkit-scrollbar {
  display: none;
}

.mk-intg-tabs a {
  flex: none;
  margin-bottom: -1px;
  padding: 12px 0 14px;
  border-bottom: 2px solid transparent;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--int-muted);
  transition: color 160ms var(--ease-soft), border-color 160ms var(--ease-soft);
}

.mk-intg-tabs a:hover {
  color: var(--int-ink);
}

.mk-intg-tabs a.is-active {
  color: var(--int-ink);
  border-bottom-color: var(--int-blue);
}

/* ---- Hero: the one-line promise and a simple picture of the connection ---- */
.mk-intg-hero {
  background: var(--intg-soft);
  border-bottom: 1px solid var(--int-line);
}

.mk-intg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(36px, 5.5vw, 72px);
}

.mk-intg-kicker {
  margin: 0 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--int-muted);
}

.mk-intg-hero-copy h2 {
  margin: 0 0 20px;
  max-width: 28ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.3vw, 2.5rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--int-ink);
}

.mk-intg-plan {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--int-muted);
}

.mk-intg-plan span {
  font-weight: 600;
  color: var(--int-ink);
}

.mk-intg-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px) 20px;
  background: var(--intg-pale);
  border-radius: 24px;
}

.mk-intg-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(96px, 11vw, 124px);
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid rgb(4 120 87 / 0.14);
  border-radius: 28px;
  box-shadow: 0 18px 34px -22px rgb(24 32 33 / 0.4);
}

.mk-intg-tile img {
  display: block;
  width: 52%;
  height: 52%;
  object-fit: contain;
}

.mk-intg-link {
  position: relative;
  flex: 0 0 clamp(44px, 7vw, 84px);
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--int-blue) 0 6px, transparent 6px 12px);
}

.mk-intg-link i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--int-blue);
  border: 3px solid var(--intg-pale);
  border-radius: 50%;
  box-sizing: content-box;
  transform: translate(-50%, -50%);
}

/* ---- Body: text on the left, Resources on the right ---- */
.mk-intg-body {
  padding: clamp(40px, 5vw, 72px) 0 clamp(48px, 6vw, 80px);
  background: var(--int-paper);
}

.mk-intg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* The questions keep the same measure as the text above them. */
.mk-intg-faq { max-width: 44rem; }

.mk-intg-sec + .mk-intg-sec {
  margin-top: clamp(36px, 4.5vw, 52px);
}

.mk-intg-sec h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--int-ink);
}

.mk-intg-sec p {
  max-width: 44rem;
  margin: 0 0 14px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #2b3436;
}

.mk-intg-sec code,
.mk-intg-steps code {
  padding: 1px 6px;
  background: var(--intg-soft);
  border: 1px solid var(--int-line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.mk-intg-list {
  display: grid;
  gap: 10px;
  max-width: 44rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mk-intg-list li {
  position: relative;
  padding-left: 24px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #2b3436;
}

.mk-intg-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  background: var(--int-blue);
  border-radius: 50%;
}

.mk-intg-needs {
  max-width: 44rem;
  margin: 0 0 24px;
  padding: 18px 22px;
  background: var(--intg-soft);
  border: 1px solid var(--int-line);
  border-radius: 14px;
}

.mk-intg-needs h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--int-ink);
}

.mk-intg-needs ul {
  margin: 0;
  padding-left: 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: #2b3436;
}

.mk-intg-steps {
  display: grid;
  gap: 16px;
  max-width: 44rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: intg-step;
}

.mk-intg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  counter-increment: intg-step;
}

.mk-intg-steps li::before {
  content: counter(intg-step);
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--int-blue);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #fff;
}

.mk-intg-steps li span {
  padding-top: 3px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #2b3436;
}

.mk-intg-sec .mk-intg-lessons {
  margin: 22px 0 0;
  font-size: 1rem;
}

.mk-intg-sec .mk-intg-lessons a,
.mk-intg-panel-text a {
  font-weight: 600;
  color: var(--int-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Resources panel ---- */
.mk-intg-aside {
  display: grid;
  gap: 16px;
}

.mk-intg-panel {
  padding: 20px 20px 16px;
  background: #fff;
  border: 1px solid var(--int-line);
  border-radius: 16px;
}

.mk-intg-panel h3 {
  margin: 0 0 10px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--int-ink);
}

.mk-intg-panel-text {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--int-muted);
}

.mk-intg-res {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mk-intg-res a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px 9px 4px;
  border-radius: 12px;
  color: var(--int-ink);
  text-decoration: none;
  transition: background 160ms var(--ease-soft);
}

.mk-intg-res--plain a {
  padding-left: 8px;
}

.mk-intg-res a:hover,
.mk-intg-res a:focus-visible {
  background: var(--intg-soft);
}

.mk-intg-res-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  background: var(--int-blue);
  border-radius: 10px;
  color: #FFFFFF;
}

/* The questions people search for, under the setup steps. */
.mk-intg-faq details { border-bottom: 1px solid var(--int-line); }

.mk-intg-faq details:first-of-type { border-top: 1px solid var(--int-line); }

.mk-intg-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.mk-intg-faq summary::-webkit-details-marker { display: none; }

.mk-intg-faq summary::after { content: "+"; flex: none; color: var(--int-muted); }

.mk-intg-faq details[open] summary::after { content: "\2212"; }

.mk-intg-faq details p { margin: 0 0 16px; line-height: 1.65; color: var(--int-muted); }

.mk-intg-res-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.mk-intg-res-text strong {
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.3;
}

.mk-intg-res-text small {
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--int-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-intg-res-out {
  flex: none;
  font-size: 1rem;
  color: var(--int-muted);
  transition: color 160ms var(--ease-soft), transform 160ms var(--ease-out);
}

.mk-intg-res a:hover .mk-intg-res-out,
.mk-intg-res a:focus-visible .mk-intg-res-out {
  color: var(--int-blue);
  transform: translateX(2px);
}

/* ---- More integrations ---- */
.mk-intg-more {
  padding: 0 0 clamp(40px, 5vw, 72px);
  background: var(--int-paper);
}

@media (max-width: 980px) {
  .mk-intg-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mk-intg-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mk-intg-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .mk-intg-aside .mk-intg-panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .mk-intg-logo {
    width: 60px;
    height: 60px;
    border-radius: 15px;
  }

  .mk-intg-logo img {
    width: 36px;
    height: 36px;
  }

  .mk-intg-cta {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .mk-intg-cta .lx-btn {
    width: 100%;
    justify-content: space-between;
  }

  .mk-intg-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .mk-intg-visual {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-int-page .lx-int-card,
  .mk-int-page .lx-int-arrow,
  .mk-intg-res-out {
    transition: none;
  }

  .mk-int-page .lx-int-card:hover,
  .mk-int-page .lx-int-card:focus-visible,
  .mk-int-page .lx-int-card:hover .lx-int-arrow,
  .mk-int-page .lx-int-card:focus-visible .lx-int-arrow {
    transform: none;
  }
}

/* Independence line: Mankai is not made or endorsed by these companies. */
.mk-intg-indie {
  margin: 28px 0 0;
  font-size: 0.8125rem;
  color: var(--int-muted);
  text-align: center;
}

/* More integrations: one row that slides, three cards across, one on a phone, a dot per page. */
.mk-int-page .lx-int-grid.mk-int-rail {
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 32px) / 3);
  grid-auto-flow: column;
  margin: 0;
  padding: 4px 2px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
}

.mk-int-rail::-webkit-scrollbar { display: none; }

.mk-int-rail > li { display: flex; scroll-snap-align: start; }

.mk-int-rail > li > .lx-int-card { width: 100%; }

.mk-intg-more .mk-tl-rail-dots { display: flex; justify-content: center; margin-top: 8px; }

.mk-intg-more .mk-tl-rail-dots:empty { display: none; }

.mk-intg-more .mk-tl-rail-dots button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.mk-intg-more .mk-tl-rail-dots button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--int-line);
  transition: width 0.25s ease, background 0.25s ease;
}

.mk-intg-more .mk-tl-rail-dots button[aria-current="true"] { width: 26px; }

.mk-intg-more .mk-tl-rail-dots button[aria-current="true"]::before { width: 18px; background: var(--int-blue); }

@media (max-width: 900px) {
  .mk-int-page .lx-int-grid.mk-int-rail { grid-auto-columns: calc((100% - 16px) / 2); }
}

@media (max-width: 640px) {
  .mk-int-page .lx-int-grid.mk-int-rail { grid-auto-columns: 100%; }
}

/* Phones: a calmer integration header and hero. */
@media (max-width: 640px) {
  .mk-intg-head .lx-crumbs { display: none; }
  .mk-intg-title { gap: 12px; }
  .mk-intg-logo { width: 48px; height: 48px; border-radius: 12px; }
  .mk-intg-logo img { width: 26px; height: 26px; }
  .mk-intg-titletext h1 { font-size: 1.5rem; }
  .mk-intg-by { font-size: 0.875rem; }
  .mk-intg-chip { padding: 0 8px; font-size: 0.75rem; }
  .mk-intg-cta .lx-btn { height: 44px; justify-content: center; }
  .mk-intg-tabs { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .mk-intg-tabs a { flex: none; font-size: 0.875rem; }
  .mk-intg-hero { padding: 28px 0 32px; }
  .mk-intg-hero h2,
  #mk-intg-lede { font-size: 1.4rem; }
  .mk-intg-visual { max-height: 160px; padding: 20px; }
}
