/* ===== Hydra docs: function cards (unique layout) ===== */

.fn-card {
  position: relative;
  margin: 1.2em 0 2em;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}
[data-md-color-scheme="slate"] .fn-card {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* top gradient strip */
.fn-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--md-primary-fg-color), #8b5cf6 60%, #ec4899);
}

/* --- head row: question left, date right; flex prevents overlap --- */
.fn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 0.9em 1.3em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  background: color-mix(in srgb, var(--md-primary-fg-color) 7%, transparent);
}
.fn-q {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  flex: 1 1 auto;
  padding-left: 1.6em;
  position: relative;
}
.fn-q::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1em;
  height: 1em;
  background-color: var(--md-primary-fg-color);
  -webkit-mask-image: var(--md-admonition-icon--abstract), ;
  mask-image: var(--md-admonition-icon--abstract);
  mask-repeat: no-repeat;
  mask-size: contain;
}
.fn-date {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  opacity: 0.75;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 999px;
  padding: 0.25em 0.8em;
}

/* --- body --- */
.fn-body {
  padding: 1.1em 1.3em 1.4em;
}
.fn-body > :first-child { margin-top: 0; }
.fn-body > :last-child { margin-bottom: 0; }

/* screenshots inside the card */
.fn-body img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.16);
  max-width: 100%;
}

/* keep remaining stock admonitions inside cards tidy */
.fn-body .admonition {
  border-radius: 10px;
}