.lfq-wrap {
  max-width: 760px;
  margin: 1.25rem 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.lfq-advice {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: rgba(0,0,0,0.02);
}

.lfq-advice summary {
  cursor: pointer;
  user-select: none;
}

.lfq-advice-body {
  margin-top: 0.6rem;
}

.lfq-panel {
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.lfq-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.lfq-question {
  font-size: 1.15rem;
  margin: 0.4rem 0 0.9rem;
}

.lfq-form {
  margin: 0;
}

.lfq-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.lfq-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  margin-bottom: 0.55rem;
  cursor: pointer;
}

.lfq-option input[type="radio"] {
  margin: 0;
}

.lfq-letter {
  width: 1.6rem;
  font-weight: 600;
  opacity: 0.9;
}

.lfq-latin {
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  letter-spacing: 0.01em;
}

/* ---------- Buttons / Actions ---------- */

.lfq-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  align-items: stretch;
}

/* Harden against theme button rules */
.lfq-actions .lfq-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,0.16);
  background: #f6f6f6;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;

  /* The key bits for “Next” visibility */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.2;
  white-space: nowrap;

  /* Make the three buttons behave predictably */
  flex: 1 1 9.5rem;   /* equal-ish widths, wraps cleanly */
  min-height: 44px;   /* touch-friendly, consistent height */
  box-sizing: border-box;
}

.lfq-actions .lfq-btn:focus {
  outline: 2px solid rgba(0,0,0,0.25);
  outline-offset: 2px;
}

.lfq-actions .lfq-btn:hover:not(:disabled) {
  filter: brightness(0.98);
}

.lfq-actions .lfq-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.15);
}

/* Primary button (Check) */
.lfq-actions .lfq-btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Light button (Restart) */
.lfq-actions .lfq-btn-light {
  background: #fff;
}

/* On very narrow screens, stack buttons full width */
@media (max-width: 420px) {
  .lfq-actions {
    flex-direction: column;
  }
  .lfq-actions .lfq-btn {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* ---------- Feedback ---------- */

.lfq-feedback {
  margin-top: 0.85rem;
  min-height: 2.2rem;
}

.lfq-ok {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,128,0,0.25);
  background: rgba(0,128,0,0.06);
  font-weight: 600;
}

.lfq-bad {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(180,0,0,0.22);
  background: rgba(180,0,0,0.06);
  font-weight: 700;
}

.lfq-explain {
  margin-top: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
  line-height: 1.35;
}

.lfq-warn {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(160,120,0,0.25);
  background: rgba(160,120,0,0.08);
}

.lfq-score {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.lfq-finish {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.02);
}

/* ---------- Accessibility helper ---------- */

.screen-reader-text {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
/* --- LFQ button visibility hard override (place at end of file) --- */

/* Force readable text colour on our buttons, regardless of theme defaults */
.lfq-wrap .lfq-actions .lfq-btn,
.lfq-wrap .lfq-actions .lfq-btn-light,
.lfq-wrap .lfq-actions #lfq-next {
  color: #111 !important;
}

/* Disabled "Next" must still be readable (do NOT fade it into invisibility) */
.lfq-wrap .lfq-actions #lfq-next:disabled {
  opacity: 1 !important;                 /* stop the wash-out */
  color: rgba(0, 0, 0, 0.55) !important; /* readable disabled text */
  background: #f0f0f0 !important;
  border-color: rgba(0, 0, 0, 0.20) !important;
}

/* When enabled, make "Next" clearly visible */
.lfq-wrap .lfq-actions #lfq-next:not(:disabled) {
  opacity: 1 !important;
  color: #111 !important;
  background: #f6f6f6 !important;
  border-color: rgba(0, 0, 0, 0.20) !important;
}

/* If your theme is also fading all disabled buttons, override that too */
.lfq-wrap .lfq-actions .lfq-btn:disabled {
  opacity: 1 !important;
  filter: none !important;
}
/* --- FIX: Check button text visibility --- */

/* Primary "Check" button must have white text on dark background */
.lfq-wrap .lfq-actions .lfq-btn-primary {
  color: #ffffff !important;
}

/* Keep it readable on hover/focus as well */
.lfq-wrap .lfq-actions .lfq-btn-primary:hover,
.lfq-wrap .lfq-actions .lfq-btn-primary:focus {
  color: #ffffff !important;
}


