/* The reading surface. Tokens, base controls and the record button come from
   /shared/base.css; this file is the text card and the three capture states.

   The one design rule that matters here: the text is the product. It gets the largest
   type on the page, the most contrast and the most room, and every control is smaller
   than it. A reader holds the phone at arm's length and reads a paragraph of Bulgarian
   medical prose aloud without losing their place -- that is the whole job. */

.rmeta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.rmeta .left { margin-left: auto; font-size: 12px; color: var(--mut); }

.blocks { display: grid; gap: 14px; }

.block { display: grid; gap: 4px; }

.blabel {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mut);
}
.blabel.mut { color: var(--warn); }

/* The body: the thing actually being read. 21px at 1.62 is comfortable at arm's length on
   a phone and still fits a 400-character section without scrolling on a desktop. */
.btext {
  margin: 0;
  font-size: 21px; line-height: 1.62; letter-spacing: .1px;
  color: var(--fg);
  /* Report sections keep their line breaks ("КТ на главен мозък - нативно" is a heading
     line, not the start of a sentence); collapsing them runs the heading into the prose. */
  white-space: pre-line;
}
.btext.title { font-size: 17px; font-weight: 600; }
.btext.header {
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mut);
}

/* A block that is displayed for context but must not be spoken. Dimmed and struck through
   the left edge, because "do not read this" has to survive a glance. */
.skipblock { opacity: .55; border-left: 3px solid var(--line); padding-left: 10px; }

.styletip {
  margin: 14px 0 0; font-size: 13px; color: var(--mut);
  border-top: 1px solid var(--line); padding-top: 12px;
}

/* ---- review: the blob is in the browser and nothing has been uploaded ---- */

.review {
  width: 100%; display: grid; gap: 12px; justify-items: center;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.review audio { width: 100%; max-width: 420px; }

button.small { padding: 7px 12px; font-size: 13px; }

/* ---- skip ---- */

.skiplist { display: grid; gap: 8px; margin-bottom: 14px; }
.skiplist .reason { text-align: left; }
.skiplist .reason.on {
  background: rgba(var(--accent-rgb), .14);
  border-color: var(--accent); color: var(--fg);
}

/* ---- spelling report ---- */

/* While the report is open every word of the body is a tap target. The underline says so
   without changing the layout the reader has been reading. */
.btext.picking .w { cursor: pointer; border-bottom: 1px dashed var(--line); }
.btext.picking .w.on {
  background: rgba(var(--bad-rgb), .16); border-bottom-color: var(--bad);
  border-radius: 3px;
}

.typorows { display: grid; gap: 8px; margin-bottom: 14px; }
.typorow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr) auto;
  align-items: center; gap: 8px;
}
.typorow .wrong {
  font-size: 15px; color: var(--bad); text-decoration: line-through;
  overflow-wrap: anywhere;
}
.typorow .arrow { color: var(--mut); }
.typorow input { min-width: 0; width: 100%; }

/* ---- error / done ---- */

.err { border-color: rgba(var(--bad-rgb), .5); background: rgba(var(--bad-rgb), .07); }
.err strong { color: var(--bad); display: block; margin-bottom: 6px; }
.err pre {
  margin: 8px 0 0; padding: 10px; background: var(--sunk); border-radius: 8px;
  font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--mut);
}
.err p { margin: 0; font-size: 13px; color: var(--fg); }

.done h2 { color: var(--ok); }
.done p { margin: 0; font-size: 15px; }

/* ---- the last-recording strip ---- */

.metrics { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.metrics li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.metrics .k { color: var(--mut); }
.metrics .v { font-variant-numeric: tabular-nums; }

/* ---- consent / join / admin-login, which share this sheet ---- */

.prose { font-size: 15px; line-height: 1.6; }
.prose h2 { margin-top: 18px; }
.prose ul { margin: 8px 0; padding-left: 20px; }
.prose li { margin: 5px 0; }
.prose p { margin: 10px 0; }

.form { display: grid; gap: 12px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--mut); }

@media (max-width: 420px) {
  .btext { font-size: 19px; }
}
