/* exam_ap.css - SAMPLE mockup views (picker, subject home, MCQ mock, FRQ self-score, estimate card).
   Only ex- classes; only tokens that exist in public/styles.css :root; mobile-first, single column.
   The .ex-sample badge is styled only inside the scoped roots below so it never clashes with exam_views.css. */

.ex-picker, .ex-subject, .ex-mock, .ex-frq, .ex-est {
  display: block; box-sizing: border-box; max-width: 960px; margin: 0 auto; padding: 0 4px;
  color: var(--ink);
}

/* SAMPLE badge (scoped) */
.ex-picker .ex-sample, .ex-subject .ex-sample, .ex-mock .ex-sample, .ex-frq .ex-sample, .ex-est .ex-sample {
  display: inline-block; background: var(--warn); color: #fff; border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 800; letter-spacing: .06em; vertical-align: middle;
}

/* headers */
.ex-subject-head, .ex-mock-head, .ex-frq-head, .ex-est-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 12px; }
.ex-subject-title { margin: 0; font-size: 22px; }
.ex-section-title, .ex-group-title { margin: 18px 0 8px; font-size: 16px; }
.ex-group-title { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }

/* exam cards: single column, grid from 600px */
.ex-cards, .ex-myexams { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ex-myexams > .ex-section-title, .ex-myexams > .ex-mine-empty { grid-column: 1 / -1; margin-bottom: 0; }
.ex-exam-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 14px);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.ex-exam-card.ex-current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.ex-exam-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ex-exam-name { font-weight: 700; }
.ex-exam-cat { font-size: 13px; }
.ex-soon { align-self: flex-start; background: var(--line); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.ex-picker .ex-open { align-self: flex-start; }

.ex-search {
  display: block; width: 100%; box-sizing: border-box; margin: 16px 0 6px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-size: 15px;
}
.ex-empty { color: var(--muted); padding: 16px 4px; }

/* units + mastery bars */
.ex-units { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 8px 0 16px; }
.ex-unit { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 14px); padding: 12px 14px; }
.ex-unit-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ex-unit-name { font-weight: 700; }
.ex-unit-weight { white-space: nowrap; font-size: 13px; }
.ex-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ex-bar-fill { height: 100%; background: var(--good); border-radius: 999px; }
.ex-notstarted { display: inline-block; margin-top: 6px; font-size: 13px; }
.ex-answered { margin: 0 0 6px; font-size: 14px; }
.ex-unit-kind { margin: 0 0 8px; font-size: 14px; }

/* actions */
.ex-actions { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

/* MCQ mock overview */
.ex-mock-summary { font-size: 16px; }
.ex-mock-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 14px); }
.ex-mock-unit { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ex-mock-unit:last-child { border-bottom: 0; }
.ex-mock-count { font-weight: 700; }

/* FRQ self-score */
.ex-frq-prompt { line-height: 1.6; }
.ex-frq-parts { padding-left: 22px; line-height: 1.6; }
.ex-frq-answer {
  display: block; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; resize: vertical;
}
/* FRQ answer fieldset: no box of its own; the legend is for screen readers only */
.ex-frq-answer-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.ex-frq-answer-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ex-rubric { margin: 16px 0 8px; display: grid; gap: 10px; }
.ex-rubric-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 14px); padding: 10px 14px; }
.ex-rubric-label { font-weight: 700; margin-bottom: 6px; }
.ex-rubric-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.ex-rubric-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.ex-frq-total { font-weight: 800; font-size: 18px; margin: 12px 0 4px; }
.ex-frq-note { font-size: 14px; margin: 0; }

/* estimate card */
.ex-est-band { background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius, 14px); padding: 18px; font-size: 24px; font-weight: 800; color: var(--brand-dk); }
.ex-est-band.ex-est-mcqonly { border-style: dashed; border-color: var(--warn); }
.ex-est-word, .ex-est-mcq, .ex-est-note, .ex-est-caveat { margin: 10px 0 0; line-height: 1.5; }
section.ex-est .ex-est-note { color: var(--warn); font-weight: 700; }

/* disclaimer footer */
.ex-ap-footer { margin: 24px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ex-ap-disclaimer { margin: 0; font-size: 12px; line-height: 1.5; }

/* focus */
.ex-picker :focus-visible, .ex-subject :focus-visible, .ex-mock :focus-visible, .ex-frq :focus-visible, .ex-est :focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}

@media (min-width: 600px) {
  .ex-cards, .ex-myexams { grid-template-columns: repeat(2, 1fr); }
  .ex-units { grid-template-columns: repeat(2, 1fr); }
  .ex-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .ex-cards, .ex-myexams { grid-template-columns: repeat(3, 1fr); }
}
