:root {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  /* Palette — taken verbatim from the approved landing design */
  --primary: #0EA5E9;
  --primary-ink: #1B4FD1;
  --primary-soft: #EAF0FF;
  --accent: #F3A712;
  --accent-soft: #FCEFD3;
  --ink: #0E1A2B;
  --muted: #5B6B82;
  --faint: #8494A8;
  --bg: #FBFCFE;
  --panel: #F2F6FC;
  --line: #E6ECF4;
  --card: #FFFFFF;
  --max: 1200px;

  min-height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseDot {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* ── Hover utilities ──
   The source design expressed hover state via a `style-hover` attribute that
   its runtime resolved. Angular templates can't inline :hover, so those states
   live here as classes and get applied alongside the inline base styles. */
.mk-link {
  transition: color .15s ease;
}
.mk-link:hover {
  color: var(--ink);
}

.mk-btn {
  transition: background .15s ease, transform .15s ease;
}
.mk-btn:hover {
  background: var(--primary-ink);
  transform: translateY(-1px);
}

.mk-ghost {
  transition: border-color .15s ease, color .15s ease;
}
.mk-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mk-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mk-card:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 44px -28px rgba(14, 26, 43, .4);
  transform: translateY(-3px);
}

.mk-white-btn {
  transition: transform .15s ease;
}
.mk-white-btn:hover {
  transform: translateY(-1px);
}

.mk-white-ghost {
  transition: background .15s ease;
}
.mk-white-ghost:hover {
  background: rgba(255, 255, 255, .24);
}

/* ── Flow diagram connectors ──
   Arrowheads are CSS triangles, not ▶/▷ glyphs: glyph metrics never sat flush
   on the 2px rule, and the connector has to flip vertical on small screens.
   The hue comes from `color` on the wrapper, so each lane sets it once. */
.mk-flow-arrow {
  flex: 1;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
}
.mk-flow-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  line-height: 1.2;
  color: #8FA0B6;
  white-space: nowrap;
}
.mk-flow-line {
  position: relative;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.mk-flow-line--dashed {
  /* Pattern runs from the arrowhead end, so a dash always meets the tip
     instead of leaving the head floating after a gap. */
  background: repeating-linear-gradient(to left, currentColor 0 6px, transparent 6px 12px);
}
.mk-flow-line--faint {
  opacity: .45;
}
/* The head sits flush after the line's end rather than on top of it, so the
   final dash of a dashed run still meets its base. */
.mk-flow-line::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right: 0;
  border-left: 8px solid currentColor;
}
.mk-flow-line--back::after {
  right: auto;
  left: -8px;
  border: 5px solid transparent;
  border-left: 0;
  border-right: 8px solid currentColor;
}

/* ── Responsive ──
   The design was authored on a fixed 1280px canvas with no breakpoints; these
   collapse its multi-column grids and wide flow lanes down for small screens. */
@media (max-width: 960px) {
  .mk-hero {
    grid-template-columns: 1fr !important;
  }
  .mk-grid-4,
  .mk-grid-3,
  .mk-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .mk-nav-links,
  .mk-nav-docs {
    display: none !important;
  }
  .mk-flow-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }
  .mk-flow-row > div {
    width: 100% !important;
  }
  /* Stacked lanes read top-to-bottom, so the in-lane connectors turn vertical.
     The line stays on the cards' centre axis and the label rides beside it. */
  .mk-flow-arrow {
    position: relative;
    flex: none;
    width: 100%;
    min-width: 0;
    padding: 12px 0;
  }
  .mk-flow-arrow .mk-flow-line {
    width: 2px;
    height: 40px;
    margin: 0 auto;
    background: currentColor;
  }
  .mk-flow-arrow .mk-flow-line--dashed {
    background: repeating-linear-gradient(to top, currentColor 0 6px, transparent 6px 12px);
  }
  .mk-flow-arrow .mk-flow-line::after {
    top: auto;
    bottom: -8px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom: 0;
    border-top: 8px solid currentColor;
  }
  .mk-flow-arrow .mk-flow-label {
    position: absolute;
    top: 50%;
    left: calc(50% + 22px);
    transform: translateY(-50%);
  }
}

@media (max-width: 620px) {
  .mk-grid-4,
  .mk-grid-3,
  .mk-grid-2 {
    grid-template-columns: 1fr !important;
  }
  /* The 32px canvas gutter eats a phone's usable width in portrait. */
  section > div {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .mk-lane {
    padding: 20px 14px !important;
  }
  .mk-flow-arrow {
    padding: 10px 0 !important;
  }
  /* Wrapped meta rows left their bullet separators stranded at line ends. */
  .mk-meta {
    gap: 6px 18px !important;
  }
  .mk-meta-sep {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile navigation ──
   Below 960px the desktop link row is repurposed as a dropdown panel instead of
   being duplicated in the markup: the burger toggles `.mk-open` on the header
   and the same <a> elements restack under it. The header is sticky, so it is
   already the containing block the panel positions against. */
.mk-burger {
  display: none;
  margin-left: 4px;
  padding: 9px 10px;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.mk-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .18s ease, opacity .18s ease;
}
.mk-open .mk-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mk-open .mk-burger span:nth-child(2) {
  opacity: 0;
}
.mk-open .mk-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* Shown only inside the mobile panel — the desktop header has its own copy. */
.mk-only-mobile {
  display: none !important;
}

@media (max-width: 960px) {
  .mk-burger {
    display: flex !important;
  }
  /* The burger costs the header row ~40px, which was enough to wrap the CTA
     onto a second line and grow the sticky bar. Trim the gutter and keep the
     label on one line. */
  header > nav {
    padding: 14px 20px !important;
    gap: 12px !important;
  }
  header .mk-btn {
    white-space: nowrap;
  }
  .mk-nav-links {
    display: none !important;
  }
  .mk-open .mk-nav-links {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0 !important;
    margin: 0 !important;
    padding: 8px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -28px rgba(14, 26, 43, .45);
  }
  .mk-open .mk-nav-links > a {
    padding: 13px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .mk-open .mk-nav-links > a:last-child {
    border-bottom: 0;
  }
  .mk-open .mk-only-mobile {
    display: block !important;
  }
}
