/* Passive section tips — a quiet marker beside a section heading.
 *
 * Everything here is scoped under .sc-tip so it cannot reach application
 * controls. Colours come from the app's own theme tokens, so light and dark
 * are handled by theme.css rather than duplicated here.
 */

.sc-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  vertical-align: middle;
  /* The marker rides beside a heading; never let it inherit the heading's
     size, weight or letter-spacing. */
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1;
}

.sc-tip-mark {
  all: unset;
  box-sizing: border-box;
  cursor: help;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 10px/1 Inter, system-ui, sans-serif;
  color: var(--text-muted);
  border: 1px solid var(--border-color, var(--text-muted));
  background: transparent;
  transition: color .16s, border-color .16s, background .16s;
}

.sc-tip-mark:hover,
.sc-tip-mark[aria-expanded="true"] {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.sc-tip-mark:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.sc-tip-card {
  position: absolute;
  z-index: 900;          /* above cards, below modals */
  top: calc(100% + 9px);
  left: -8px;
  width: 290px;
  max-width: calc(100vw - 32px);
  padding: 12px 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color, var(--text-muted));
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  pointer-events: none;
  text-align: left;
  white-space: normal;
}

.sc-tip.open .sc-tip-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Flipped when the card would otherwise run off the right edge. */
.sc-tip-card.flip-right { left: auto; right: -8px; }

.sc-tip-card b {
  font: 600 13px/1.35 'Inter Tight', Inter, system-ui, sans-serif;
  color: var(--text-primary);
}

.sc-tip-card span {
  font: 400 12.5px/1.55 Inter, system-ui, sans-serif;
  color: var(--text-secondary);
}

.sc-tip-card::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 14px;
  width: 9px;
  height: 9px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color, var(--text-muted));
  border-top: 1px solid var(--border-color, var(--text-muted));
  transform: rotate(45deg);
}

.sc-tip-card.flip-right::before { left: auto; right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .sc-tip-mark,
  .sc-tip-card { transition: none; }
}
