/* ------------------------------------------------------------------
   Two-column layout utility
   Usage: wrap content in a container with class "cols cols--2".
   The first child becomes the left column, the second the right.
   On narrow viewports the layout stacks vertically.
   ------------------------------------------------------------------ */

.cols {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.cols--2 > :first-child {
  flex: 1 1 55%;
  min-width: 0;
}

.cols--2 > :last-child {
  flex: 1 1 40%;
  min-width: 0;
}

.cols--2 > :last-child img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Stack on narrow viewports */
@media (max-width: 680px) {
  .cols {
    flex-direction: column;
  }

  .cols--2 > :first-child,
  .cols--2 > :last-child {
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------------------
   API reference link styling
   Applied by the apilinks extension via .api-ref and .api-<platform>
   classes on <code> elements inside <a> tags.
   ------------------------------------------------------------------ */

a .api-ref {
  border-bottom: 1px dotted currentColor;
  padding: 0.1em 0.2em;
}

a:hover .api-ref {
  border-bottom-style: solid;
}

/* Per-platform accent colors (subtle left border) */
a .api-android { border-left: 2px solid #3ddc84; }
a .api-apple   { border-left: 2px solid #147efb; }
a .api-web     { border-left: 2px solid #f7b731; }
a .api-react   { border-left: 2px solid #61dafb; }
