.practice-intro {
  display: grid;
  gap: 0.75rem;
}

.practice-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.practice-summary a {
  display: grid;
  gap: 0.35rem;
  min-height: 6rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(38, 52, 56, 0.96);
  color: var(--text) !important;
  text-decoration: none;
}

.practice-summary a:hover {
  border-color: var(--accent-strong);
  background: rgba(45, 212, 191, 0.12);
  text-decoration: none;
}

.practice-summary .practice-number {
  font: 800 1.35rem/1 "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--accent-strong);
}

.practice-summary .practice-label {
  color: var(--text);
}

.practice-section {
  margin-top: 2rem;
}

.practice-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.practice-page-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.practice-page-nav a {
  display: grid;
  gap: 0.25rem;
  min-height: 4.2rem;
  padding: 0.75rem;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  background: rgba(38, 52, 56, 0.96);
  color: var(--text) !important;
  text-decoration: none;
}

.practice-page-nav a:hover,
.practice-page-nav a.is-active {
  border-color: var(--accent-strong);
  background: rgba(45, 212, 191, 0.14);
  text-decoration: none;
}

.practice-page-nav span {
  font-weight: 800;
  color: var(--accent-strong);
}

.practice-page-nav small {
  color: var(--text-muted);
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}

.practice-submit {
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #081112;
  font: 800 1rem/1 "Trebuchet MS", "Segoe UI", sans-serif;
  cursor: pointer;
}

.practice-submit:hover {
  background: var(--accent-strong);
}

.practice-status {
  margin: 0;
  color: #fde68a;
  font-weight: 700;
}

.practice-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(31, 42, 46, 0.96);
  color: var(--text);
}

.practice-card.has-error {
  border-color: rgba(248, 113, 113, 0.75);
}

.practice-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text) !important;
}

.practice-card pre {
  overflow-x: auto;
  margin: 0.75rem 0 0;
  padding: 1rem;
  border-radius: 6px;
  background: #11181b !important;
}

.practice-options {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option-button {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 8px;
  padding: 0.72rem 0.85rem;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.option-letter {
  flex: 0 0 1.4rem;
  font-weight: 800;
  color: #0f766e;
}

.option-text {
  flex: 1 1 auto;
}

.option-button:hover:not(:disabled) {
  border-color: #0f766e;
  background: #ecfdf5;
}

.option-button.is-selected {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #042f2e;
  box-shadow:
    inset 5px 0 0 #0f766e,
    0 0 0 2px rgba(15, 118, 110, 0.28);
}

.option-button.is-selected .option-letter {
  color: #042f2e;
}

.option-button.is-correct {
  border-color: #15803d;
  background: #dcfce7;
  color: #14532d;
}

.option-button.is-wrong {
  border-color: #b91c1c;
  background: #fee2e2;
  color: #7f1d1d;
}

.option-button:disabled {
  cursor: default;
  opacity: 1;
}

.practice-answer {
  margin: 0;
  padding: 0.75rem;
  border-left: 4px solid var(--accent-strong);
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--text);
}

.practice-answer[hidden] {
  display: none;
}

.practice-results {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 2px solid var(--accent-strong);
  border-radius: 8px;
  background: rgba(31, 42, 46, 0.96);
  color: var(--text);
}

.practice-results h2,
.practice-results h3 {
  color: var(--text) !important;
}

.result-summary {
  font: 800 1.3rem/1.25 "Trebuchet MS", "Segoe UI", sans-serif;
}

.study-list {
  display: grid;
  gap: 0.45rem;
}

.wrong-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.wrong-item {
  padding: 1rem;
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.22);
}

.wrong-item h3 {
  margin: 0 0 0.55rem;
}

.wrong-item p {
  margin: 0.4rem 0;
}

.wrong-text {
  color: #fecaca;
  font-weight: 800;
}

.correct-text {
  color: #bbf7d0;
  font-weight: 800;
}

.study-text {
  color: #fde68a;
  font-weight: 800;
}

@media (max-width: 820px) {
  .practice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-page-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .practice-summary {
    grid-template-columns: 1fr;
  }

  .practice-page-nav {
    grid-template-columns: 1fr;
  }
}
