/* 指標の説明カード — shared by 指標辞典 (glossary) and the board's 「説明」 dialog.
   Markup: templates/partials/help_card.html */
.gl-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gl-chip {
  font-size: 0.75rem; font-weight: 800; border-radius: 999px; padding: 2px 8px;
  background: #eaf1ff; color: #1d4ed8;
}
.gl-chip.kind-traffic { background: #e0f2fe; color: #0369a1; }
.gl-chip.kind-event { background: #f3effe; color: #6d28d9; }
.gl-chip.kind-business { background: #e6f6f2; color: #0f766e; }
.gl-chip.kind-meta { background: #f1f3f5; color: #475569; }
.gl-title { font-size: 1.125rem; line-height: 1.35; }
.gl-id {
  align-self: flex-start; font-family: ui-monospace, Menlo, monospace; font-size: 0.75rem;
  color: #475569; background: #f1f5f9; border-radius: 4px; padding: 1px 6px; overflow-wrap: anywhere;
}
.gl-meaning { font-size: 0.8125rem; line-height: 1.65; color: #334155; white-space: pre-line; }
/* opened part */
.gl-open {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; padding: 0 18px 18px;
  animation: gl-in 0.22s ease-out;
}
@keyframes gl-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.gl-k { font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.gl-formula, .gl-tip { display: flex; flex-direction: column; gap: 6px; }
.gl-formula .mono {
  font-family: ui-monospace, Menlo, monospace; font-size: 0.8125rem; line-height: 1.6;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  overflow-wrap: anywhere;
}
.gl-tip { background: #f3f7fe; border-radius: 12px; padding: 12px 14px; }
.gl-tip .gl-k { color: var(--accent-ink); }
.gl-tip span:last-child { font-size: 0.9375rem; line-height: 1.7; }
.gl-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; align-content: flex-start; }
.gl-bench {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 8px;
  font-size: 0.75rem; font-weight: 700; background: #f1f3f5; color: var(--muted);
}
.gl-bench.is-on { background: #e8eefc; color: #1e40af; }
.gl-to-board { font-size: 0.8125rem; font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.gl-to-board:hover { text-decoration: underline; }

/* the board's 「説明」: the same card in a <dialog> */
.help-dialog { border: 0; padding: 0; background: transparent; max-width: min(640px, calc(100vw - 32px)); width: 100%; }
.help-dialog::backdrop { background: rgba(15, 23, 42, 0.38); }
.help-card {
  background: #fff; border: 1px solid #9db8ea; border-radius: 14px; box-shadow: 0 16px 40px rgba(21, 32, 51, 0.16);
  padding: 16px 0 0; display: flex; flex-direction: column; gap: 8px; margin: 0;
  font-family: var(--font-ui, "IBM Plex Sans JP", "Noto Sans JP", sans-serif); color: var(--ink, #152033);
}
.help-card > .gl-card-top, .help-card > .gl-title, .help-card > .gl-id, .help-card > .gl-meaning { margin-left: 18px; margin-right: 18px; }
.help-card > .gl-meaning { margin-top: 0; margin-bottom: 4px; }
.help-card .gl-open { padding-top: 4px; }
.help-close {
  width: 32px; height: 32px; flex: none; border: 1px solid #e5eaf1; border-radius: 8px; background: #fff;
  color: #5b6676; cursor: pointer; font: inherit; font-size: 0.9375rem;
}
.help-close:hover { background: #f1f5f9; color: #152033; }
