/* Figures of "Naming a sound": rows of sounds on a plate, SVG line art in the plate's inks, the reader's own sound.
 * What a listener marks is the plate's accent; what fails, the record red (--warn). */

.k-svg svg { display: block; width: 100%; height: auto; overflow: visible; }
.k-svg .tick { font: 10px var(--mono); letter-spacing: .04em; fill: var(--ink-3); }
.k-svg .head { font: 11px var(--mono); letter-spacing: .04em; text-transform: uppercase; fill: var(--ink-3); }
.k-svg .name { font: 13px var(--body); fill: var(--ink); }
.k-svg .none { font: 13px var(--body); fill: var(--ink-3); }
.k-svg .mark { font: 500 13px var(--body); fill: var(--blue); }
.k-svg .wave { fill: none; stroke: var(--ink); stroke-width: 1; }
.k-svg .cut { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.k-svg .line { fill: none; stroke: var(--blue); stroke-width: 1.5; }
.k-svg .axis { stroke: var(--rule); stroke-width: 1; }
.k-svg .bar { stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 4 3; }
.k-svg .named { fill: var(--ink-2); }
.k-svg .other { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.k-svg .from { fill: var(--blue); }

/* fig 1.1: a sound to a row: play, what it is, its waveform, the word and who said it */
.k-row { display: grid; grid-template-columns: auto minmax(0, 14rem) minmax(0, 1fr) minmax(0, 15rem); align-items: center; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.k-row:first-child { border-top: 0; padding-top: 2px; }
.k-what { display: grid; line-height: 1.35; }
.k-what b { font-weight: 500; font-size: 15px; color: var(--ink); }
/* the plate's second ink: these lines are read, not glanced at (its third ink, #636363 on the panel, is 2.8:1) */
.k-what small, .k-said small { font: 11px/1.45 var(--mono); color: var(--ink-2); }
.k-what a, .k-said a { color: inherit; }
.k-said { display: grid; line-height: 1.3; }
.k-word { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--blue); }
.k-none { color: var(--ink-3); font-weight: 400; }
figure canvas.k-wave { border-radius: 4px; }
@media (max-width: 760px) {
  .k-row { grid-template-columns: auto minmax(0, 1fr); }
  .k-row .k-wave, .k-row .k-said { grid-column: 1 / -1; }
}

/* fig 3.1 and 7.1: a bar of buttons over the picture */
.k-bar { margin-bottom: 10px; }

/* fig 4.1: a class to a row, its patches as cells */
.k-class { margin-top: 8px; }
.k-label { display: flex; justify-content: space-between; gap: 12px; font: 11px/1.6 var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.k-label .k-from { color: var(--blue); }
.k-mean { color: var(--ink-3); white-space: nowrap; }
figure canvas.k-strip { border-radius: 2px; }

/* fig 7.1: the reader's own sound */
.k-drop { margin: 0; padding: 36px 12px; border: 1px dashed var(--panel-ink-3); border-radius: 8px; text-align: center; color: var(--ink-2); font-size: 15px; }
.plate.k-over .k-drop, .plate.k-over .k-result { outline: 2px dashed var(--blue); outline-offset: 4px; }
.k-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--ink); font-size: 15px; }
.k-head b { font-weight: 500; overflow-wrap: anywhere; }
.k-big { margin: 10px 0 0; font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--blue); }
.k-big:is(.k-wait, .k-none) { color: var(--ink-3); }
.k-big.k-none { font-weight: 400; }
.k-who { margin: 4px 0 0; font: 12px/1.5 var(--mono); color: var(--ink-2); }
.k-shares { display: flex; gap: 2px; margin-top: 14px; font: 11px/22px var(--mono); }
.k-shares:empty { display: none; }
.k-share { flex-basis: 0; min-width: 0; overflow: hidden; padding: 0 6px; border-radius: 3px; white-space: nowrap; }
.k-speech { background: var(--ink); color: var(--panel); }
.k-music { background: var(--ink-3); color: var(--panel); }
.k-noise { background: var(--rule); color: var(--ink-2); }
.k-tags { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; font: 12px/1.5 var(--mono); }
.k-tags li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 3.5em; align-items: center; gap: 10px; color: var(--ink-2); }
.k-tags .k-tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-tags .k-score { text-align: right; font-variant-numeric: tabular-nums; }
.k-tags .k-from { color: var(--blue); }
/* a score's meter, the bar at half its length */
.k-meter { position: relative; height: 8px; border-radius: 2px; background: var(--rule); }
.k-meter i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: currentColor; }
.k-meter::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--ink); }
.k-notes p { margin: 10px 0 0; font: 12px/1.5 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.k-notes .k-fail { color: var(--warn); }
@media (max-width: 520px) { .k-tags li { grid-template-columns: minmax(0, 1fr) 4em 3em; } }
.controls select { padding: 5px 8px; border: 0; border-radius: 8px; background: oklch(91% .004 80); color: var(--ink); }
.controls .action:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

/* the article's tables: what each listener named, and what it costs */
.article .table td:first-child, .article .table th:first-child { white-space: normal; min-width: 11rem; }
/* code: on the sheet, a shade darker, scrolling inside its own box (as audio-in-javascript sets it) */
pre.code { margin: 18px 0 14px; padding: 14px 16px; overflow-x: auto; border-radius: 10px; background: oklch(0% 0 0 / .06); font: 13px/1.6 var(--mono); tab-size: 2; }
pre.code code { font: inherit; }
pre.code i { font-style: normal; color: var(--mute); }
.article > pre.code { max-width: 46rem; }
