/* PP Trainer v2. Ivan reads in grayscale: every text is near-black on white, never grey; meaning comes from
   weight, borders, fills and the ✓ ≈ ✕ shapes, not from colour. Phone first. */
:root {
  --ink: #0c0c0c;
  --paper: #ffffff;
  --fill: #e6e6e6; /* backgrounds only, never text */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--font); }
.wrap { max-width: 720px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); }
h1 { font-size: 1.6rem; margin: 0.4em 0; }
h2 { font-size: 1.25rem; margin: 1.4em 0 0.4em; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
h3 { font-size: 1.05rem; margin: 1em 0 0.3em; }
h4 { margin: 0.6em 0 0.2em; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
small { font-size: 0.9rem; }
p, ul { margin: 0.4em 0; }
ul { padding-left: 1.2em; }

button {
  font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0;
  min-height: 44px; padding: 6px 14px; cursor: pointer;
}
button.primary { background: var(--ink); color: var(--paper); font-weight: 700; }
button:disabled { border-style: dashed; cursor: wait; }
button.primary:disabled { background: var(--paper); color: var(--ink); }
button.chosen { background: var(--ink); color: var(--paper); }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

input[type="password"], textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0;
  width: 100%; padding: 8px 10px;
}
textarea { resize: vertical; }
::placeholder { color: var(--ink); opacity: 1; font-style: italic; }
label { display: block; }
.field { margin: 0.8em 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }

.err { font-weight: 700; }
.err:empty { display: none; }
.err::before { content: "✕ "; }
.notice { border: 2px dashed var(--ink); padding: 8px 12px; }
.tag { display: inline-block; border: 1px solid var(--ink); padding: 0 6px; margin-left: 6px; font-size: 0.85rem; }
.hint { font-size: 0.95rem; font-style: italic; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
footer { margin-top: 2em; border-top: 2px solid var(--ink); padding-top: 8px; font-size: 0.95rem; }

/* choices on the home screen */
.choices { display: grid; gap: 6px; margin-bottom: 12px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--ink); padding: 8px 10px; cursor: pointer; }
.choice:has(input:checked) { background: var(--fill); border-width: 3px; }
.choice input { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.list { list-style: none; padding: 0; }
.list li { border-bottom: 1px solid var(--ink); padding: 8px 0; }

/* the room */
.bar {
  position: sticky; top: 0; z-index: 2; background: var(--paper); display: flex; gap: 8px; align-items: center;
  border-bottom: 2px solid var(--ink); padding: 6px 0; margin-bottom: 8px;
}
.bar .title { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .back { font-size: 1.4rem; text-decoration: none; padding: 0 6px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.anketa { border: 2px solid var(--ink); padding: 6px 10px; margin-bottom: 8px; }
.anketa summary { font-weight: 700; cursor: pointer; }
.log { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.turn { display: flex; gap: 8px; padding: 8px 10px; border: 2px solid var(--ink); max-width: 92%; }
.turn .who { font-weight: 800; flex: none; min-width: 2.2em; }
.turn .say { white-space: pre-wrap; }
.turn.client { align-self: flex-start; background: var(--paper); }
.turn.psy { align-self: flex-end; background: var(--fill); }
.pause-mark { text-align: center; font-style: italic; }
.pause-mark ol { text-align: left; font-style: normal; border: 2px dashed var(--ink); padding: 6px 10px 6px 2em; }
.composer { position: sticky; bottom: 0; background: var(--paper); display: flex; gap: 8px; align-items: flex-end; padding: 8px 0; border-top: 2px solid var(--ink); }
.composer button { flex: none; }

/* dialogs */
dialog.sheet { border: 3px solid var(--ink); padding: 16px; width: min(640px, 96vw); max-height: 92vh; overflow: auto; color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, 0.55); }

/* the report */
.box { border: 3px solid var(--ink); padding: 4px 12px 10px; margin: 12px 0; }
.box h2 { border: 0; margin-top: 0.5em; }
.skills { list-style: none; padding: 0; }
.skills li { border-bottom: 1px solid var(--ink); padding: 6px 0; }
.mark { display: inline-block; width: 1.6em; text-align: center; font-weight: 800; font-size: 1.15rem; border: 2px solid var(--ink); }
button.ref { min-height: 30px; padding: 0 6px; margin: 0 2px; font-size: 0.9rem; font-weight: 700; }
.refs { display: inline; }
.prose, .card { border: 2px solid var(--ink); padding: 6px 10px; margin: 8px 0; }
details { margin: 10px 0; }
details > summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.status { font-weight: 700; }
.login form { margin-top: 1em; display: grid; gap: 10px; }

/* voice (P2) */
.hold { width: 100%; min-height: 60px; font-weight: 800; touch-action: none; user-select: none; -webkit-user-select: none; margin-bottom: 6px; }
.hold.on { background: var(--ink); color: var(--paper); }
.composer { flex-direction: column; align-items: stretch; }
.say-row { display: flex; gap: 8px; align-items: flex-end; }
.say-row textarea { flex: 1; }
.composer .row { margin: 4px 0 0; }
.toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 0.95rem; margin-right: 12px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--ink); }
select { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); min-height: 44px; width: 100%; }

/* move drill + skill map (P3) */
a.button { display: inline-block; text-decoration: none; border: 2px solid var(--ink); padding: 8px 14px; min-height: 44px; }
a.button.primary { background: var(--ink); color: var(--paper); font-weight: 700; }
.verdict { font-size: 1.3rem; font-weight: 800; }
.strip { display: inline-flex; gap: 3px; vertical-align: middle; flex-wrap: wrap; }
.strip .cell { display: inline-block; width: 1.5em; text-align: center; font-weight: 800; border: 2px solid var(--ink); }
.strip .cell.move { border-style: dashed; }
button.small { min-height: 34px; padding: 2px 10px; font-size: 0.9rem; }
.prewrap { white-space: pre-wrap; }
