/* Mock IELTS report styles.
   Lifted verbatim from zarmed-olympiada/public/report.html so the candidate's
   page on innovativecentre.net is pixel-identical to what staff print from the
   exam kiosk. If the exam side restyles the report, re-copy this. */

  /* Report page — self-contained styling layered over the shared brand sheet.
     The tick/cross visual language mirrors the admin per-submission export
     (.correct / .wrong / .blank) so on-screen and printed reports match. */
  .rp-wrap { max-width: 900px; margin: 0 auto; padding: 0 1rem 3rem; }
  .rp-code-card {
    max-width: 460px; margin: 2rem auto; background: var(--paper);
    border: 1px solid var(--border); border-radius: 14px; padding: 2rem;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .06); text-align: center;
  }
  .rp-code-card h2 { color: var(--blue); margin: 0 0 .35rem; font-size: 1.35rem; }
  .rp-code-card p.rp-hint { color: var(--muted); margin: 0 0 1.25rem; font-size: .95rem; }
  .rp-code-input {
    width: 100%; box-sizing: border-box; font-size: 1.6rem; letter-spacing: .3em;
    text-align: center; text-transform: uppercase; padding: .7rem .5rem;
    border: 2px solid var(--border); border-radius: 10px; font-weight: 700;
    color: var(--ink); font-family: 'Courier New', monospace;
  }
  .rp-code-input:focus { outline: none; border-color: var(--blue); }
  .rp-btn {
    display: inline-block; background: var(--blue); color: #fff; border: none;
    border-radius: 10px; padding: .75rem 1.6rem; font-size: 1rem; font-weight: 600;
    cursor: pointer; margin-top: 1rem;
  }
  .rp-btn:hover { background: var(--blue-dark); }
  .rp-btn:disabled { opacity: .55; cursor: default; }
  .rp-btn--ghost { background: transparent; color: var(--blue); border: 1px solid var(--border); }
  .rp-error { color: var(--crimson); margin-top: 1rem; font-weight: 600; min-height: 1.2em; }

  .rp-report-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem; background: var(--paper); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
  }
  .rp-report-head h2 { margin: 0 0 .2rem; color: var(--blue); font-size: 1.4rem; }
  .rp-report-head .rp-meta { color: var(--muted); font-size: .95rem; }
  .rp-qr { text-align: center; }
  .rp-qr svg { width: 108px; height: 108px; display: block; }
  .rp-qr .rp-qr-label { font-size: .7rem; color: var(--muted); margin-top: .25rem; }

  .rp-skill { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; margin: 1.25rem 0; overflow: hidden; }
  .rp-skill-head {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    padding: .9rem 1.25rem; background: #eef2ff; border-bottom: 1px solid var(--border);
  }
  .rp-skill-head h3 { margin: 0; color: var(--blue-dark); font-size: 1.15rem; }
  .rp-skill-head .rp-tally { font-weight: 700; color: var(--blue); }
  .rp-part { padding: .5rem 1.25rem 1rem; }
  .rp-part h4 { margin: .9rem 0 .5rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
  .rp-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
  .rp-q {
    display: inline-flex; align-items: center; gap: .3rem; min-width: 3.1rem; justify-content: center;
    padding: .35rem .55rem; border-radius: 8px; font-size: .9rem; font-weight: 600; border: 1px solid transparent;
  }
  .rp-q .rp-qn { color: var(--muted); font-weight: 700; font-size: .78rem; }
  /* Mirror admin export: .correct green, .wrong red, .blank grey */
  .rp-q.correct { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
  .rp-q.wrong   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
  .rp-q.blank   { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
  .rp-mark { font-size: 1rem; line-height: 1; }

  .rp-writing-task { padding: .5rem 1.25rem 1.25rem; }
  .rp-writing-task h4 { margin: 1rem 0 .35rem; color: var(--blue-dark); font-size: .95rem; }
  .rp-writing-topic { color: var(--muted); font-style: italic; margin: 0 0 .5rem; font-size: .9rem; }
  .rp-writing-text {
    white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--border);
    border-radius: 10px; padding: .9rem 1rem; font-size: .95rem; line-height: 1.55; color: var(--ink);
  }
  .rp-writing-empty { color: #94a3b8; font-style: italic; }

  /* IELTS band scoring */
  .rp-band, .rp-skill-head .rp-tally.rp-band {
    display: inline-block; background: var(--blue); color: #fff; font-weight: 700;
    border-radius: 999px; padding: .1rem .7rem; font-size: .95rem; line-height: 1.5;
  }
  .rp-band-sm { font-size: .78rem; padding: .05rem .55rem; vertical-align: middle; }
  .rp-wordcount { color: var(--muted); font-size: .78rem; font-weight: 500; margin-left: .25rem; }
  .rp-crit-list { margin: .35rem 0 .6rem; }
  .rp-crit-list .rp-speaking-crit { padding: .35rem 0; }
  .rp-writing-comment {
    margin: 0 0 .6rem; padding: .6rem .9rem; background: #eef2ff; border-radius: 10px;
    color: var(--ink); font-size: .9rem; line-height: 1.5; white-space: pre-wrap;
  }

  .rp-speaking-crit { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #eef2f7; }
  .rp-speaking-crit:last-child { border-bottom: none; }
  .rp-speaking-crit .rp-crit-label { color: var(--ink); }
  .rp-speaking-crit .rp-crit-score { font-weight: 700; color: var(--blue); }
  .rp-speaking-comment { margin-top: .75rem; padding: .75rem 1rem; background: #eef2ff; border-radius: 10px; color: var(--ink); white-space: pre-wrap; }

  .rp-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin: .5rem 0 0; }
  .rp-legend span { display: inline-flex; align-items: center; gap: .35rem; }
  .rp-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

  /* Cover — page 1 of the printed report. */
  .rp-cover { text-align: center; margin: 0 0 2rem; }
  .rp-cover-title {
    margin: 1.5rem 0 .25rem; color: var(--blue-dark);
    font-size: 2.1rem; font-weight: 700; letter-spacing: .01em;
  }
  .rp-cover-sub { margin: 0 0 1.5rem; color: var(--muted); font-size: 1rem; }
  .rp-cover-card {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    text-align: left; max-width: 640px; margin: 0 auto; padding: 1.25rem 1.5rem;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
  }
  .rp-cover-meta { margin: 0; }
  .rp-cover-row { display: flex; gap: .5rem; margin-bottom: .35rem; }
  .rp-cover-row dt { margin: 0; font-weight: 700; color: var(--blue-dark); min-width: 6.5rem; }
  .rp-cover-row dd { margin: 0; color: var(--text); }
  @media (max-width: 560px) { .rp-cover-card { flex-direction: column; align-items: flex-start; } }

  /* Overall Score — the number the candidate actually came for. */
  .rp-overall { margin: 1.75rem 0 .5rem; }
  .rp-overall-title { margin: 0 0 .75rem; color: var(--blue-dark); font-size: 1.05rem; font-weight: 600; }
  .rp-overall-card { background: #f1f5f9; border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; }
  .rp-overall-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem .75rem; background: #fff; border: 1px solid var(--border);
    border-radius: 6px; margin-bottom: .4rem;
  }
  .rp-overall-skill { color: var(--blue-dark); }
  .rp-overall-band { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
  .rp-overall-row--total { background: #fff; border-width: 2px; }
  .rp-overall-row--total .rp-overall-skill { font-weight: 700; }
  .rp-overall-row--total .rp-overall-band { font-size: 1.1rem; }
  .rp-overall-desc { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: .85rem 1rem; margin-top: .6rem; }
  .rp-overall-desc h4 { margin: 0 0 .4rem; color: var(--blue-dark); font-size: .95rem; }
  .rp-overall-desc p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
  .rp-overall-note { margin-top: .5rem; color: var(--muted); font-size: .82rem; }
  .rp-actions { text-align: center; margin: 1.5rem 0; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
  .rp-loading { text-align: center; color: var(--muted); margin: 3rem 0; }

  @media print {
    .rp-actions, .rp-code-card, .rp-print-hide { display: none !important; }
    .rp-skill, .rp-report-head, .rp-cover-card, .rp-overall-card { break-inside: avoid; box-shadow: none; }
    /* The cover is page 1 of the printed report, as in the approved design. */
    .rp-cover { break-after: page; }
    .rp-overall { break-inside: avoid; }
    body { background: #fff; }
  }
