/* mp-kerfi.css: styles for the Kerfi pages (index + detail).
   Loaded after mp-dark.css by kerfi/index.jinja and kerfi/detail.jinja.
   Colours come from the light-page tokens in mp-dark.css (--ink, --light-line, ...).
   Breakpoints: 1023px (tablet), 767px (mobile), 480px (small phones). */


/* ═══════════════════════════════════════════════════════════
   KERFI INDEX  (kerfi/index.jinja)
═══════════════════════════════════════════════════════════ */

/* ── Hero ── */
.mp-kerfi-hero {
  position: relative;
  overflow: hidden;
  background: #13151E;
}

.mp-kerfi-hero__glow-a {
  width: 640px; height: 640px;
  top: -220px; right: -120px;
  background: radial-gradient(circle, rgba(131,55,148,.45), transparent 62%);
}

.mp-kerfi-hero__glow-b {
  width: 560px; height: 560px;
  bottom: -280px; left: -160px;
  background: radial-gradient(circle, rgba(40,199,111,.16), transparent 65%);
}

.mp-kerfi-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px var(--gutter) 56px;
  text-align: center;
}

.mp-kerfi-hero__eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary-light);
  margin: 0 0 18px;
}

.mp-kerfi-hero__h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 20px;
  text-wrap: balance;
}

.mp-kerfi-hero__lede {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,.65);
  max-width: 34em;
  margin: 0 auto;
  text-wrap: pretty;
}

@media (max-width: 767px) {
  .mp-kerfi-hero__inner {
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .mp-kerfi-hero__h1 {
    font-size: var(--fs-h1);
    letter-spacing: -.02em;
  }
}

/* ── Sticky filter bar ── */
.mp-kerfi-bar {
  position: sticky;
  top: calc(var(--header-h) - 1px);
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--light-line);
}

.mp-kerfi-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px var(--gutter);
}

.mp-kerfi-bar__chips {
  flex: 1;
}

.mp-kerfi-search {
  position: relative;
  flex-shrink: 0;
  width: 260px;
}

.mp-kerfi-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp-kerfi-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px 10px 38px;
  border-radius: 100px;
  border: 1px solid var(--light-line);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.mp-kerfi-search__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(131,55,148,.12);
}

@media (max-width: 767px) {
  /* chips on one scrolling row, search below: about 105px in total */
  .mp-kerfi-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .mp-kerfi-bar__chips {
    flex: none;
  }

  .mp-kerfi-bar .mp-chip {
    min-height: 40px;
  }

  .mp-kerfi-search {
    width: 100%;
  }

  .mp-kerfi-search__input {
    height: 40px;
    font-size: 16px;   /* below 16px iOS zooms the page on focus */
  }
}

@media (pointer: coarse) {
  .mp-kerfi-search__input {
    font-size: 16px;
  }
}

/* ── Results ── */
.mp-kerfi-results {
  background: #fff;
}

.mp-kerfi-results__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px var(--gutter) 88px;
}

.mp-kerfi-count {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 20px;
}

.mp-kerfi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* the display rules above and below would otherwise beat the hidden attribute */
.mp-kerfi-grid[hidden],
.mp-kerfi-card[hidden],
.mp-kerfi-empty[hidden] {
  display: none;
}

.mp-kerfi-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid var(--light-line);
  border-radius: 10px;
  background: #fff;
  cursor: default;
}

.mp-kerfi-card--link {
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

.mp-kerfi-card--link:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 18px rgba(131,55,148,.15);
}

.mp-kerfi-card__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin-bottom: 14px;
}

.mp-kerfi-card__logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

/* initial letter shown when the logo fails to load (mp-front.js adds .is-broken) */
.mp-kerfi-card__fallback {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(131,55,148,.1);
  border: 1px solid rgba(131,55,148,.2);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

.mp-kerfi-card__logo img.is-broken {
  display: none;
}

.mp-kerfi-card__logo img.is-broken + .mp-kerfi-card__fallback {
  display: flex;
}

.mp-kerfi-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}

.mp-kerfi-card__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0 0 14px;
  text-wrap: pretty;
  flex: 1;
}

.mp-kerfi-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #EBEAEF;
}

.mp-kerfi-card__cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.mp-kerfi-card__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  background: rgba(131,55,148,.1);
  border-radius: 4px;
  padding: 2px 7px;
}

.mp-kerfi-empty {
  margin-top: 8px;
  padding: 72px var(--gutter);
  text-align: center;
  border: 1px dashed var(--light-line);
  border-radius: 12px;
}

.mp-kerfi-empty__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}

.mp-kerfi-empty__text {
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0 0 24px;
}

@media (max-width: 1023px) {
  .mp-kerfi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .mp-kerfi-results__inner {
    padding-top: 20px;
    padding-bottom: 56px;
  }

  /* compact rows: logo | name + category | badge */
  .mp-kerfi-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mp-kerfi-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "logo name badge"
      "logo cat  badge";
    align-items: center;
    column-gap: 14px;
    row-gap: 2px;
    height: auto;
    padding: 12px 14px;
  }

  .mp-kerfi-card__logo {
    grid-area: logo;
    width: 36px;
    height: 36px;
    margin-bottom: 0;
  }

  .mp-kerfi-card__logo img,
  .mp-kerfi-card__fallback {
    width: 36px;
    height: 36px;
  }

  .mp-kerfi-card__name {
    grid-area: name;
    margin-bottom: 0;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mp-kerfi-card__desc {
    display: none;
  }

  /* the footer's children (category, badge) take part in the card grid */
  .mp-kerfi-card__foot {
    display: contents;
  }

  .mp-kerfi-card__cat {
    grid-area: cat;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mp-kerfi-card__badge {
    grid-area: badge;
  }
}


/* ═══════════════════════════════════════════════════════════
   KERFI DETAIL  (kerfi/detail.jinja)
═══════════════════════════════════════════════════════════ */

/* ── Hero ── */
.ks-hero {
  background: var(--ink);
  overflow: hidden;
  position: relative;
}
.ks-hero-glow-a {
  position: absolute; width: 640px; height: 640px;
  top: -220px; right: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(131,55,148,.45), transparent 62%);
  pointer-events: none;
}
.ks-hero-glow-b {
  position: absolute; width: 560px; height: 560px;
  bottom: -280px; left: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(40,199,111,.16), transparent 65%);
  pointer-events: none;
}
.ks-hero-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 28px var(--gutter) 88px;
  position: relative; z-index: 1;
}
.ks-breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-bottom: 48px;
}
.ks-breadcrumb a { color: rgba(255,255,255,.45); text-decoration: none; }
.ks-breadcrumb a:hover { color: rgba(255,255,255,.8); }
.ks-breadcrumb span { color: rgba(255,255,255,.85); }
.ks-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 64px;
  align-items: center;
}
.ks-hero-grid > * { min-width: 0; }

/* Hero left */
.ks-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 100px;
  background: rgba(40,199,111,.14);
  border: 1px solid rgba(40,199,111,.30);
  margin-bottom: 24px;
}
.ks-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}
.ks-status-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--success-light);
}
.ks-hero h1 {
  font-size: 54px; font-weight: 800;
  line-height: 1.08; letter-spacing: -.03em;
  text-wrap: balance; margin-bottom: 24px; color: #fff;
}
.ks-hero h1 .accent { color: var(--primary-light); }
.ks-hero-lede {
  font-size: 19px; line-height: 1.6;
  color: rgba(255,255,255,.7);
  max-width: 30em; text-wrap: pretty; margin-bottom: 36px;
}
.ks-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ks-btn-primary {
  padding: 14px 26px; border-radius: 8px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 20px rgba(131,55,148,.35);
  transition: background .15s;
}
.ks-btn-primary:hover, .ks-btn-primary:active { background: var(--primary-ink); color: #fff; text-decoration: none; }
.ks-btn-ghost {
  padding: 14px 26px; border-radius: 8px;
  background: transparent; color: #fff;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.22);
  transition: background .15s;
}
.ks-btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }

/* Flow diagram */
.ks-diagram {
  padding: 28px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
  display: flex; flex-direction: column; gap: 0;
}
.ks-diagram-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 12px;
}
.ks-diagram-row.row-source {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.ks-diagram-row.row-mesh {
  background: rgba(131,55,148,.16);
  border: 1px solid rgba(215,148,230,.45);
}
.ks-diagram-row.row-dest {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
}
.ks-diagram-icon {
  width: 56px; height: 56px; border-radius: 10px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.ks-diagram-icon img { width: 34px; height: 34px; object-fit: contain; }
.ks-diagram-icon img.is-broken { display: none; }
.ks-diagram-icon--mesh { background: rgba(255,255,255,.12); }
.ks-diagram-icon--mesh img { filter: invert(1); }
.ks-diagram-icon--dest { background: rgba(255,255,255,.10); }
.ks-diagram-initial {
  font-size: 15px; font-weight: 700; color: var(--primary);
}
.ks-diagram-text { flex: 1; min-width: 0; }
.ks-diagram-title {
  font-size: 17px; font-weight: 700;
  margin: 0 0 2px;
}
.row-source .ks-diagram-title { color: var(--ink); }
.row-mesh   .ks-diagram-title,
.row-dest   .ks-diagram-title { color: #fff; }
.ks-diagram-sub {
  font-size: 13px; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-source .ks-diagram-sub { color: var(--ink-muted); }
.row-mesh   .ks-diagram-sub { color: rgba(255,255,255,.6); }
.row-dest   .ks-diagram-sub { color: rgba(255,255,255,.55); }
.ks-diagram-badge {
  margin-left: auto; flex-shrink: 0;
  padding: 5px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
.badge-source { background: rgba(131,55,148,.12); color: var(--primary); }
.badge-mesh   { background: rgba(255,255,255,.16); color: #fff; }
.badge-dest   { background: rgba(255,255,255,.10); color: rgba(255,255,255,.8); }

.ks-diagram-connector {
  display: flex; align-items: center;
  justify-content: center;
  padding: 6px 0; position: relative;
}
.ks-arrow {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
}
.ks-arrow-line {
  width: 2px; height: 20px;
}
.ks-arrow-head {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.ks-arrow.arrow-down-primary .ks-arrow-line {
  background: linear-gradient(to bottom, rgba(255,255,255,.45), rgba(215,148,230,.9));
}
.ks-arrow.arrow-down-primary .ks-arrow-head {
  border-top: 7px solid #D794E6;
}
.ks-arrow.arrow-down-light .ks-arrow-line {
  background: linear-gradient(to bottom, rgba(215,148,230,.9), rgba(255,255,255,.45));
}
.ks-arrow.arrow-down-light .ks-arrow-head {
  border-top: 7px solid rgba(255,255,255,.7);
}
.ks-connector-label {
  position: absolute;
  left: 50%; margin-left: 20px;
  max-width: calc(50% - 24px);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px; letter-spacing: .04em;
  color: rgba(255,255,255,.45);
}

/* ── Draft notice (source not published yet) ── */
.ks-draft {
  background: #FFF8EE;
  border-bottom: 1px solid #F5C96E;
  padding: 14px 0;
}
.ks-draft__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ks-draft__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px;
  background: #FEF0CE; border: 1px solid #F5C96E;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #8A5C00; white-space: nowrap;
}
.ks-draft__text {
  font-size: 14px; color: #6B4900; line-height: 1.5;
}

/* ── Facts strip ── */
.ks-facts {
  background: var(--light-surface);
  border-bottom: 1px solid var(--light-line);
}
.ks-facts-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 32px var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.ks-fact-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-muted); margin-bottom: 8px;
}
.ks-fact-value {
  font-size: 17px; font-weight: 700; color: var(--ink);
}

/* ── Section base ── */
.ks-section {
  padding: 88px 0;
}
.ks-section--white { background: #fff; }
.ks-section--tint { background: #F8F7FF; }
.ks-section--compact { padding: 72px 0; }
.ks-section-inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.ks-section-alt { background: var(--light-surface); border-top: 1px solid var(--light-line); border-bottom: 1px solid var(--light-line); }
.ks-section h2 {
  font-size: 34px; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink);
  margin-bottom: 12px; text-wrap: balance;
}
/* heading with an action button beside it */
.ks-section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.ks-section-head h2 { margin: 0; }
.ks-section-sub {
  font-size: 17px; color: var(--ink-muted);
  margin-bottom: 48px;
}
.ks-section-lede {
  font-size: 17px; line-height: 1.65; color: var(--ink-body);
  text-wrap: pretty;
  margin: 16px 0 12px;
}
.ks-section-lede + .ks-section-sub { color: var(--ink-body); line-height: 1.65; }

/* ── Steps ── */
.ks-steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.ks-step-card {
  padding: 26px; background: #fff;
  border: 1px solid var(--light-line); border-radius: 10px;
  border-top: 3px solid var(--primary);
}
.ks-step-num {
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin-bottom: 10px;
}
.ks-step-title {
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.ks-step-body {
  font-size: 14px; line-height: 1.6; color: var(--ink-muted);
}

/* ── Use cases ── */
.ks-use-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.ks-use-card {
  padding: 30px; background: #fff;
  border: 1px solid var(--light-line); border-radius: 10px;
}
.ks-use-tag {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--primary); margin-bottom: 12px;
}
.ks-use-title {
  font-size: 19px; font-weight: 700; color: var(--ink);
  text-wrap: balance; margin-bottom: 12px;
}
.ks-use-body {
  font-size: 15px; line-height: 1.65; color: var(--ink-muted);
}

/* ── Tables ── */
.ks-tables-header {
  display: flex; align-items: flex-end;
  justify-content: space-between; margin-bottom: 32px;
}
.ks-tables-header .ks-section-sub { margin-bottom: 0; }
.ks-table-count-chip {
  padding: 10px 16px; border-radius: 8px;
  background: var(--light-surface); border: 1px solid var(--light-line);
  font-size: 14px; font-weight: 600; color: var(--ink-body);
  white-space: nowrap;
}
.ks-table-wrap {
  border: 1px solid var(--light-line); border-radius: 10px; overflow: hidden;
}
.ks-table-head {
  display: grid; grid-template-columns: 1fr 1.1fr 1.5fr; gap: 24px;
  padding: 14px 24px;
  background: var(--light-surface);
  border-bottom: 1px solid var(--light-line);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-muted);
}
.ks-table-row {
  display: grid; grid-template-columns: 1fr 1.1fr 1.5fr; gap: 24px;
  padding: 16px 24px; align-items: baseline;
  border-bottom: 1px solid var(--light-line-soft);
  transition: background .12s;
}
.ks-table-row:last-child { border-bottom: none; }
.ks-table-row:hover { background: var(--light-surface-hover); }
.ks-table-col1 { font-size: 15px; font-weight: 600; color: var(--ink); }
.ks-table-col2 { font-family: monospace; font-size: 13px; color: var(--primary); }
.ks-table-col3 { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.ks-table-foot {
  padding: 14px 24px;
  background: var(--light-surface);
  font-size: 13px; color: var(--ink-muted);
}
.ks-table-foot code {
  font-family: monospace; color: var(--ink-body);
}

/* ── Prerequisites ── */
.ks-prereqs-inner { max-width: 720px; }
.ks-prereq-item {
  display: flex; gap: 14px; margin-bottom: 24px;
}
.ks-prereq-item:last-child { margin-bottom: 0; }
.ks-prereq-mark {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(40,199,111,.14);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.ks-prereq-check {
  width: 12px; height: 12px; color: var(--success);
}
.ks-prereq-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin-bottom: 4px;
}
.ks-prereq-body {
  font-size: 15px; line-height: 1.6; color: var(--ink-muted);
}
.ks-freq-notice {
  margin-top: 28px;
  padding: 18px 20px; border-radius: 10px;
  background: rgba(255,159,67,.09);
  border: 1px solid rgba(255,159,67,.30);
  max-width: 720px;
}
.ks-freq-notice-title {
  font-size: 14px; font-weight: 700; color: #B26A1A;
  margin-bottom: 4px;
}
.ks-freq-notice-body {
  font-size: 14px; line-height: 1.6; color: #7A5518;
}

/* ── CTA band ── */
.ks-cta {
  background: var(--ink);
  padding: 72px 0;
}
.ks-cta-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; justify-content: space-between;
  align-items: center; gap: 48px; flex-wrap: wrap;
}
.ks-cta h2 {
  font-size: 32px; font-weight: 800; color: #fff;
  margin-bottom: 10px;
}
.ks-cta-sub {
  font-size: 17px; color: rgba(255,255,255,.65);
  margin: 0;
}
.ks-cta-btn {
  padding: 16px 32px; border-radius: 8px;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 600; text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(131,55,148,.35);
  transition: background .15s;
}
.ks-cta-btn:hover, .ks-cta-btn:active { background: var(--primary-ink); color: #fff; text-decoration: none; }

/* ── Related ── */
.ks-section .ks-related-title { font-size: 24px; }
.ks-related-sub {
  font-size: 15px; color: var(--ink-muted); margin-bottom: 0;
}
.ks-related-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px;
}
.ks-related-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border: 1px solid var(--light-line);
  border-radius: 10px; text-decoration: none;
  color: inherit; transition: border-color .15s, background .15s;
}
.ks-related-card:hover {
  border-color: var(--primary);
  background: var(--light-surface-hover);
  color: inherit; text-decoration: none;
}
.ks-related-logo {
  width: 34px; height: 34px; object-fit: contain;
  border-radius: 4px; flex-shrink: 0;
}
.ks-related-logo-placeholder {
  width: 34px; height: 34px; border-radius: 4px;
  background: rgba(131,55,148,.10);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
/* placeholder after a logo only shows when the logo fails to load */
.ks-related-logo + .ks-related-logo-placeholder { display: none; }
.ks-related-logo.is-broken { display: none; }
.ks-related-logo.is-broken + .ks-related-logo-placeholder { display: flex; }
.ks-related-name {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 0 0 2px;
}
.ks-related-kind {
  font-size: 12px; color: var(--ink-muted);
  margin: 0;
}

/* ── Expectus CTA ── */
.ks-expectus-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 720px;
}
.ks-expectus-logo {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  margin-top: 4px;
}
.ks-expectus-text {
  font-size: 16px; line-height: 1.7; color: var(--ink);
  margin: 0 0 16px;
}
.ks-expectus-text--spaced { margin-bottom: 24px; }
.ks-expectus-note {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .ks-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .ks-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .ks-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ks-hero-inner { padding-top: 20px; padding-bottom: 64px; }
  .ks-hero h1 { font-size: var(--fs-h1); }
  .ks-hero-lede { font-size: 17px; }
  /* the badges would squeeze the row titles; the rows already say what they are */
  .ks-diagram { padding: 20px; }
  .ks-diagram-row { padding: 14px 16px; gap: 14px; }
  .ks-diagram-badge { display: none; }
  /* bigger touch target without changing the layout */
  .ks-breadcrumb a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  .ks-facts-inner { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; padding-block: 24px; }
  .ks-section { padding: 64px 0; }
  .ks-section h2, .ks-cta h2 { font-size: var(--fs-h2); }
  .ks-steps-grid { grid-template-columns: 1fr; }
  .ks-use-grid { grid-template-columns: 1fr; }
  .ks-tables-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ks-table-head, .ks-table-row { grid-template-columns: 1fr; gap: 4px; }
  .ks-cta-inner { flex-direction: column; text-align: center; }
  .ks-expectus-row { flex-direction: column; align-items: center; text-align: center; }
  .ks-expectus-logo { margin-top: 0; }
}
@media (max-width: 480px) {
  .ks-related-grid { grid-template-columns: 1fr; }
}
