

/*
 * <KeyboardHelp /> — modal overlay styling. Centered card, dim
 * backdrop, close-on-esc / click-outside. Same visual register as
 * the legal-doc modal on /signup so the modal language is one
 * across surfaces.
 */

.keyboard-help-mount {
  /* Mount node only — the actual overlay is fixed-position below. */
  display: contents;
}

.keyboard-help-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.keyboard-help-dialog {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
}

.keyboard-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-soft);
}
.keyboard-help-title {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--font-medium);
  letter-spacing: -0.005em;
}
.keyboard-help-close {
  background: transparent;
  border: 0;
  padding: 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}
.keyboard-help-close:hover { color: var(--ink); }

.keyboard-help-groups {
  padding: 1rem 1.25rem 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.keyboard-help-group-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--font-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 0.375rem;
}

.keyboard-help-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.keyboard-help-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}
.keyboard-help-keys {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.keyboard-help-keys kbd {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  line-height: 1.5;
  white-space: nowrap;
}
.keyboard-help-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.keyboard-help-foot {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--rule-soft);
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}
.keyboard-help-foot kbd {
  font-family: inherit;
  font-size: 0.625rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 5px;
  background: var(--bg);
  color: var(--ink-soft);
  line-height: 1;
  margin-right: 0.25rem;
}
