/* Pronunciation & Speaking (languages/pronunciation.php). Theme tokens only (THEME-TOKENS.md). */

.pr-main { gap: 10px; }
.pr-lock { margin: 0; color: var(--muted); }
.pr-view-panel { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.pr-muted { color: var(--muted); }
.pr-ipa { font-family: var(--font-body); letter-spacing: .01em; }

/* the accent toggle when a teacher has locked it */
.pr-accents[data-locked="true"] .pr-accent:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Words ---- */
.pr-search { display: flex; gap: 10px; align-items: stretch; }
.pr-search textarea { flex: 1; min-width: 0; resize: vertical; padding: 8px 10px; font: inherit; font-size: 1.05rem;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; }
.pr-search textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.pr-derived { margin: 0; padding: 6px 10px; border-radius: 6px; background: var(--warn-tint); color: var(--ink); }
.pr-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; min-height: 1.4em; }
.pr-line-label { color: var(--muted); font-size: .9rem; }
.pr-line-ipa { font-size: 1.15rem; }
.pr-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pr-word { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.pr-word-missing { opacity: .75; }
.pr-word-text { font: 600 1.15rem/1.2 var(--font-display); color: var(--ink); }
.pr-word-ipa { font-size: 1.1rem; color: var(--accent-deep); }
.pr-respell { font-family: var(--font-mono); font-size: .95rem; color: var(--ink-soft); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pr-chip { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: 999px;
  padding: 1px 8px; font-size: .9rem; cursor: pointer; }
.pr-chip:hover, .pr-chip:focus-visible { background: var(--accent-tint); border-color: var(--accent); }

/* ---- Sounds ---- */
.pr-sounds { flex-direction: row; align-items: stretch; }
.pr-chart { flex: 0 0 min(46%, 520px); overflow: auto; padding-right: 6px; }
.pr-group { margin: 6px 0 6px; font: 600 11.5px/1.2 var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pr-chart-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-bottom: 8px; }
.pr-sound { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--ink); }
.pr-sound:hover, .pr-sound:focus-visible { border-color: var(--accent); }
.pr-sound.is-on { background: var(--accent-tint); border-color: var(--accent-deep); }
.pr-sound-sym { font-size: 1.25rem; line-height: 1.2; }
.pr-sound-ex { font-size: .72rem; color: var(--muted); }

.pr-card { flex: 1; min-width: 0; overflow: auto; padding: 4px 6px 4px 14px; border-left: 1px solid var(--line); }
.pr-card:empty::before { content: "Choose a sound to see how to make it."; color: var(--muted); }
.pr-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.pr-card-sym { font-size: 2.4rem; line-height: 1; color: var(--accent-deep); min-width: 2.2em; }
.pr-card-name { margin: 0; font: 600 1.15rem/1.25 var(--font-display); }
.pr-across { display: flex; flex-wrap: wrap; gap: 4px 12px; width: 100%; color: var(--ink-soft); }
.pr-across-one.is-on { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pr-how { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 0 10px; }
.pr-how dt { font-weight: 600; color: var(--muted); }
.pr-how dd { margin: 0; }
.pr-sub { margin: 12px 0 6px; font: 600 .95rem/1.3 var(--font-display); }
.pr-errors { margin: 0; padding-left: 1.2em; }
.pr-errors li { margin-bottom: 4px; }
.pr-l1 { display: inline-block; font-size: .8rem; padding: 0 6px; border-radius: 999px; background: var(--hint-tint); color: var(--ink); }
.pr-pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-pair { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.pr-vs { font-size: .75rem; color: var(--muted); }
.pr-examples { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-mini { display: inline-flex; flex-direction: column; padding: 4px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.pr-mini-word { font-weight: 600; }
.pr-mini-ipa { font-size: .9rem; color: var(--accent-deep); }

/* phones: one column, the card under the chart */
@media (max-width: 760px) {
  .pr-search { flex-direction: column; }
  .pr-sounds { flex-direction: column; }
  .pr-chart { flex: none; padding-right: 0; }
  .pr-card { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
}

/* ---- Read aloud ---- */
.pr-signin { max-width: 640px; }
.pr-read-title { margin: 0 0 6px; font: 600 1.2rem/1.3 var(--font-display); }
.pr-read-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pr-select { min-width: 220px; padding: 6px 8px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; }
.pr-check { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pr-own { width: 100%; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; resize: vertical; }
.pr-status { margin: 0; }
.pr-passage { flex: 1; min-height: 0; overflow: auto; font-size: 1.35rem; line-height: 2.6; padding: 4px 2px; }
.pr-passage.no-guides { line-height: 1.9; }
.pr-rw { display: inline-flex; flex-direction: column; align-items: center; vertical-align: top; line-height: 1.25; padding: 2px 4px; border-radius: 6px; border-bottom: 3px solid transparent; transition: background-color .15s; }
.pr-rw-ipa { font-size: .78rem; color: var(--muted); min-height: 1em; }
.pr-passage.no-guides .pr-rw-ipa { display: none; }
.pr-rw.is-read { background: var(--ok-tint); }
.pr-rw.is-missed { background: var(--warn-tint); border-bottom-color: var(--warn); }
.pr-rw.is-current { border-bottom-color: var(--accent); background: var(--accent-tint); }
.pr-summary { border-top: 1px solid var(--line); padding-top: 8px; }
.pr-summary .pr-sub { margin-top: 0; }
@media (max-width: 760px) {
  .pr-check { margin-left: 0; }
  .pr-passage { font-size: 1.15rem; }
}

/* ---- Report (the assessment: speech-assess.js) ---- */
.pr-assess-text { font-size: 1.2rem; line-height: 1.7; padding: 4px 2px; }
.pr-assess-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pr-assess-send audio { max-width: 100%; }
.pr-report { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.pr-report-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.pr-score { display: inline-flex; align-items: baseline; gap: 6px; }
.pr-score-n { font: 700 2rem/1 var(--font-display); color: var(--accent-deep); }
.pr-report-words { display: flex; flex-wrap: wrap; gap: 4px; font-size: 1.15rem; }
.pr-rw-btn { border: 0; border-bottom: 3px solid transparent; border-radius: 6px; padding: 2px 6px; font: inherit; color: var(--ink);
  background: var(--panel-2); cursor: pointer; }
.pr-rw-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pr-rw-btn.is-green { background: var(--ok-tint); }
.pr-rw-btn.is-amber { background: var(--warn-tint); border-bottom-color: var(--warn); }
.pr-rw-btn.is-red { background: var(--bad-tint); border-bottom-color: var(--bad); }
.pr-rw-btn.is-missed { background: transparent; border-bottom: 3px dashed var(--bad); color: var(--muted); }
.pr-rw-btn.is-unscored { background: transparent; color: var(--muted); }
.pr-word-detail { min-height: 1.6em; }
.pr-ph { display: inline-block; padding: 0 4px; margin-right: 2px; border-radius: 4px; }
.pr-ph.is-amber { background: var(--warn-tint); }
.pr-ph.is-red, .pr-ph.is-missed { background: var(--bad-tint); }
.pr-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
.pr-key-dot { display: inline-block; width: .9em; height: .9em; border-radius: 3px; background: var(--ok-tint); }
.pr-key-dot.is-amber { background: var(--warn-tint); }
.pr-key-dot.is-red { background: var(--bad-tint); }
.pr-key-dot.is-missed { background: transparent; border-bottom: 2px dashed var(--bad); }
.pr-report-part { border-top: 1px solid var(--line); padding-top: 8px; }
.pr-report-part > p:last-child, .pr-report-part > ul:last-child { margin-bottom: 0; }
.pr-sub-small { margin: 10px 0 4px; font: 600 .9rem/1.3 var(--font-display); color: var(--ink-soft); }
.pr-work-on li { margin-bottom: 6px; }
.pr-next { font-weight: 600; }
.pr-report-teacher { background: var(--panel-2); border-radius: 6px; padding: 8px 12px; }
.pr-table-wrap { overflow-x: auto; }
.pr-table { border-collapse: collapse; min-width: 480px; }
.pr-table th, .pr-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.pr-table th { color: var(--muted); font-weight: 600; }
.pr-pitch { display: block; width: 100%; height: 160px; }
.pr-delete { align-self: flex-start; }
.pr-reports { border-top: 1px solid var(--line); padding-top: 8px; }
.pr-report-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
