/* Practice session chrome — load only on practice / demo pages */

.pr-shell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 36rem;
}

.pr-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
}

.pr-lead,
.pr-privacy,
.pr-meta,
.pr-hint {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--fs-small);
  line-height: 1.45;
}

.pr-prompt {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.35;
}

.pr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pr-chip,
.pr-choice,
.pr-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}

.pr-chip[aria-pressed="true"],
.pr-choice[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pr-chip:focus-visible,
.pr-choice:focus-visible,
.pr-btn:focus-visible,
.pr-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pr-btn--primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--paper);
}

.pr-btn--ghost {
  background: transparent;
}

.pr-btn:disabled,
.pr-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Unreadable / empty answer: words first, red pen only as the margin mark (D15). */
.pr-error {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  color: var(--text);
  font-size: var(--fs-small);
}

.pr-field input[aria-invalid="true"] {
  border-color: var(--accent);
}

/* Hint ladder */
.pr-hints {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.pr-hint-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.pr-hint-list:empty {
  display: none;
}

.pr-actions,
.pr-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pr-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pr-field__label {
  font-weight: 600;
  font-size: var(--fs-small);
}

.pr-field input {
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  max-width: 12rem;
}

.pr-compare {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: var(--fs-small);
}

.pr-compare div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-xs);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.pr-compare dt {
  margin: 0;
  color: var(--text-mute);
  font-weight: 600;
}

.pr-compare dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.pr-diagnose {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.pr-steps {
  font-size: var(--fs-small);
}

.pr-steps summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.pr-steps ol {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
  color: var(--text-dim);
}

.pr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.pr-shell {
  position: relative;
}

.pr-privacy code {
  font-size: 0.9em;
}

.pr-timer {
  margin: 0;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.pr-skill-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

/* T2: the session sits in the first screen, so reserve the setup screen's height until the engine
   renders it (measured: 446 px at 320, 425 px at 375, 381 px from 768; scripts/qa/measure-root.mjs). */
#practice-root:empty { min-height: 27.9rem; }
@media (min-width: 22rem) { #practice-root:empty { min-height: 26.6rem; } }
@media (min-width: 48rem) { #practice-root:empty { min-height: 23.8rem; } }
#practice-root { margin-block-end: 2.5rem; }
