/* ==========================================================================
   ERPDocs — Marketing site styles (public pages)
   Depends on tokens.css. Every value below comes from a --ds-* token.
   Sections:
     1. Base          4. Navigation        7. Landing sections
     2. Layout        5. Footer + cookie   8. Product mocks
     3. (components.css) 6. Section headers   9. Motion + responsive
   ========================================================================== */

/* 1. Base ---------------------------------------------------------------- */
:where(.mk) *, :where(.mk) *::before, :where(.mk) *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ds-nav-height) + 16px); }
body.mk {
  margin: 0;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  line-height: var(--ds-leading-body);
  color: var(--ds-ink);
  background: var(--ds-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.mk.mk-locked { overflow: hidden; }
:where(.mk) img { max-width: 100%; height: auto; display: block; }
:where(.mk) a { color: inherit; text-decoration: none; }
:where(.mk) :is(h1, h2, h3, h4) { margin: 0; color: var(--ds-ink); text-wrap: balance; }
:where(.mk) p { margin: 0; }
:where(.mk) button { font: inherit; color: inherit; }
.mk :focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 2px; border-radius: 4px; }
.mk-skip { position: absolute; left: -9999px; top: 8px; z-index: 2000; padding: 8px 14px; background: var(--ds-ink); color: var(--ds-on-dark); border-radius: var(--ds-radius); }
.mk-skip:focus { left: 8px; }

/* 2. Layout -------------------------------------------------------------- */
.mk-container { width: 100%; max-width: calc(var(--ds-container) + 2 * var(--ds-gutter)); margin-inline: auto; padding-inline: var(--ds-gutter); }
.mk-section { padding-block: var(--ds-space-section); }
.mk-section-alt { background: var(--ds-surface-alt); }
.mk-section-tight { padding-block: var(--ds-space-12); }

/* 3. Components — moved to static/css/components.css (shared with the app) */

/* 4. Navigation ---------------------------------------------------------- */
.mk-nav {
  position: sticky; top: 0; z-index: var(--ds-z-nav);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease);
}
.mk-nav.is-scrolled { border-bottom-color: var(--ds-border); box-shadow: var(--ds-shadow-xs); }
.mk-nav-inner { height: var(--ds-nav-height); display: flex; align-items: center; gap: var(--ds-space-8); }
.mk-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--ds-weight-bold); font-size: 1.1875rem; letter-spacing: -0.01em; color: var(--ds-ink); }
.mk-brand img { width: 32px; height: 32px; }
.mk-menu { display: flex; align-items: center; gap: var(--ds-space-1); flex: 1; }
.mk-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: var(--ds-radius); border: 0; background: none; cursor: pointer;
  font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); color: var(--ds-muted);
  transition: color var(--ds-dur-fast), background var(--ds-dur-fast);
}
.mk-link:hover { color: var(--ds-ink); background: var(--ds-surface-alt); }
.mk-menu-cta { display: none; }
.mk-nav-actions { display: flex; align-items: center; gap: var(--ds-space-2); margin-left: auto; }
.mk-burger { display: none; width: 44px; height: 44px; border: 0; background: none; border-radius: var(--ds-radius); cursor: pointer; place-items: center; color: var(--ds-ink); }
.mk-burger-close { display: none; }

.mk-dd { position: relative; }
.mk-dd-btn .ds-icon { transition: transform var(--ds-dur) var(--ds-ease); }
.mk-dd-btn[aria-expanded="true"] { color: var(--ds-ink); background: var(--ds-surface-alt); }
.mk-dd-btn[aria-expanded="true"] .ds-icon { transform: rotate(180deg); }
.mk-dd-panel {
  position: absolute; top: calc(100% + 8px); left: -8px; z-index: var(--ds-z-dropdown);
  width: 360px; padding: var(--ds-space-2);
  background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease), visibility var(--ds-dur);
}
.mk-dd-btn[aria-expanded="true"] + .mk-dd-panel { opacity: 1; visibility: visible; transform: none; }
.mk-dd-item { display: flex; gap: var(--ds-space-3); align-items: flex-start; padding: 10px; border-radius: var(--ds-radius); }
.mk-dd-item:hover { background: var(--ds-surface-alt); }
.mk-dd-item b { display: block; font-size: var(--ds-text-sm); font-weight: var(--ds-weight-semi); color: var(--ds-ink); }
.mk-dd-item small { display: block; font-size: var(--ds-text-xs); color: var(--ds-muted); margin-top: 1px; }
.mk-dd-ic { width: 34px; height: 34px; border-radius: var(--ds-radius); display: grid; place-items: center; background: var(--ds-primary-soft); color: var(--ds-primary); flex: none; }

/* Scroll progress */
.mk-scrollbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.mk-scrollbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ds-primary), var(--ds-sky)); transform: scaleX(0); transform-origin: 0 50%; }

/* Nav over a dark hero (body.mk-dark-top) — transparent until scrolled */
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-brand,
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-burger { color: var(--ds-on-dark); }
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-link { color: var(--ds-on-dark-muted); }
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-link:hover,
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-dd-btn[aria-expanded="true"] { color: var(--ds-on-dark); background: rgba(255,255,255,.08); }
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-nav-actions .ds-btn-primary { background: var(--ds-on-dark); color: var(--ds-ink); }
.mk-dark-top .mk-nav:not(.is-scrolled):not(.is-open) .mk-nav-actions .ds-btn-primary:hover { background: var(--ds-primary-soft-2); }
@media (min-width: 961px) {
  .mk-dark-top .mk-nav:not(.is-scrolled) .mk-dd-panel .mk-link { color: var(--ds-muted); }
}

/* 5. Footer + cookie ----------------------------------------------------- */
.mk-footer { background: var(--ds-dark); color: var(--ds-on-dark-muted); padding-top: var(--ds-space-16); font-size: var(--ds-text-sm); }
.mk-footer .mk-brand { color: var(--ds-on-dark); }
.mk-footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: var(--ds-space-8); }
.mk-footer-brand p { margin-top: var(--ds-space-4); max-width: 34ch; }
.mk-footer nav { display: grid; align-content: start; gap: var(--ds-space-3); }
.mk-footer h2 { font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); color: var(--ds-on-dark); margin-bottom: var(--ds-space-1); }
.mk-footer nav a:hover { color: var(--ds-on-dark); }
.mk-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ds-space-3); margin-top: var(--ds-space-12); padding-block: var(--ds-space-6); border-top: 1px solid rgba(255,255,255,.1); font-size: var(--ds-text-xs); }
/* Minimal shell (block shell = "minimal" in layouts/marketing.html): task pages such as /dsc/setup */
.mk-footer-slim { border-top: 1px solid var(--ds-border); background: var(--ds-surface); font-size: var(--ds-text-sm); color: var(--ds-subtle); }
.mk-footer-slim__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding-block: var(--ds-space-5); }
.mk-footer-slim nav { display: flex; flex-wrap: wrap; gap: var(--ds-space-5); }
.mk-footer-slim a { color: var(--ds-muted); }
.mk-footer-slim a:hover { color: var(--ds-primary); }

.mk-cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: var(--ds-z-toast);
  max-width: 420px; display: flex; align-items: center; gap: var(--ds-space-4);
  padding: var(--ds-space-4); background: var(--ds-dark); color: var(--ds-on-dark-muted);
  border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-lg); font-size: var(--ds-text-sm); line-height: 1.5;
}
.mk-cookie[hidden] { display: none; }
.mk-cookie a { color: var(--ds-on-dark); text-decoration: underline; text-underline-offset: 2px; }

/* 6. Section headers ----------------------------------------------------- */
.mk-head { max-width: 720px; margin-bottom: var(--ds-space-12); }
.mk-head-center { margin-inline: auto; text-align: center; }
.mk-kicker { font-size: var(--ds-text-sm); font-weight: var(--ds-weight-semi); color: var(--ds-primary); margin-bottom: var(--ds-space-3); display: block; }
.mk-h2 { font-size: var(--ds-text-3xl); font-weight: var(--ds-weight-bold); line-height: var(--ds-leading-snug); letter-spacing: var(--ds-tracking-tight); }
.mk-lead { font-size: var(--ds-text-lg); color: var(--ds-muted); margin-top: var(--ds-space-4); line-height: 1.6; }

/* 7. Landing sections ---------------------------------------------------- */

/* Hero */

/* Trust strip */

/* Steps */

/* Feature tabs */
.mk-stage { background: linear-gradient(160deg, var(--ds-primary-soft), var(--ds-surface-alt)); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-xl); padding: clamp(1rem, .5rem + 2.5vw, 2.5rem); }

/* More features grid */
.mk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-4); }
.mk-feature { padding: var(--ds-space-6); transition: border-color var(--ds-dur) var(--ds-ease), box-shadow var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease); }
.mk-feature:hover { border-color: var(--ds-primary-border); box-shadow: var(--ds-shadow-md); transform: translateY(-2px); }
.mk-feature-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ds-primary-soft); color: var(--ds-primary); margin-bottom: var(--ds-space-4); }
.mk-feature h3 { font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); margin-bottom: var(--ds-space-2); }
.mk-feature p { font-size: var(--ds-text-sm); color: var(--ds-muted); }

/* Teams split */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.mk-split .ds-check-list { margin-top: var(--ds-space-6); }

/* Security (dark band) */
.mk-dark { background: var(--ds-dark); color: var(--ds-on-dark-muted); position: relative; overflow: hidden; }
.mk-dark::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 100% 0%, rgba(3,105,161,.35), transparent 70%); pointer-events: none; }
.mk-dark .mk-container { position: relative; }
.mk-dark .mk-h2 { color: var(--ds-on-dark); }
.mk-dark .mk-kicker { color: var(--ds-primary-on-dark); }
.mk-dark .mk-lead { color: var(--ds-on-dark-muted); }
.mk-sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: var(--ds-radius-lg); overflow: hidden; }
.mk-sec { background: var(--ds-dark); padding: var(--ds-space-6); transition: background var(--ds-dur) var(--ds-ease); }
.mk-sec:hover { background: var(--ds-dark-2); }
.mk-sec .ds-icon { color: var(--ds-primary-on-dark); margin-bottom: var(--ds-space-4); }
.mk-sec a { color: var(--ds-primary-on-dark); }
.mk-sec h3 { color: var(--ds-on-dark); font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); margin-bottom: var(--ds-space-2); }
.mk-sec p { font-size: var(--ds-text-sm); }
.mk-sec .ds-link { color: var(--ds-primary-on-dark); margin-top: var(--ds-space-3); font-size: var(--ds-text-sm); }

/* Use cases */
.mk-uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-4); }
.mk-use { padding: var(--ds-space-6); display: flex; flex-direction: column; gap: var(--ds-space-3); }
.mk-use-ic { color: var(--ds-primary); }
.mk-use h3 { font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semi); }
.mk-use p { font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-use ul { list-style: none; margin: auto 0 0; padding: var(--ds-space-4) 0 0; border-top: 1px solid var(--ds-border-soft); display: flex; flex-wrap: wrap; gap: 6px; }
.mk-use li { font-size: var(--ds-text-xs); font-weight: var(--ds-weight-medium); color: var(--ds-muted); background: var(--ds-surface-alt); padding: 3px 8px; border-radius: var(--ds-radius-sm); }

/* Pricing + CTA */
.mk-price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-4); max-width: 880px; margin-inline: auto; }
.mk-plan { padding: var(--ds-space-8); display: flex; flex-direction: column; gap: var(--ds-space-4); }
.mk-plan-featured { border-color: var(--ds-primary); box-shadow: 0 0 0 1px var(--ds-primary), var(--ds-shadow-md); }
.mk-plan-name { display: flex; align-items: center; justify-content: space-between; font-weight: var(--ds-weight-semi); }
.mk-plan-amount { font-size: 2.5rem; font-weight: var(--ds-weight-bold); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.mk-plan-amount small { font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); color: var(--ds-muted); letter-spacing: 0; margin-left: 4px; }
.mk-plan .ds-check-list { font-size: var(--ds-text-sm); }
.mk-plan .ds-btn { margin-top: auto; }
.mk-price-note { text-align: center; margin-top: var(--ds-space-6); font-size: var(--ds-text-sm); color: var(--ds-muted); }

.mk-cta-btns { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); }

/* 8. Product mocks ------------------------------------------------------- */

/* Panel mocks */

.mk-roles { display: grid; gap: var(--ds-space-2); }
.mk-role { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ds-space-3); align-items: center; padding: 12px 14px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-surface); }
.mk-role b { display: block; font-weight: var(--ds-weight-semi); font-size: var(--ds-text-sm); }
.mk-role small { font-size: var(--ds-text-xs); color: var(--ds-muted); }
.mk-ws { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); }
.mk-ws span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--ds-radius); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); background: var(--ds-surface); border: 1px solid var(--ds-border); color: var(--ds-muted); }
.mk-ws span.on { border-color: var(--ds-primary); color: var(--ds-primary-text); background: var(--ds-primary-soft); }

/* 9. Motion + responsive ------------------------------------------------- */
[data-reveal] { transition: opacity .7s var(--ds-ease-out), transform .7s var(--ds-ease-out); }
[data-reveal].is-pending { opacity: 0; transform: translateY(16px); }

@keyframes mk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mk-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mk-grow { from { width: 0; } }
@keyframes mk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  .mk *, .mk *::before, .mk *::after { animation: none !important; transition: none !important; }
  [data-reveal].is-pending { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 1080px) {
  .mk-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .mk-hero-grid, .mk-panel, .mk-split { grid-template-columns: minmax(0, 1fr); }
  .mk-grid, .mk-sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Mobile nav */
  .mk-burger { display: grid; }
  .mk-login { display: none; }
  .mk-menu {
    position: fixed; inset: var(--ds-nav-height) 0 0 0; z-index: var(--ds-z-nav);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--ds-space-4) var(--ds-gutter) var(--ds-space-8); background: var(--ds-surface);
    overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--ds-dur) var(--ds-ease), transform var(--ds-dur) var(--ds-ease), visibility var(--ds-dur);
  }
  .mk-nav.is-open .mk-menu { opacity: 1; visibility: visible; transform: none; }
  .mk-nav.is-open .mk-burger-open { display: none; }
  .mk-nav.is-open .mk-burger-close { display: inline; }
  .mk-nav.is-open { background: var(--ds-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mk-menu { height: calc(100dvh - var(--ds-nav-height)); }
  .mk-link { width: 100%; justify-content: space-between; padding: 14px 4px; font-size: var(--ds-text-lg); color: var(--ds-ink); border-bottom: 1px solid var(--ds-border-soft); border-radius: 0; }
  .mk-link:hover { background: none; }
  .mk-dd-panel { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 var(--ds-space-2); display: none; opacity: 1; visibility: visible; transform: none; }
  .mk-dd-btn[aria-expanded="true"] + .mk-dd-panel { display: block; }
  .mk-menu-cta { display: grid; gap: var(--ds-space-3); margin-top: var(--ds-space-6); }
  .mk-menu-cta .ds-btn { width: 100%; }
}

@media (max-width: 640px) {
  .mk-grid, .mk-sec-grid, .mk-uses, .mk-price { grid-template-columns: minmax(0, 1fr); }
  .mk-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-cookie { left: 12px; right: 12px; max-width: none; }
  .mk-nav-actions .ds-btn { display: none; }
}

/* 10. Legal pages (terms, privacy, DPA) ----------------------------------- */
.mk-legal-wrap { max-width: calc(var(--ds-container-narrow) + 2 * var(--ds-gutter)); }
.mk-legal-hero { padding: var(--ds-space-12) 0 var(--ds-space-8); background: var(--ds-surface-alt); border-bottom: 1px solid var(--ds-border); }
.mk-legal-hero h1 { margin-top: var(--ds-space-4); font-size: var(--ds-text-3xl); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-tight); line-height: var(--ds-leading-tight); }
.mk-legal-meta { margin-top: var(--ds-space-3); color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-legal-tabs { display: inline-flex; gap: 2px; margin-top: var(--ds-space-6); padding: 3px; background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius); }
.mk-legal-tabs a { padding: 6px 14px; border-radius: var(--ds-radius-sm); color: var(--ds-muted); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-semi); }
.mk-legal-tabs a:hover { color: var(--ds-ink); }
.mk-legal-tabs a[aria-current="page"] { background: var(--ds-primary-soft); color: var(--ds-primary-text); }
.mk-legal { color: var(--ds-text); font-size: var(--ds-text-base); line-height: 1.75; }
.mk-legal h2 { margin: var(--ds-space-10) 0 var(--ds-space-3); padding-top: var(--ds-space-6); border-top: 1px solid var(--ds-border); font-size: var(--ds-text-xl); font-weight: var(--ds-weight-bold); scroll-margin-top: calc(var(--ds-nav-height) + 16px); }
.mk-legal h3 { margin: var(--ds-space-6) 0 var(--ds-space-2); font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semi); }
.mk-legal h4 { margin: var(--ds-space-4) 0 var(--ds-space-2); font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); }
.mk-legal p { margin: 0 0 var(--ds-space-4); }
.mk-legal ul, .mk-legal ol { margin: var(--ds-space-3) 0 var(--ds-space-4); padding-left: var(--ds-space-6); }
.mk-legal li { margin-bottom: var(--ds-space-2); }
.mk-legal strong { color: var(--ds-ink); font-weight: var(--ds-weight-semi); }
.mk-legal a { color: var(--ds-primary); font-weight: var(--ds-weight-medium); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ds-primary-border); }
.mk-legal a:hover { text-decoration-color: currentColor; }
.mk-legal-callout { margin: 0 0 var(--ds-space-6); padding: var(--ds-space-5); background: var(--ds-primary-soft); border: 1px solid var(--ds-primary-border); border-radius: var(--ds-radius-lg); color: var(--ds-primary-text); font-size: var(--ds-text-sm); }
.mk-legal-callout.is-warning { background: var(--ds-warning-bg); border-color: var(--ds-warning-border); color: var(--ds-warning-text); }
.mk-legal-callout p:last-child { margin-bottom: 0; }
.mk-legal-toc { margin: 0 0 var(--ds-space-8); padding: var(--ds-space-5) var(--ds-space-6); background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); font-size: var(--ds-text-sm); }
.mk-legal-toc ol { margin: 0; columns: 2; column-gap: var(--ds-space-8); }
.mk-legal-toc a { text-decoration: none; }
.mk-legal-annex { margin: var(--ds-space-12) 0 var(--ds-space-6); padding: var(--ds-space-5); background: var(--ds-dark); border-radius: var(--ds-radius-lg); color: var(--ds-on-dark); }
.mk-legal-annex h2 { margin: 0; padding: 0; border: 0; color: var(--ds-on-dark); }
.mk-legal-annex p { margin: var(--ds-space-1) 0 0; color: var(--ds-on-dark-muted); font-size: var(--ds-text-sm); }
.mk-legal-table { overflow-x: auto; margin: var(--ds-space-3) 0 var(--ds-space-6); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); }
.mk-legal table { width: 100%; border-collapse: collapse; font-size: var(--ds-text-sm); line-height: 1.5; }
.mk-legal-table table { margin: 0; }
.mk-legal th { padding: 10px 12px; background: var(--ds-surface-alt); text-align: left; color: var(--ds-ink); font-weight: var(--ds-weight-semi); border-bottom: 1px solid var(--ds-border); }
.mk-legal td { padding: 10px 12px; border-top: 1px solid var(--ds-border-soft); vertical-align: top; }
.mk-legal > table { border: 1px solid var(--ds-border); }
.mk-legal-contact { margin-top: var(--ds-space-12); padding-top: var(--ds-space-6); border-top: 1px solid var(--ds-border); color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-legal-contact a { color: var(--ds-primary); font-weight: var(--ds-weight-semi); }
@media (max-width: 640px) { .mk-legal-toc ol { columns: 1; } }

/* 12. Content pages (about, contact) -------------------------------------- */
.mk-head--flush { margin-bottom: 0; }
.mk-split--top { align-items: start; }
.mk-feature h3 .ds-badge { margin-left: 4px; vertical-align: 2px; }
.mk-page-hero { padding: var(--ds-space-16) 0 var(--ds-space-12); background: var(--ds-surface-alt); border-bottom: 1px solid var(--ds-border); }
.mk-page-title { margin-top: var(--ds-space-5); font-size: var(--ds-text-4xl); font-weight: var(--ds-weight-bold); line-height: var(--ds-leading-tight); letter-spacing: var(--ds-tracking-tight); }
.mk-h3 { font-size: var(--ds-text-2xl); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-tight); }
.mk-prose { color: var(--ds-text); font-size: var(--ds-text-base); line-height: 1.75; }
.mk-prose p + p { margin-top: var(--ds-space-4); }
.mk-facts { padding: var(--ds-space-6); }
.mk-facts dl { margin: 0; display: grid; gap: var(--ds-space-4); }
.mk-facts dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--ds-space-4); padding-bottom: var(--ds-space-4); border-bottom: 1px solid var(--ds-border-soft); }
.mk-facts dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.mk-facts dt { color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-facts dd { margin: 0; color: var(--ds-ink); font-weight: var(--ds-weight-medium); }
.mk-cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-6); }
.mk-cta-inline p { margin-top: var(--ds-space-2); color: var(--ds-muted); }

/* Closing CTA card (same look as the landing page's final card): a page never
   ends on a full-width dark band that runs into the dark footer. */
.mk-final { padding-bottom: var(--ds-space-section); }
.mk-final-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(2rem, 1rem + 4vw, 4rem); border-radius: 24px;
  background: radial-gradient(700px 420px at 85% 50%, rgba(3,105,161,.45), transparent 70%), radial-gradient(500px 300px at 0% 0%, rgba(56,189,248,.12), transparent 70%), var(--ds-dark-deep);
  color: var(--ds-on-dark-muted); box-shadow: 0 40px 80px -30px rgba(6,18,42,.5);
}
.mk-final-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(255,255,255,.08); pointer-events: none; }
/* The sign-in panel's static orbit + document mark, in the card's corner. */
.mk-final-card::before {
  content: ""; position: absolute; right: -195px; bottom: -195px; width: 480px; height: 480px; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' fill='none' stroke='%23ffffff'%3E%3Cellipse cx='300' cy='300' rx='280' ry='110' stroke-opacity='.10' transform='rotate(-24 300 300)'/%3E%3Cellipse cx='300' cy='300' rx='210' ry='82' stroke-opacity='.12' transform='rotate(18 300 300)'/%3E%3Cellipse cx='300' cy='300' rx='140' ry='56' stroke-opacity='.14' transform='rotate(-8 300 300)'/%3E%3Crect x='262' y='250' width='76' height='100' rx='8' stroke-opacity='.22' fill='%23ffffff' fill-opacity='.04'/%3E%3Cpath d='M276 274h48M276 288h48M276 302h30' stroke-opacity='.22'/%3E%3C/svg%3E") no-repeat center / contain; /* design-lint: ignore — white in SVG data URI, as on the sign-in panel */
}
@media (max-width: 720px) { .mk-final-card::before { width: 300px; height: 300px; right: -110px; bottom: -120px; } }
.mk-final-card .mk-h2 { color: var(--ds-on-dark); }
.mk-final-card .ds-link { color: var(--ds-primary-on-dark); }
.mk-final-card .mk-cta-inline p { color: rgba(255,255,255,.72); }
@media (max-width: 900px) { .mk-facts dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* Contact */
.mk-contact-hero { padding-bottom: var(--ds-space-16); }
.mk-contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: start; }
.mk-contact__topics { list-style: none; margin: var(--ds-space-8) 0 0; padding: 0; display: grid; gap: var(--ds-space-5); }
.mk-contact__topics li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--ds-space-4); align-items: start; }
.mk-contact__topics .mk-feature-ic { margin: 0; }
.mk-contact__topics b { display: block; color: var(--ds-ink); font-weight: var(--ds-weight-semi); }
.mk-contact__topics p { margin-top: 2px; color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-contact__direct { display: grid; gap: var(--ds-space-2); margin-top: var(--ds-space-8); padding-top: var(--ds-space-6); border-top: 1px solid var(--ds-border); font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-contact__direct address { margin: 0; font-style: normal; line-height: 1.6; }
.mk-contact__form { padding: var(--ds-space-8); box-shadow: var(--ds-shadow-md); }
.mk-contact__form-title { font-size: var(--ds-text-xl); font-weight: var(--ds-weight-bold); }
.mk-contact__form-sub { margin: 4px 0 var(--ds-space-6); color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-contact__submit { width: 100%; margin-top: var(--ds-space-2); }
/* Turnstile CAPTCHA (only when its keys are set). Its flexible size is 300px minimum. */
.mk-contact__captcha { margin-bottom: var(--ds-space-4); }
/* Contact form honeypot: off-screen for people, still in the DOM for bots that fill every field. */
.mk-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mk-form-alert { margin-bottom: var(--ds-space-4); padding: var(--ds-space-3) var(--ds-space-4); border-radius: var(--ds-radius); font-size: var(--ds-text-sm); }
.mk-form-alert.is-success { background: var(--ds-success-bg); color: var(--ds-success-text); }
.mk-form-alert.is-error { background: var(--ds-danger-bg); color: var(--ds-danger-text); }
@media (max-width: 900px) { .mk-contact { grid-template-columns: 1fr; } .mk-contact__form { padding: var(--ds-space-6); } }
@media (max-width: 420px) { .mk-contact__form { padding: var(--ds-space-4); } }

/* 14. Pricing (templates/pricing.html) ------------------------------------ */
.mk-pricing-hero { padding-bottom: var(--ds-space-10); }
.mk-pricing-hero .mk-head { margin-bottom: var(--ds-space-8); }
.mk-pricing-ea { max-width: 720px; margin: 0 auto var(--ds-space-6); }
.mk-pricing-ea .ds-icon { flex: none; margin-top: 2px; }
.mk-pricing-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ds-space-3); }
.mk-pricing-controls .ds-segmented > button { min-height: 36px; padding-inline: var(--ds-space-4); }
.mk-save { margin-left: 6px; padding: 1px 6px; border-radius: var(--ds-radius-sm); background: var(--ds-success-bg); color: var(--ds-success-text); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); }

.mk-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-4); align-items: stretch; }
.mk-plans .mk-plan { gap: var(--ds-space-3); }
.mk-plans .mk-plan .ds-btn { margin-top: var(--ds-space-2); width: 100%; }
.mk-plan-name { font-size: var(--ds-text-lg); }
.mk-plan-tag, .mk-plan-note { margin: 0; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-plan-amount--text { font-size: var(--ds-text-3xl); }
.mk-plan-limits { list-style: none; margin: var(--ds-space-2) 0 0; padding: var(--ds-space-3) var(--ds-space-4); display: grid; gap: 4px; background: var(--ds-surface-alt); border-radius: var(--ds-radius); font-size: var(--ds-text-sm); color: var(--ds-text); }
.mk-plan-limits strong { color: var(--ds-ink); font-weight: var(--ds-weight-semi); }
.mk-plan-plus { margin: var(--ds-space-2) 0 0; font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-plan .ds-check-list .ds-badge { margin-left: 4px; vertical-align: 1px; }
.mk-plan .ds-check-list li:has(.ds-badge-neutral) > .ds-icon { color: var(--ds-subtle); }
.mk-price-note .ds-icon { vertical-align: -3px; color: var(--ds-primary); }

/* Comparison table — phones show one plan column (switch above the table) */
.mk-cmp-switch { display: none; margin: 0 auto var(--ds-space-4); }
.mk-cmp { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); overflow: clip; }
.mk-cmp-table { width: 100%; border-collapse: collapse; font-size: var(--ds-text-sm); }
.mk-cmp-table :is(th, td) { padding: var(--ds-space-3) var(--ds-space-4); border-bottom: 1px solid var(--ds-border-soft); text-align: left; vertical-align: middle; }
.mk-cmp-table thead th { position: sticky; top: var(--ds-nav-height); z-index: 1; background: var(--ds-surface); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); box-shadow: inset 0 -1px 0 var(--ds-border); }
.mk-cmp-table thead th:nth-child(3) { color: var(--ds-primary); }
.mk-cmp-table th[scope="row"] { font-weight: var(--ds-weight-medium); color: var(--ds-ink); width: 44%; }
.mk-cmp-table td { color: var(--ds-text); width: 18.66%; }
.mk-cmp-table td:nth-child(3) { background: rgba(var(--ds-primary-rgb), .03); }
.mk-cmp-group th { padding-top: var(--ds-space-5); background: var(--ds-surface-alt); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-cmp-table tbody:last-child tr:last-child :is(th, td) { border-bottom: 0; }
.mk-cmp-yes { color: var(--ds-accent); display: inline-flex; }
.mk-cmp-no { color: var(--ds-disabled); }

/* FAQ — native <details> (keyboard + screen reader for free) */
.mk-faq-wrap { max-width: calc(var(--ds-container-narrow) + 2 * var(--ds-gutter)); }
.mk-faq-wrap .mk-head { margin-bottom: var(--ds-space-8); }
.mk-faq { display: grid; gap: var(--ds-space-3); }
.mk-faq details { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); transition: border-color var(--ds-dur-fast) var(--ds-ease); }
.mk-faq details:hover, .mk-faq details[open] { border-color: var(--ds-border-strong); }
.mk-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); padding: var(--ds-space-4) var(--ds-space-5); font-weight: var(--ds-weight-semi); color: var(--ds-ink); cursor: pointer; list-style: none; }
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); border-radius: var(--ds-radius-lg); }
.mk-faq summary .ds-icon { flex: none; color: var(--ds-subtle); transition: transform var(--ds-dur) var(--ds-ease); }
.mk-faq details[open] summary .ds-icon { transform: rotate(180deg); }
.mk-faq details > :not(summary) { margin: 0; padding: 0 var(--ds-space-5) var(--ds-space-5); color: var(--ds-muted); line-height: 1.65; }

@media (max-width: 1024px) {
  .mk-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-plans .mk-plan:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .mk-plans { grid-template-columns: minmax(0, 1fr); }
  .mk-cmp-switch { display: flex; width: fit-content; }
  .mk-cmp-table th[scope="row"] { width: auto; }
  .mk-cmp-table td { width: 40%; }
  .mk-cmp[data-col="1"] :is(th, td):is(:nth-child(3), :nth-child(4)),
  .mk-cmp[data-col="2"] :is(th, td):is(:nth-child(2), :nth-child(4)),
  .mk-cmp[data-col="3"] :is(th, td):is(:nth-child(2), :nth-child(3)) { display: none; }
  .mk-cmp-table td:nth-child(3) { background: none; }
}

/* 15. Help center / knowledge base (templates/kb/*) ------------------------ */
.mk-kb-hero { padding-bottom: var(--ds-space-12); }
.mk-kb-hero .mk-head { margin-bottom: var(--ds-space-8); }
.mk-kb-search { position: relative; display: flex; align-items: center; gap: var(--ds-space-2); width: 100%; max-width: 360px; height: 40px; padding: 0 var(--ds-space-3); background: var(--ds-surface); border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius); color: var(--ds-subtle); transition: border-color var(--ds-dur-fast) var(--ds-ease), box-shadow var(--ds-dur-fast) var(--ds-ease); }
.mk-kb-search:focus-within { border-color: var(--ds-primary); box-shadow: var(--ds-focus-ring); }
.mk-kb-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: var(--ds-text-sm); color: var(--ds-ink); }
.mk-kb-search input::placeholder { color: var(--ds-subtle); }
.mk-kb-search input::-webkit-search-cancel-button { cursor: pointer; }
.mk-kb-search--lg { max-width: 640px; height: 52px; margin-inline: auto; padding: 0 var(--ds-space-4); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-xs); }
.mk-kb-search--lg input { font-size: var(--ds-text-base); }
.mk-kb-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: var(--ds-z-dropdown); display: none; max-height: 360px; overflow-y: auto; padding: var(--ds-space-1); background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-md); text-align: left; }
.mk-kb-results.is-open { display: block; animation: ds-pop-in var(--ds-dur) var(--ds-ease-out); }
.mk-kb-results__item, .mk-kb-results__all { display: flex; flex-direction: column; gap: 2px; padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-sm); color: var(--ds-ink); }
.mk-kb-results__item:hover, .mk-kb-results__item.is-active, .mk-kb-results__all:hover, .mk-kb-results__all.is-active { background: var(--ds-surface-alt); }
.mk-kb-results__title { font-size: var(--ds-text-sm); font-weight: var(--ds-weight-medium); }
.mk-kb-results__title mark { background: var(--ds-primary-soft-2); color: inherit; border-radius: 2px; }
.mk-kb-results__cat { font-size: var(--ds-text-xs); color: var(--ds-muted); }
.mk-kb-results__all { margin-top: 2px; border-top: 1px solid var(--ds-border-soft); border-radius: 0 0 var(--ds-radius-sm) var(--ds-radius-sm); font-size: var(--ds-text-sm); font-weight: var(--ds-weight-semi); color: var(--ds-primary); }
.mk-kb-results__empty { padding: var(--ds-space-3); font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-kb-popular { margin-top: var(--ds-space-4); text-align: center; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-kb-popular a { margin-left: var(--ds-space-2); padding: 2px var(--ds-space-2); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-full); background: var(--ds-surface); color: var(--ds-text); }
.mk-kb-popular a:hover { border-color: var(--ds-primary-border); color: var(--ds-primary); }

.mk-kb-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-4); }
.mk-kb-cat { display: flex; flex-direction: column; gap: var(--ds-space-4); padding: var(--ds-space-6); }
.mk-kb-cat header { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--ds-space-4); align-items: start; }
.mk-kb-cat .mk-feature-ic { margin: 0; }
.mk-kb-cat h2 { font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semi); }
.mk-kb-cat h2 a { color: var(--ds-ink); }
.mk-kb-cat h2 a:hover { color: var(--ds-primary); }
.mk-kb-cat header p { margin-top: 2px; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-kb-cat ul { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--ds-border-soft); }
.mk-kb-cat li a { display: block; padding: var(--ds-space-2) 0; border-bottom: 1px solid var(--ds-border-soft); font-size: var(--ds-text-sm); color: var(--ds-text); }
.mk-kb-cat li a:hover { color: var(--ds-primary); }
.mk-kb-cat__all { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: var(--ds-text-sm); }

.mk-kb-bar { position: sticky; top: var(--ds-nav-height); z-index: 5; background: var(--ds-surface); border-bottom: 1px solid var(--ds-border); }
.mk-kb-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); min-height: 60px; }
.mk-kb-crumbs { min-width: 0; }
.mk-kb-crumbs ol { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: var(--ds-text-sm); color: var(--ds-muted); min-width: 0; }
.mk-kb-crumbs li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.mk-kb-crumbs li:not(:last-child) { flex: none; }
.mk-kb-crumbs li:last-child { overflow: hidden; }
.mk-kb-crumbs li:last-child span { overflow: hidden; text-overflow: ellipsis; color: var(--ds-ink); font-weight: var(--ds-weight-medium); }
.mk-kb-crumbs a { color: var(--ds-muted); }
.mk-kb-crumbs a:hover { color: var(--ds-primary); }
.mk-kb-crumbs .ds-icon { color: var(--ds-disabled); flex: none; }

.mk-kb-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--ds-space-10); align-items: start; }
.mk-kb-layout--article { grid-template-columns: 220px minmax(0, 1fr) 200px; }
.mk-kb-layout--article:not(:has(.mk-kb-toc)) { grid-template-columns: 220px minmax(0, 1fr); }
.mk-kb-layout--article:not(:has(.mk-kb-side)) { grid-template-columns: minmax(0, 1fr) 200px; }
.mk-kb-side, .mk-kb-toc { position: sticky; top: calc(var(--ds-nav-height) + 84px); max-height: calc(100vh - var(--ds-nav-height) - 100px); overflow-y: auto; }
.mk-kb-side__title { margin: 0 0 var(--ds-space-2); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-kb-side ul, .mk-kb-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.mk-kb-side a { display: flex; align-items: center; gap: var(--ds-space-2); padding: 6px var(--ds-space-3); border-radius: var(--ds-radius-sm); font-size: var(--ds-text-sm); color: var(--ds-text); line-height: 1.4; }
.mk-kb-side a:hover { background: var(--ds-surface-alt); color: var(--ds-ink); }
.mk-kb-side a[aria-current="page"] { background: var(--ds-primary-soft); color: var(--ds-primary-text); font-weight: var(--ds-weight-semi); box-shadow: inset 2px 0 0 var(--ds-primary); }
.mk-kb-side a .ds-icon { flex: none; color: var(--ds-subtle); }
.mk-kb-side__back { display: inline-block; margin-top: var(--ds-space-4); font-size: var(--ds-text-sm); }
.mk-kb-toc a { display: block; padding: 4px 0 4px var(--ds-space-3); border-left: 2px solid var(--ds-border); font-size: var(--ds-text-sm); color: var(--ds-muted); line-height: 1.4; }
.mk-kb-toc a:hover { color: var(--ds-ink); border-left-color: var(--ds-border-strong); }

.mk-kb-cat-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--ds-space-4); align-items: start; margin-bottom: var(--ds-space-6); }
.mk-kb-cat-head .mk-feature-ic { margin: 0; }
.mk-kb-cat-head h1 { font-size: var(--ds-text-2xl); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-tight); }
.mk-kb-cat-head p { margin-top: 4px; color: var(--ds-muted); }
.mk-kb-list { list-style: none; margin: 0; padding: 0; background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); overflow: clip; }
.mk-kb-list li + li { border-top: 1px solid var(--ds-border-soft); }
.mk-kb-list a { display: grid; grid-template-columns: 18px minmax(0, 1fr) 16px; gap: var(--ds-space-3); align-items: center; padding: var(--ds-space-4) var(--ds-space-5); color: var(--ds-ink); font-weight: var(--ds-weight-medium); }
.mk-kb-list a:hover { background: var(--ds-surface-alt); color: var(--ds-primary); }
.mk-kb-list .ds-icon { color: var(--ds-subtle); }

/* Article body — markdown from docs/knowledgebase */
.mk-kb-article { min-width: 0; }
.mk-kb-prose { max-width: 72ch; color: var(--ds-text); font-size: var(--ds-text-base); line-height: 1.75; }
.mk-kb-prose > :first-child { margin-top: 0; }
.mk-kb-prose h1 { font-size: var(--ds-text-3xl); font-weight: var(--ds-weight-bold); line-height: var(--ds-leading-tight); letter-spacing: var(--ds-tracking-tight); color: var(--ds-ink); margin-bottom: var(--ds-space-4); }
.mk-kb-prose h2 { margin: var(--ds-space-10) 0 var(--ds-space-3); padding-top: var(--ds-space-2); font-size: var(--ds-text-xl); font-weight: var(--ds-weight-bold); color: var(--ds-ink); scroll-margin-top: calc(var(--ds-nav-height) + 80px); }
.mk-kb-prose h3 { margin: var(--ds-space-6) 0 var(--ds-space-2); font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semi); color: var(--ds-ink); scroll-margin-top: calc(var(--ds-nav-height) + 80px); }
.mk-kb-prose h4 { margin: var(--ds-space-5) 0 var(--ds-space-2); font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); color: var(--ds-ink); }
.mk-kb-prose :is(p, ul, ol, table, pre, blockquote) { margin: 0 0 var(--ds-space-4); }
.mk-kb-prose :is(ul, ol) { padding-left: 1.4em; }
.mk-kb-prose li + li { margin-top: 4px; }
.mk-kb-prose li > :is(ul, ol) { margin: 4px 0 0; }
.mk-kb-prose a:not([class]) { color: var(--ds-primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.mk-kb-prose strong { color: var(--ds-ink); font-weight: var(--ds-weight-semi); }
.mk-kb-prose code { padding: 1px 6px; border-radius: var(--ds-radius-sm); background: var(--ds-surface-alt); border: 1px solid var(--ds-border-soft); font-family: var(--ds-font-mono); font-size: .875em; color: var(--ds-ink); }
.mk-kb-prose pre { padding: var(--ds-space-4); overflow-x: auto; border-radius: var(--ds-radius); background: var(--ds-dark); color: var(--ds-on-dark); font-size: var(--ds-text-sm); line-height: 1.6; }
.mk-kb-prose pre code { padding: 0; border: 0; background: none; color: inherit; }
.mk-kb-prose blockquote { padding: var(--ds-space-3) var(--ds-space-4); border-left: 3px solid var(--ds-primary); background: var(--ds-primary-soft); border-radius: 0 var(--ds-radius) var(--ds-radius) 0; color: var(--ds-primary-text); }
.mk-kb-prose blockquote > :last-child { margin-bottom: 0; }
.mk-kb-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--ds-text-sm); }
.mk-kb-prose :is(th, td) { padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-border); text-align: left; vertical-align: top; }
.mk-kb-prose th { background: var(--ds-surface-alt); color: var(--ds-ink); font-weight: var(--ds-weight-semi); }
.mk-kb-prose img { max-width: 100%; height: auto; border: 1px solid var(--ds-border); border-radius: var(--ds-radius); }
.mk-kb-prose hr { margin: var(--ds-space-8) 0; border: 0; border-top: 1px solid var(--ds-border); }
.mk-kb-article__foot { max-width: 72ch; margin-top: var(--ds-space-10); padding-top: var(--ds-space-5); border-top: 1px solid var(--ds-border); font-size: var(--ds-text-sm); color: var(--ds-muted); }

/* Search results page */
.mk-kb-searchpage { max-width: calc(var(--ds-container-narrow) + 2 * var(--ds-gutter)); }
.mk-kb-searchpage__title { margin-bottom: var(--ds-space-5); font-size: var(--ds-text-2xl); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-tight); }
.mk-kb-searchpage .mk-kb-search--lg { margin-inline: 0; max-width: none; }
.mk-kb-hits { list-style: none; margin: var(--ds-space-6) 0 0; padding: 0; display: grid; gap: var(--ds-space-3); }
.mk-kb-hits a { display: grid; gap: 4px; padding: var(--ds-space-4) var(--ds-space-5); background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); transition: border-color var(--ds-dur-fast) var(--ds-ease); }
.mk-kb-hits a:hover { border-color: var(--ds-primary-border); }
.mk-kb-hits__cat { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ds-text-xs); color: var(--ds-muted); }
.mk-kb-hits__title { font-weight: var(--ds-weight-semi); color: var(--ds-ink); }
.mk-kb-hits__snippet { font-size: var(--ds-text-sm); color: var(--ds-muted); line-height: 1.6; }
.mk-kb-empty { margin-top: var(--ds-space-6); padding: var(--ds-space-8); text-align: center; }
.mk-kb-empty .mk-feature-ic { margin: 0 auto var(--ds-space-3); }
.mk-kb-empty h2 { font-size: var(--ds-text-lg); font-weight: var(--ds-weight-semi); }
.mk-kb-empty p { margin-top: var(--ds-space-2); color: var(--ds-muted); font-size: var(--ds-text-sm); }
.mk-kb-searchpage__browse { margin: var(--ds-space-10) 0 var(--ds-space-3); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-kb-topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
.mk-kb-topics a { display: inline-flex; align-items: center; gap: 6px; padding: 6px var(--ds-space-3); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-full); background: var(--ds-surface); font-size: var(--ds-text-sm); color: var(--ds-text); }
.mk-kb-topics a:hover { border-color: var(--ds-primary-border); color: var(--ds-primary); }

@media (max-width: 1100px) {
  .mk-kb-layout--article, .mk-kb-layout--article:not(:has(.mk-kb-side)) { grid-template-columns: 220px minmax(0, 1fr); }
  .mk-kb-toc { display: none; }
}
@media (max-width: 860px) {
  .mk-kb-cats { grid-template-columns: minmax(0, 1fr); }
  .mk-kb-layout, .mk-kb-layout--article, .mk-kb-layout--article:not(:has(.mk-kb-toc)) { grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-6); }
  .mk-kb-side { position: static; max-height: none; order: 2; padding-top: var(--ds-space-6); border-top: 1px solid var(--ds-border); }
  .mk-kb-bar { position: static; }
  .mk-kb-bar__inner { flex-direction: column; align-items: stretch; gap: var(--ds-space-2); padding-block: var(--ds-space-3); }
  .mk-kb-search { max-width: none; }
}

/* 16. Developers (templates/developers/*) ---------------------------------- */
.mk-code { padding: 1px 6px; border-radius: var(--ds-radius-sm); background: var(--ds-surface-alt); border: 1px solid var(--ds-border-soft); font-family: var(--ds-font-mono); font-size: .86em; color: var(--ds-ink); word-break: break-word; }
.mk-code--dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--ds-on-dark); }
.mk-dev-hero { margin-top: calc(-1 * var(--ds-nav-height)); padding-top: calc(var(--ds-nav-height) + var(--ds-space-16)); }
.mk-dev-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
.mk-dev-hero .mk-page-title { color: var(--ds-on-dark); }
.mk-dev-hero .mk-cta-btns { margin-top: var(--ds-space-8); }
.mk-dev-eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--ds-primary-on-dark); }
.mk-dev-avail { margin-top: var(--ds-space-4); font-size: var(--ds-text-sm); color: var(--ds-on-dark-muted); }
.mk-dev-avail a { color: var(--ds-primary-on-dark); text-decoration: underline; text-underline-offset: 2px; }

/* Terminal / code block on dark */
.mk-term { margin: 0; min-width: 0; background: var(--ds-dark-deep); border: 1px solid rgba(255,255,255,.1); border-radius: var(--ds-radius-xl); box-shadow: var(--ds-shadow-lg); overflow: hidden; }
.mk-term__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-2) var(--ds-space-4); border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--ds-font-mono); font-size: var(--ds-text-xs); color: var(--ds-on-dark-muted); }
.mk-term pre, .mk-term__body pre { margin: 0; padding: var(--ds-space-5); overflow-x: auto; font-family: var(--ds-font-mono); font-size: 13px; line-height: 1.7; color: var(--ds-on-dark); white-space: pre; }
.mk-term__body { padding-bottom: var(--ds-space-2); }
.mk-term__body pre { padding-top: var(--ds-space-2); }
.mk-term__step { display: flex; align-items: center; gap: var(--ds-space-2); margin: var(--ds-space-4) var(--ds-space-5) 0; font-size: var(--ds-text-xs); color: var(--ds-on-dark-muted); }
.mk-term__step span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--ds-on-dark); font-weight: var(--ds-weight-semi); }
.c-cmd { color: var(--ds-primary-on-dark); font-weight: var(--ds-weight-semi); }
.c-flag { color: var(--ds-warning-border); }
.c-str { color: var(--ds-success-on-dark); }
.c-key { color: var(--ds-primary-on-dark); }
.c-dim { color: var(--ds-on-dark-muted); }
.mk-dev-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 var(--ds-space-2); border: 1px solid rgba(255,255,255,.16); border-radius: var(--ds-radius-sm); background: rgba(255,255,255,.06); font: inherit; font-family: var(--ds-font-sans); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-medium); color: var(--ds-on-dark-muted); cursor: pointer; transition: background-color var(--ds-dur-fast) var(--ds-ease), color var(--ds-dur-fast) var(--ds-ease); }
.mk-dev-copy:hover { background: rgba(255,255,255,.12); color: var(--ds-on-dark); }
.mk-dev-copy.is-done { color: var(--ds-success-on-dark); }
.mk-dev-copy:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }

.mk-dev-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-4); counter-reset: none; }
.mk-dev-steps li { padding: var(--ds-space-6); }
.mk-dev-steps__n { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: var(--ds-space-4); border-radius: 50%; background: var(--ds-primary); color: var(--ds-on-primary); font-weight: var(--ds-weight-bold); }
.mk-dev-steps h3 { font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); margin-bottom: var(--ds-space-2); }
.mk-dev-steps p { font-size: var(--ds-text-sm); color: var(--ds-muted); line-height: 1.6; }
.mk-dev-steps p + p { margin-top: var(--ds-space-2); }

.mk-dev-scroll { overflow-x: auto; max-width: 100%; }
.mk-dev-eps { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); }
.mk-dev-eps table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: var(--ds-text-sm); }
.mk-dev-eps :is(th, td) { padding: var(--ds-space-3) var(--ds-space-4); border-bottom: 1px solid var(--ds-border-soft); text-align: left; vertical-align: middle; }
.mk-dev-eps th { background: var(--ds-surface-alt); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-dev-eps tr:last-child td { border-bottom: 0; }
.mk-dev-eps tbody tr:hover { background: var(--ds-surface-alt); }
.mk-dev-eps td:last-child { color: var(--ds-muted); }
.mk-dev-eps__path { font-family: var(--ds-font-mono); font-size: 13px; color: var(--ds-ink); white-space: nowrap; }
.mk-dev-eps__path:hover { color: var(--ds-primary); text-decoration: underline; text-underline-offset: 2px; }
.mk-method { display: inline-block; min-width: 56px; padding: 2px 6px; border-radius: var(--ds-radius-sm); font-family: var(--ds-font-mono); font-size: 11px; font-weight: var(--ds-weight-semi); text-align: center; letter-spacing: .02em; }
.mk-method--get { background: var(--ds-info-bg); color: var(--ds-info-text); }
.mk-method--post { background: var(--ds-success-bg); color: var(--ds-success-text); }
.mk-method--patch { background: var(--ds-warning-bg); color: var(--ds-warning-text); }
.mk-method--delete { background: var(--ds-danger-bg); color: var(--ds-danger-text); }

.mk-dev-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-4); }
.mk-dev-scope .ds-card { padding: var(--ds-space-6); }
.mk-dev-scope h3 { display: flex; align-items: center; gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); font-size: var(--ds-text-base); font-weight: var(--ds-weight-semi); }
.mk-dev-scope .ds-card:first-child h3 .ds-icon { color: var(--ds-accent); }
.mk-dev-scope .ds-card:last-child h3 .ds-icon { color: var(--ds-subtle); }
.mk-dev-scope ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ds-space-3); font-size: var(--ds-text-sm); color: var(--ds-text); line-height: 1.6; }
.mk-dev-scope strong { color: var(--ds-ink); }

.mk-dev-demo { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--ds-space-4); align-items: start; }
.mk-dev-demo__side { padding: var(--ds-space-5); display: grid; gap: var(--ds-space-5); }
.mk-dev-demo__label { display: flex; align-items: center; gap: 6px; margin-bottom: var(--ds-space-2); font-size: var(--ds-text-xs); font-weight: var(--ds-weight-semi); color: var(--ds-muted); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.mk-dev-demo__val { display: flex; align-items: center; gap: var(--ds-space-2); padding: var(--ds-space-2) var(--ds-space-2) var(--ds-space-2) var(--ds-space-3); background: var(--ds-dark-deep); border-radius: var(--ds-radius); }
.mk-dev-demo__val code { flex: 1; min-width: 0; overflow-x: auto; font-family: var(--ds-font-mono); font-size: 12px; color: var(--ds-on-dark); white-space: nowrap; }
.mk-dev-demo__tags { margin-top: var(--ds-space-2); display: flex; flex-wrap: wrap; gap: 6px; }
.mk-dev-demo__eps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--ds-font-mono); font-size: 13px; color: var(--ds-ink); }
.mk-dev-demo__note { display: flex; gap: var(--ds-space-2); align-items: flex-start; font-size: var(--ds-text-xs); color: var(--ds-muted); }
.mk-dev-demo__note .ds-icon { flex: none; margin-top: 2px; }

/* API reference */
.mk-dev-bar__left, .mk-dev-bar__actions { display: flex; align-items: center; gap: var(--ds-space-3); min-width: 0; }
.mk-dev-toc-toggle { display: none; }
/* A long route must wrap, not widen the grid and cut every other label. */
.mk-dev-toc ul { grid-template-columns: minmax(0, 1fr); }
.mk-dev-toc a { overflow-wrap: anywhere; }
.mk-dev-toc ul ul { margin: 2px 0 var(--ds-space-2) var(--ds-space-3); padding-left: var(--ds-space-2); border-left: 1px solid var(--ds-border); }
.mk-dev-toc ul ul a { padding-block: 3px; font-size: 13px; color: var(--ds-muted); }
.mk-dev-toc a.is-active { background: var(--ds-primary-soft); color: var(--ds-primary-text); font-weight: var(--ds-weight-semi); }
.mk-dev-ref__head { margin-bottom: var(--ds-space-8); padding-bottom: var(--ds-space-6); border-bottom: 1px solid var(--ds-border); }
.mk-dev-ref__head h1 { font-size: var(--ds-text-3xl); font-weight: var(--ds-weight-bold); letter-spacing: var(--ds-tracking-tight); line-height: var(--ds-leading-tight); }
.mk-dev-ref__head > p { margin-top: var(--ds-space-3); color: var(--ds-muted); max-width: 64ch; }
.mk-dev-ref__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3); }
.mk-dev-ref__auth { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ds-text-sm); color: var(--ds-muted); }
.mk-dev-md { max-width: 80ch; }
.mk-dev-md h2 { padding-top: var(--ds-space-2); }
.mk-dev-md :is(h2, h3, h4) { overflow-wrap: anywhere; }
.mk-dev-md h3.mk-dev-endpoint { font-family: var(--ds-font-mono); font-size: var(--ds-text-base); }
.mk-dev-md table { display: table; }
.mk-dev-code { position: relative; margin-bottom: var(--ds-space-4); }
.mk-dev-code pre { margin: 0; padding-right: 88px; }
.mk-dev-code .mk-dev-copy { position: absolute; top: var(--ds-space-2); right: var(--ds-space-2); }
.mk-dev-md .mk-dev-scroll { margin-bottom: var(--ds-space-4); }
.mk-dev-md .mk-dev-scroll table { margin: 0; }

@media (max-width: 1100px) {
  .mk-dev-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .mk-dev-hero__grid, .mk-dev-demo, .mk-dev-scope { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .mk-dev-toc-toggle { display: inline-flex; }
  .mk-dev-bar .mk-kb-bar__inner { flex-direction: row; align-items: center; }
  .mk-dev-bar .mk-kb-crumbs { display: none; }
  .mk-dev-ref .mk-dev-toc { display: none; position: static; order: 0; padding: var(--ds-space-4); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); background: var(--ds-surface); }
  .mk-dev-ref .mk-dev-toc.is-open { display: block; animation: ds-pop-in var(--ds-dur) var(--ds-ease-out); }
}
@media (max-width: 640px) {
  .mk-dev-steps { grid-template-columns: minmax(0, 1fr); }
  .mk-dev-hero { padding-top: calc(var(--ds-nav-height) + var(--ds-space-10)); }
}
.mk-dev-demo__side > * { min-width: 0; }
.mk-kb-prose :not(pre) > code { overflow-wrap: anywhere; }
/* In a table, a code value keeps its width: the table scrolls in .mk-dev-scroll
   rather than squeezing `sender_email` to a few letters per line on a phone. */
.mk-dev-md td code { overflow-wrap: normal; }
@media (max-width: 640px) {
  .mk-dev-bar__actions .ds-btn-secondary { display: none; }
  .mk-dev-bar .mk-kb-bar__inner { gap: var(--ds-space-2); }
}
