/* ============================================================
   NT World Ink, /flashcards/
   Page styles for the set catalogue, the study player and the
   glossary list view.

   A documented exception to the "no page-level CSS or JS" house
   rule, built the same way /references/ is: shared styles.css for
   the chrome, one page CSS file, one page JS file. Every value
   here comes from the styles.css design tokens.
   ============================================================ */


/* ============================================================
   1. SHARED PIECES
   ============================================================ */

/* Standfirst under the H1 on the catalogue and the list view. */
.fc-standfirst {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 660px;
  margin-bottom: 24px;
}

/* Mono label, used for meta rows, pills, counts and legends. */
.fc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Vertical hairline between two meta items. */
.fc-divider {
  width: 1px;
  height: 12px;
  background: var(--rule-2);
  flex-shrink: 0;
}

/* Pill / chip, shared by the subject filter and the player controls. */
.fc-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--rule-2);
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-chip:hover { border-color: var(--text-2); color: var(--text); }

.fc-chip.is-on {
  border-color: var(--accent);
  background: rgba(26, 201, 201, 0.12);
  color: var(--accent-2);
}

.fc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

/* Smaller button size used on the set cards. */
.btn-sm { padding: 11px 20px; font-size: 13px; }


/* ============================================================
   2. CATALOGUE  (/flashcards/)
   ============================================================ */

.fc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* A set row: artwork marker, then the set. The marker is .plate-inset from
   styles.css section 25. */
.fc-set {
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  transition: border-color 0.2s ease;
}

.fc-set-noplate { grid-template-columns: minmax(0, 1fr); }

.fc-set-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: 100%;
}

.fc-set:hover { border-color: rgba(26, 201, 201, 0.25); }

.fc-set-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

.fc-set-meta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fc-set-meta .fc-count { color: var(--text-2); }
.fc-set-meta .fc-level { color: var(--text-3); }

.fc-set-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}


/* ============================================================
   3. STUDY PLAYER  (/flashcards/<slug>/)
   ============================================================ */

/* --- Study bar ---------------------------------------------- */

.fc-studybar {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.fc-studybar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fc-studybar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.fc-back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.fc-back:hover { color: var(--accent-2); }

.fc-studybar .fc-divider { height: 20px; }

.fc-studybar-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

.fc-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Progress strip ----------------------------------------- */

/* padding-top only: this element is also a .container, whose side padding must survive. */
.fc-progress { padding-top: 22px; }

.fc-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.fc-progress-right { display: flex; gap: 20px; }
.fc-progress-right .fc-got { color: var(--accent-2); }
.fc-progress-right .fc-repeat { color: var(--text-2); }

.fc-bar {
  height: 3px;
  background: var(--rule);
  border-radius: 100px;
  overflow: hidden;
}

.fc-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.2s ease;
}

/* --- The card ----------------------------------------------- */

.fc-stage { padding-top: 44px; }

.fc-card {
  width: 820px;
  max-width: 100%;
  min-height: 340px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 16px;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s ease;
}

.fc-card:hover,
.fc-card:focus-visible { border-color: rgba(26, 201, 201, 0.35); outline: none; }

.fc-face-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 26px;
}

.fc-face-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  max-width: 640px;
  text-wrap: pretty;
}

/* The face size steps with content length; long ISM definitions run
   past 300 characters and would otherwise overflow the card. */
.fc-face-text.is-short  { font-size: 40px; }
.fc-face-text.is-medium { font-size: 32px; }
.fc-face-text.is-long   { font-size: 26px; }

.fc-hint {
  margin-top: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.fc-done-line {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  margin-top: 20px;
  line-height: 1.6;
}

/* --- Answers and keyboard legend ---------------------------- */

/* The min-height keeps the card still when the buttons appear. */
.fc-answers {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.btn-answer { padding: 14px 34px; }

.fc-keys {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 18px;
}


/* ============================================================
   4. GLOSSARY LIST  (/flashcards/<slug>/list/)
   ============================================================ */

.fc-attrib {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  line-height: 1.7;
  max-width: 660px;
  margin-bottom: 8px;
}

.fc-searchwrap {
  position: relative;
  margin: 32px 0 20px;
}

.fc-searchwrap svg {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 18px;
  height: 18px;
  stroke: var(--text-3);
  stroke-width: 1.6;
  fill: none;
  pointer-events: none;
}

.fc-search {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  padding: 15px 18px 15px 44px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.fc-search::placeholder { color: var(--text-3); }
.fc-search:focus { outline: none; border-color: rgba(26, 201, 201, 0.35); }

.fc-az {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.fc-az-item {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-az-item.is-wide { width: auto; padding: 0 10px; }
.fc-az-item:hover { border-color: var(--text-2); color: var(--text); }

.fc-az-item.is-on {
  border-color: var(--accent);
  background: rgba(26, 201, 201, 0.12);
  color: var(--accent-2);
}

.fc-az-item.is-empty {
  color: #3a3a40;
  border-color: var(--rule);
  cursor: default;
  pointer-events: none;
}

.fc-listcount {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.fc-entry {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--bg-3);
  align-items: baseline;
}

.fc-entry-term {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
}

.fc-entry-kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 4px;
}

.fc-entry-def {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  text-wrap: pretty;
}

.fc-empty {
  padding: 40px 0;
  color: var(--text-2);
}


/* ============================================================
   5. SMALL SCREENS
   ============================================================ */

@media (max-width: 900px) {
  .fc-grid { grid-template-columns: 1fr; }

  .fc-studybar-inner { flex-direction: column; align-items: flex-start; gap: 14px; }

  .fc-card { width: 100%; padding: 32px 24px; }

  .fc-face-text.is-short  { font-size: 30px; }
  .fc-face-text.is-medium { font-size: 26px; }
  .fc-face-text.is-long   { font-size: 21px; }

  .fc-keys { gap: 16px; }

  .fc-entry { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 700px) {
  /* The two counters will not sit on one line at phone width. */
  .fc-progress-row { flex-wrap: wrap; gap: 8px; }
  .fc-progress-right { gap: 16px; }
  .fc-az-item { width: 28px; height: 28px; }
}
