/* dspy4s docs: small brand tweaks on top of the Material theme. */

:root {
  --md-primary-fg-color: #5b3df5;
  --md-primary-fg-color--light: #7c63f7;
  --md-primary-fg-color--dark: #3f27c4;
  --md-accent-fg-color: #6d4bff;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #8a73ff;
  --md-accent-fg-color: #a48dff;
}

/* ── Minimal hero (homepage) ───────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}

.hero__title {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.6rem;
  background: linear-gradient(110deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* The permalink anchor (¶) added by toc would inherit the transparent fill. */
.hero__title .headerlink {
  display: none;
}

.hero__tagline {
  font-size: 1.25rem;
  max-width: 40rem;
  margin: 0 auto 1.8rem;
  color: var(--md-default-fg-color--light);
}

.hero__actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero__actions .md-button {
  font-weight: 600;
}

/* Grid-card icons inherit the brand color. */
.md-typeset .grid.cards :is(.lg, .xl) {
  color: var(--md-primary-fg-color);
}

/* ── Flow diagrams (self-contained, no JS) ─────────────────────────────── */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem 0.5rem;
  margin: 1.4rem 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.flow-step small {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  font-size: 0.86em;
  color: var(--md-default-fg-color--light);
}

.flow-step--accent {
  border-color: var(--md-primary-fg-color);
  background: color-mix(in srgb, var(--md-primary-fg-color) 12%, var(--md-code-bg-color));
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--md-primary-fg-color);
  font-weight: 700;
  font-size: 1.05rem;
}

/* The runtime-context wrapper: shows that the flow runs inside an ambient scope. */
.flow-context {
  border: 1px dashed var(--md-default-fg-color--light);
  border-radius: 0.6rem;
  padding: 0.5rem 0.9rem 0.2rem;
  margin: 1.4rem 0;
}

.flow-context__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

.flow-context .flow {
  margin: 0.5rem 0 0.7rem;
}
