/* A mock paper answered online: the trial page (templates/mockexams/online.html; Ben, 22 Nov 2026).
   Only what the practice pages' styles in site.css don't already give. */

/* The finishing buttons in the accent colour, as "Mark this question" (Ben, 22 Nov 2026). */
.button--solid { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }

.mock-online__pilot { font-weight: 700; }

.mock-online__trial,
.mock-online__nokey {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--ink-soft);
  border-radius: var(--radius);
}

.mock-label {
  display: block;
  margin: var(--space-3) 0 var(--space-1);
  font-weight: 700;
}

.mock-working {
  display: block;
  width: 100%;
  max-width: 40rem;
  resize: vertical;
  line-height: 1.5;
}

.mock-answer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.mock-answer-line .mock-label {
  flex: 0 0 100%;
  margin-bottom: 0;
}

.mock-answer {
  flex: 0 1 14rem;
}

/* The paper's own drawings sit in .question__diagram and follow the colour schemes as the practice drawings do
   (design.css, ".dark-drawings"). Each carries its own max-width (tools/mock_online_diagrams.py), so a small
   triangle isn't stretched across the column; this keeps site.css's 30rem from overriding it. */
.mock-online .question__diagram svg {
  width: 100%;
  height: auto;
}

.mock-table-wrap {
  max-width: 100%;
  margin: var(--space-4) 0;
  overflow-x: auto;
}

.mock-table {
  border-collapse: collapse;
}

.mock-table th,
.mock-table td {
  padding: var(--space-2);
  border: 1px solid var(--ink-soft);
  font-size: var(--text-sm);
  text-align: center;
  white-space: nowrap;
}

.mock-cell {
  width: 4rem;
  min-width: 0;
  min-height: 2.5rem;
  padding: var(--space-1);
  text-align: center;
}

.mock-paper-note {
  color: var(--ink-soft);
}

.mock-mark-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.mock-question-result {
  margin: 0;
  font-weight: 700;
}

.mock-part-result {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--teal);
  background: var(--surface-soft, var(--teal-pale));
}

.mock-part-result__total {
  margin: 0 0 var(--space-2);
  font-weight: 700;
}

.mock-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mock-rows li {
  display: grid;
  grid-template-columns: 2.25rem 1.5rem 1fr;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}

.mock-rows__mark {
  font-weight: 700;
}

.mock-finish {
  margin-top: var(--space-12);
  padding-top: var(--space-4);
  border-top: 2px solid var(--ink);
}

.mock-finish .button {
  margin-right: var(--space-3);
}

.mock-total {
  font-size: var(--text-lg);
  font-weight: 700;
}

/* Words left out of the typing before it was sent (mockexams/screening.py), said under the question's marks, with
   "This isn't personal information" as a button that reads as a link, as "Flag an error" does on practice pages. */
.mock-left-out {
  margin: var(--space-3) 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.mock-flag-words { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.mock-flag-words:hover { color: var(--ink); }
.mock-flag-words__said { font-weight: 700; }


/* Full screen (design.css, "Full screen"; static/js/mock-online.js): the site's header and footer, the breadcrumb,
   the instructions and "Finished?" go, leaving the title, the squares and the paper. Unlike a practice page, "Show all questions"
   stays: a paper is often answered with every question showing, and the whole paper is shown once it is marked. */
html.full-screen .mock-online > .breadcrumbs,
html.full-screen .mock-online__intro,
html.full-screen .mock-online__trial,
html.full-screen .mock-finish { display: none; }  /* "Finished?" with its line, buttons, guide and report (Ben, 22 Nov 2026) */
html.full-screen .mock-online .jump__all { display: inline-block; }

/* Narrower than 1140px the practice pages' layout puts the note, the question and the squares in order (design.css,
   "On narrower screens"); without this "Finished?" took the first place, above the paper. It goes last. */
@media (max-width: 1139.98px) {
  .js .topic-content:has(.jump) .mock-finish { order: 4; }
}

/* "Clear my answers" asks first (static/js/mock-online.js, askClear). */
.mock-clear-check {
  max-width: 32rem;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--ink-soft);
  border-radius: var(--radius);
}

.mock-clear-check p {
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

/* A graph plotted on the page (Ben, 22 Nov 2026; static/js/grid.js and mock-online.js): the grid as wide as the
   question's column (the drawing's own style caps it at 440px, set by tools/mock_online_diagrams.py), the curve in
   black, and the join button under Undo and Clear. */
.mock-online .question__diagram--plotted svg { max-width: 100% !important; }
/* The curve in the drawing's ink, black (Ben, 22 Nov 2026), and the dark schemes' ink colour there (design.css). */
.mock-curve { fill: none; stroke: #000000; stroke-width: 2px; vector-effect: non-scaling-stroke; pointer-events: none; }
html:is([data-theme="forest"], [data-palette][data-theme="paper"]) .dark-drawings .mock-curve { stroke: var(--drawing-ink); }
.mock-join-row { display: flex; justify-content: center; margin: 0 0 var(--space-4); }
.mock-plot .mock-points { max-width: 40rem; width: 100%; }

/* The summary report (Ben, 22 Nov 2026; static/js/mock-online.js, showReport). */
.mock-report-open { margin-top: var(--space-4); }
.mock-report {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5, 20px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.mock-report:focus { outline: none; }
.mock-report h2 { margin-top: 0; }
.mock-report h3 { margin: var(--space-6) 0 var(--space-2); }
/* Each section of the report opens when its heading is pressed (Ben, 24 Nov 2026). */
.mock-report__fold summary { margin: var(--space-6) 0 var(--space-2); cursor: pointer; }
.mock-report__fold summary h3 { display: inline; margin: 0; }
.mock-report__fold summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.mock-report__paper { margin: 0 0 var(--space-4); color: var(--ink-soft); }
.mock-report__headline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-8, 32px); }
.mock-report__headline p { margin: 0; }
.mock-report__label { display: block; color: var(--ink-soft); font-size: var(--text-sm); }
.mock-report__headline strong { font-size: var(--text-lg); }
.mock-report__note { color: var(--ink-soft); font-size: var(--text-sm); }
.mock-report__list { margin: 0; padding-left: 1.25rem; }
.mock-report__list li { margin: var(--space-2) 0; }
.mock-report__topic { font-weight: 700; }
.mock-report__links { display: block; font-size: var(--text-sm); }
.mock-report__none { list-style: none; margin-left: -1.25rem; color: var(--ink-soft); }
.mock-report__table { border-collapse: collapse; }
.mock-report__table th, .mock-report__table td { padding: var(--space-1) var(--space-3); border-bottom: 1px solid var(--grid); text-align: left; }
.mock-report__table td:first-child, .mock-report__table td:last-child { white-space: nowrap; }
