/* ═══════════════════════════════════════════════════════════
   hrvault-courses: styles of the flashcards and survey items.
   Loaded after hvc.css on those two pages only; the tokens, buttons,
   notes and type scale come from there. Greek caps are produced in PHP
   through hvc_caps(); no text-transform in this file.
   ═══════════════════════════════════════════════════════════ */

/* ── Flashcards: the tool ──────────────────────────────────── */
.hvc-flashcards { max-width: 760px; margin-top: 8px; }
.hvc-flashcards [hidden] { display: none !important; }
.hvc-fc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.hvc-fc-filter { background: #fff; color: var(--hv-charcoal); border-color: var(--hv-line); }
.hvc-fc-filter:hover { border-color: var(--hv-navy); color: var(--hv-navy); }
.hvc-fc-filter.is-active { background: var(--hv-navy); color: #fff; border-color: var(--hv-navy); }
.hvc-fc-card {
  display: block; width: 100%; min-height: 300px; margin: 0; padding: 28px 28px 24px;
  background: #fff; border: 1px solid var(--hv-line); border-top: 4px solid var(--hv-orange); border-radius: 12px;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--hv-charcoal);
  text-align: center; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s ease-out;
}
.hvc-fc-card:hover { border-color: var(--hv-navy); border-top-color: var(--hv-orange); }
.hvc-fc-card.is-flipped,
.hvc-fc-card.is-flipped:hover { border-top-color: var(--hv-blue); }
.hvc-fc-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 244px; }
.hvc-fc-face--back { display: none; }
.hvc-fc-card.is-flipped .hvc-fc-face--front { display: none; }
.hvc-fc-card.is-flipped .hvc-fc-face--back { display: flex; animation: hvc-fc-in 0.18s ease-out; }
.hvc-fc-kicker { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--hv-orange); }
.hvc-fc-face--back .hvc-fc-kicker { color: var(--hv-blue); }
.hvc-fc-term { font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: 30px; font-weight: 700; color: var(--hv-navy); line-height: 1.25; overflow-wrap: anywhere; max-width: 100%; }
.hvc-fc-def { font-size: 17px; line-height: 1.6; color: var(--hv-charcoal); max-width: 600px; overflow-wrap: anywhere; }
.hvc-fc-hint { font-size: 13px; color: var(--hv-muted); }
.hvc-fc-unitline { font-size: 13px; color: var(--hv-muted); text-align: center; margin: 10px 0 0; min-height: 1.5em; }
.hvc-fc-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 16px; }
.hvc-fc-counter { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--hv-navy); min-width: 84px; text-align: center; font-variant-numeric: tabular-nums; }
.hvc-fc-keys { text-align: center; margin: 12px 0 0; }
@keyframes hvc-fc-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ── Flashcards: the list every browser gets (hidden once the tool starts) ── */
.hvc-fc-group { margin: 0 0 28px; }
.hvc-fc-group h2 { margin-bottom: 10px; }
.hvc-fc-dl { margin: 0; border: 1px solid var(--hv-line); border-radius: 8px; background: #fff; overflow: hidden; }
.hvc-fc-entry { padding: 12px 16px; border-top: 1px solid var(--hv-line); }
.hvc-fc-entry:first-child { border-top: 0; }
.hvc-fc-entry dt { font-size: 15px; font-weight: 600; color: var(--hv-navy); margin: 0 0 3px; }
.hvc-fc-entry dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hv-charcoal); }

/* ── Survey ────────────────────────────────────────────────── */
.hvc-survey { max-width: 760px; margin-top: 8px; scroll-margin-top: var(--hvc-sticky-top, 140px); }
.hvc-survey-intro { font-size: 17px; line-height: 1.6; color: var(--hv-charcoal); margin: 0 0 24px; }
.hvc-survey-intro.hv-article-content { font-size: 17px; }
.hvc-survey-intro p { margin: 0 0 1em; }
.hvc-survey-intro p:last-child { margin-bottom: 0; }
.hvc-survey-error { margin: 0 0 18px; }
.hvc-survey-list { list-style: none; margin: 0; padding: 0; }
.hvc-survey-q { background: #fff; border: 1px solid var(--hv-line); border-radius: 8px; padding: 20px 22px; margin: 0 0 14px; }
.hvc-survey-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.hvc-survey-legend {
  display: block; padding: 0; margin: 0 0 12px; float: none; width: auto;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px; font-weight: 600; color: var(--hv-navy); line-height: 1.45;
}
.hvc-survey-num {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; background: var(--hv-navy); color: #fff; font-size: 13px; font-weight: 700;
  margin-right: 10px; vertical-align: middle; font-variant-numeric: tabular-nums;
}
.hvc-survey-text { display: inline; }
.hvc-survey-optional { font-weight: 400; font-size: 13px; color: var(--hv-muted); white-space: nowrap; }
.hvc-survey-help { font-size: 14px; line-height: 1.5; color: var(--hv-muted); margin: -4px 0 12px 38px; }
.hvc-survey-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.hvc-survey-form [aria-busy="true"] { cursor: progress; }

/* Scale: the low label, five circles, the high label */
.hvc-scale { display: flex; align-items: center; gap: 12px; margin-left: 38px; }
.hvc-scale-label { flex: 1 1 0; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--hv-muted); }
.hvc-scale-label--high { text-align: right; }
.hvc-scale-options { display: flex; gap: 6px; flex-shrink: 0; }
.hvc-scale-opt { position: relative; display: inline-block; cursor: pointer; }
.hvc-scale-opt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.hvc-scale-opt span {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--hv-line); background: #fff; color: var(--hv-navy); font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.hvc-scale-opt:hover span { border-color: var(--hv-navy); }
.hvc-scale-opt input:checked + span { background: var(--hv-orange); border-color: var(--hv-orange); color: #fff; }
.hvc-scale-opt input:focus-visible + span { outline: 2px solid var(--hv-blue); outline-offset: 2px; }

/* Choice: one row per option */
.hvc-choice { display: grid; gap: 8px; margin-left: 38px; }
.hvc-choice-opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--hv-line); border-radius: 6px; background: #fff; font-size: 15px; line-height: 1.45; color: var(--hv-charcoal);
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}
.hvc-choice-opt:hover { border-color: var(--hv-navy); }
.hvc-choice-opt input { flex-shrink: 0; margin: 3px 0 0; accent-color: var(--hv-orange); }
.hvc-choice-opt:has(input:checked) { border-color: var(--hv-orange); background: var(--hv-warm-gray); }
.hvc-choice-opt:has(input:focus-visible) { outline: 2px solid var(--hv-blue); outline-offset: 2px; }

/* Free text */
.hvc-survey-field { margin-left: 38px; }
.hvc-survey-field textarea { display: block; width: 100%; min-height: 110px; padding: 10px 12px; font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; }
.hvc-survey-field textarea:focus-visible { outline: 2px solid var(--hv-blue); outline-offset: 1px; }

/* After the submission: the thanks note and the answers, read-only */
.hvc-survey-outro p { margin: 0 0 0.8em; }
.hvc-survey-outro p:last-child { margin-bottom: 0; }
.hvc-survey-answers-title { margin: 24px 0 12px; }
.hvc-survey-answers { margin: 0; border: 1px solid var(--hv-line); border-radius: 8px; background: #fff; overflow: hidden; }
.hvc-survey-answer { display: grid; gap: 4px; padding: 14px 18px; border-top: 1px solid var(--hv-line); }
.hvc-survey-answer:first-child { border-top: 0; }
.hvc-survey-answer dt { display: flex; align-items: flex-start; gap: 0; font-size: 15px; font-weight: 600; color: var(--hv-navy); line-height: 1.45; }
.hvc-survey-answer dt .hvc-survey-num { width: 24px; height: 24px; font-size: 12px; margin-top: -1px; }
.hvc-survey-answer dd { margin: 0 0 0 34px; font-size: 15px; line-height: 1.55; color: var(--hv-charcoal); white-space: pre-line; overflow-wrap: anywhere; }
.hvc-survey-answer dd.is-empty { color: var(--hv-muted); font-style: italic; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
  .hvc-fc-card { min-height: 240px; padding: 22px 18px 20px; }
  .hvc-fc-face { min-height: 194px; }
  .hvc-fc-term { font-size: 24px; }
  .hvc-fc-def { font-size: 16px; }
  .hvc-fc-nav { gap: 8px 10px; }
  .hvc-fc-nav .hvc-btn { padding-left: 14px; padding-right: 14px; }
  .hvc-survey-q { padding: 16px; }
  .hvc-survey-help, .hvc-choice, .hvc-survey-field { margin-left: 0; }
  .hvc-scale { flex-wrap: wrap; gap: 8px 12px; margin-left: 0; }
  .hvc-scale-options { order: -1; width: 100%; justify-content: center; }
  .hvc-scale-label { flex: 1 1 40%; }
  .hvc-scale-opt span { width: 40px; height: 40px; }
  .hvc-survey-answer dd { margin-left: 0; }
}
@media (max-width: 380px) {
  .hvc-scale-options { gap: 4px; }
  .hvc-scale-opt span { width: 36px; height: 36px; font-size: 14px; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hvc-fc-card, .hvc-fc-filter, .hvc-scale-opt span, .hvc-choice-opt { transition: none !important; }
  .hvc-fc-card.is-flipped .hvc-fc-face--back { animation: none; }
}
