/* Answer cards share selection and feedback states across both web grammar views. */
.grammar-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 9px;
  width: 100%;
  margin: 12px 0;
}
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #dce4ed;
  border-radius: 14px;
  background: rgba(255, 255, 255, .8);
  color: #43546d;
  font: inherit;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: none;
  cursor: pointer;
}
.grammar-choice-mark {
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  box-sizing: border-box;
  border: 1.5px solid #bac9d9;
  border-radius: 50%;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice:hover:not(:disabled) {
  background: #f2f6fb;
  border-color: #a7bdd5;
}
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice[aria-checked="true"] {
  color: #24466f;
  background: #edf4ff;
  border-color: #6b92c0;
  box-shadow: inset 0 0 0 1px #6b92c0;
}
.grammar-choice[aria-checked="true"] .grammar-choice-mark {
  background: #517eaf;
  border-color: transparent;
  color: #fff;
}
.grammar-choice[aria-checked="true"] .grammar-choice-mark::after { content: "✓"; }
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice[data-result="correct"] {
  color: #246045;
  background: #eaf6ee;
  border-color: #5c9b77;
  box-shadow: inset 0 0 0 1px #5c9b77;
}
.grammar-choice[data-result="correct"] .grammar-choice-mark { background: #38825a; }
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice[data-result="incorrect"] {
  color: #944b40;
  background: #fff2ef;
  border-color: #ce867a;
  box-shadow: inset 0 0 0 1px #ce867a;
}
.grammar-choice[data-result="incorrect"] .grammar-choice-mark { background: #b76a5c; }
.grammar-choice[data-result="incorrect"] .grammar-choice-mark::after { content: "×"; }
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice:disabled {
  opacity: 1;
  cursor: default;
}
:is(.lesson-part-panel, .practice) .grammar-options .grammar-choice:focus-visible {
  outline: 3px solid #b6cce6;
  outline-offset: 3px;
}
.grammar-options ~ [type="submit"][hidden],
[data-part-grammar] [type="submit"][hidden],
.exercise [type="submit"][hidden],
[data-part-grammar] select[hidden], .exercise select[hidden] { display: none !important; }
.practice .answer-row .action {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  background: #f5f7fb;
  color: #61748c;
  font-size: 13px;
  font-weight: 500;
}
.practice .answer-row .action:hover:not(:disabled) { background: #eaf0f7; }
.practice .exercise { border-color: #e2e8f0; border-radius: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .grammar-options .grammar-choice { transition: background .15s, border-color .15s, box-shadow .15s; }
}
