/* Emoji-led highlight blocks: > 💭 title
   Types: think 💭 · note 📝 · tip 💡 · important ❗ · warning ⚠️ · caution ⛔ · danger 🚫

   Every type is just a set of CSS variables, so both the text color and the
   highlight background can be retuned per type (or per page):

     --hint-bg        highlight background
     --hint-fg        body text color
     --hint-title-fg  title color (defaults to --hint-fg)
     --hint-border    left bar
     --hint-link      link color (defaults to the site link color)

   Example override (put it in the page or in your own CSS):

     .markdown-section .book-hint-think {
       --hint-bg: #ede9fe;
       --hint-fg: #3b0764;
       --hint-border: #7c3aed;
     }

   Only the container is touched, so inline math, tables, code blocks, lists
   and citation superscripts keep rendering exactly as in normal text. */

.markdown-section .book-hint {
  margin: 1.2em 0;
  padding: 0.75em 1em;
  border-left: 4px solid var(--hint-border, #d0d7de);
  border-radius: 3px;
  background: var(--hint-bg, #f6f8fa);
  color: var(--hint-fg, inherit);
}

.markdown-section .book-hint > .book-hint-head {
  margin-bottom: 0.35em;
}

.markdown-section .book-hint .book-hint-title {
  font-weight: 600;
  color: var(--hint-title-fg, var(--hint-fg, inherit));
}

.markdown-section .book-hint > :last-child {
  margin-bottom: 0;
}

/* keep links legible on the tinted background */
.markdown-section .book-hint a {
  color: var(--hint-link, inherit);
  text-decoration: underline;
}

/* ---------- type palette ---------- */

.markdown-section .book-hint-think {
  --hint-bg: #eef2ff;
  --hint-fg: #312e81;
  --hint-border: #6366f1;
}

.markdown-section .book-hint-note {
  --hint-bg: #eff6ff;
  --hint-fg: #1e3a8a;
  --hint-border: #3b82f6;
}

.markdown-section .book-hint-tip {
  --hint-bg: #ecfdf5;
  --hint-fg: #064e3b;
  --hint-border: #10b981;
}

.markdown-section .book-hint-important {
  --hint-bg: #faf5ff;
  --hint-fg: #581c87;
  --hint-border: #a855f7;
}

.markdown-section .book-hint-warning {
  --hint-bg: #fffbeb;
  --hint-fg: #78350f;
  --hint-border: #f59e0b;
}

.markdown-section .book-hint-caution,
.markdown-section .book-hint-danger {
  --hint-bg: #fef2f2;
  --hint-fg: #7f1d1d;
  --hint-border: #ef4444;
}
