/* ===========================================================================
 * analogy-item.css — canonical visual for AnalogyItem.
 * ===========================================================================
 * Single source of truth for .an-eyebrow / .an-stem / .an-stem-a/b/as/blank /
 * .an-choices / .an-choice / .an-letter / .an-choice-main / .an-choice-text /
 * .an-choice-as / .an-elim / state classes. Replaces the per-surface scoped
 * duplicates that previously lived in subjects/vocab/styles.css
 * (.quiz-screen .an-*) and diagnostic-ui.css (.diag-an-region .an-*).
 *
 * Surface stylesheets may still override individual properties for
 * surface-specific behavior:
 *   - .exam-screen (vocab exam mode) flips eyebrow to display:none and uses
 *     box-shadow selected state — kept in subjects/vocab/styles.css.
 *   - .diag-an-region (diagnostic) uses a slightly bigger stem font and
 *     hides elim — kept in diagnostic-ui.css.
 *
 * Loaded BEFORE surface stylesheets in index.html so per-surface overrides
 * win on specificity.
 * ========================================================================= */

.an-eyebrow {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.an-stem {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-bottom: 14px;
  text-wrap: pretty;
}

.an-stem-a, .an-stem-b {
  text-transform: uppercase;
  font-family: var(--font-display);
}
.an-stem-as {
  color: var(--ink-70);
  font-style: italic;
  font-weight: 500;
}
.an-stem-blank {
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.an-choices { display: grid; gap: 8px; }

.an-choice {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--ink-10);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: all 0.15s;
  font-size: 14px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.an-choice:hover:not(:disabled) { border-color: var(--ink-30); }
.an-choice:disabled { cursor: default; }

.an-choice.is-correct {
  background: var(--accent-sage-tint);
  border-color: var(--accent-sage);
  color: var(--accent-sage-ink);
}
.an-choice.is-correct .an-letter { background: var(--accent-sage); color: #fff; }
.an-choice.is-wrong {
  background: var(--accent-coral-tint);
  border-color: var(--accent-coral);
  color: var(--accent-coral-ink);
}
.an-choice.is-wrong .an-letter { background: var(--accent-coral); color: #fff; }
.an-choice.is-dimmed { opacity: 0.75; }
.an-choice.an-choice-shake { animation: an-shake 0.35s; }
.an-choice.is-eliminated { opacity: 0.5; cursor: default; }
.an-choice.is-eliminated .an-choice-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--ink-30);
}

.an-letter {
  align-self: center;
  background: var(--ink-10);
  color: var(--ink-70);
  border-radius: 8px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.an-choice-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.an-choice-text { display: block; }
.an-choice-as {
  color: var(--ink-soft);
  font-style: italic;
}

.an-elim {
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-10);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-30);
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.an-elim:hover { border-color: var(--ink-30); color: var(--ink-soft); }
.an-elim.is-on {
  background: var(--accent-coral-tint);
  border-color: var(--accent-coral);
  color: var(--accent-coral-ink);
}

@keyframes an-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
