/* cfg-flashcards: on-site flip-card study mode */
.cfg-fc { border: 1px solid #e2e8f0; border-radius: 12px; padding: 22px 24px; margin: 30px 0; background: #f8fafc; }
.cfg-fc-title { margin: 0 0 4px; font-size: 1.3rem; line-height: 1.25; }
.cfg-fc-intro { margin: 0 0 14px; color: #475569; font-size: .95rem; }
.cfg-fc-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: #64748b; font-weight: 600; margin-bottom: 12px; }

.cfg-fc-card { perspective: 1200px; cursor: pointer; outline: none; border-radius: 12px; }
.cfg-fc-card:focus-visible { box-shadow: 0 0 0 3px rgba(37,99,235,.35); }
.cfg-fc-inner { position: relative; width: 100%; min-height: 210px; transition: transform .5s; transform-style: preserve-3d; }
.cfg-fc-card.is-flipped .cfg-fc-inner { transform: rotateY(180deg); }
.cfg-fc-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 26px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.cfg-fc-back { transform: rotateY(180deg); background: #0f172a; color: #fff; border-color: #0f172a; }
.cfg-fc-tag { position: absolute; top: 11px; left: 15px; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #94a3b8; font-weight: 800; }
.cfg-fc-back .cfg-fc-tag { color: #64748b; }
.cfg-fc-text { font-size: 1.12rem; line-height: 1.5; font-weight: 600; }
.cfg-fc-back .cfg-fc-text { font-weight: 500; }
.cfg-fc-hint { position: absolute; bottom: 10px; right: 15px; font-size: .7rem; color: #94a3b8; }

.cfg-fc-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cfg-fc-btn { background: #2563eb; color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-size: .92rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.cfg-fc-btn:hover { background: #1d4ed8; }
.cfg-fc-btn--ghost { background: #475569; }
.cfg-fc-btn--ghost:hover { background: #334155; }
.cfg-fc-btn--known { background: #16a34a; }
.cfg-fc-btn--known:hover { background: #15803d; }
.cfg-fc-btn--learn { background: #b45309; }
.cfg-fc-btn--learn:hover { background: #92400e; }

.cfg-fc-footer { margin-top: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.cfg-fc-link { background: none; border: 0; padding: 0; color: #2563eb; font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.cfg-fc-link:hover { color: #1d4ed8; }
.cfg-fc-dl { margin-left: auto; display: inline-block; background: #10b981; color: #0f172a; font-weight: 800; padding: 8px 16px; border-radius: 8px; text-decoration: none; }
.cfg-fc-dl:hover { background: #059669; color: #fff; }
.cfg-fc-done { text-align: center; padding: 42px 20px; color: #166534; font-weight: 700; font-size: 1.05rem; }
.cfg-fc-loading { color: #94a3b8; font-style: italic; }

@media (max-width: 600px) {
  .cfg-fc { padding: 18px 16px; }
  .cfg-fc-inner { min-height: 250px; }
  .cfg-fc-dl { margin-left: 0; }
}
