/* How to transcribe a recorded call on your own Mac. Loaded after articles.css, for this article only.

   One property carries the argument: a voice lane. A call is drawn as two lanes over the same 40
   minutes, and the text that came out of them under it. Orange is what the first try lost, and nothing
   else: the flat lane where a voice never reached the file, and the one line repeated over the quiet
   parts. Indigo is the time that came back: the talk, as text, with nothing typed from memory. Voices
   themselves stay in ink, because a voice is neither a leak nor time back. */

.a-hero h1, .a-body h2, .a-body h3 { text-wrap: balance; }
.a-hero .lead, .a-body p, .a-body li { text-wrap: pretty; }
[hidden] { display: none !important; }
.tc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Shared: a lane of speech ---------- */
.tc-who { margin: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.2; text-transform: uppercase; color: var(--ink-hint); }
.tc-lane { position: relative; display: block; height: 44px; min-width: 0; overflow: hidden; border-radius: 10px; background: var(--paper); }
.tc-lane svg { position: absolute; left: 0; top: 4px; display: block; width: 100%; height: calc(100% - 8px); overflow: visible; }
.tc-base { stroke: #CDD2E6; stroke-width: 1.5; }
.tc-bars { fill: none; stroke: #69719A; stroke-width: 2.4; stroke-linecap: round; }
.tc-you .tc-bars { stroke: var(--ink); }
.tc-skip {
  position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc(var(--w) * 1%);
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #CDD2E6 0 2px, transparent 2px 7px);
}
.tc-skip i { font: 600 0.6875rem/1 var(--mono); font-style: normal; color: var(--ink-hint); }

/* ---------- The set piece: one call, two ways ----------
   The finished picture is plain markup, so no JS and reduced motion get the fixed run. articles.js
   arms it; when it reaches the screen the gradient cuts the repeated lines, your lane fills in, the
   quiet parts are marked as skipped and the indigo card below takes the ring. */
.tc-fig {
  margin: 0; padding: clamp(14px, 2.6vw, 24px); border-radius: 22px; background: var(--surface);
  box-shadow: var(--shadow-float); display: grid; gap: 16px; min-width: 0;
}
.tc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-head .eyebrow { color: var(--ink-hint); }
.tc-again { padding: 0.5em 0.95em; border: 0; border-radius: 999px; background: var(--grid); color: var(--ink); font: 700 0.8125rem/1.2 var(--sans); cursor: pointer; transition: background-color 0.2s; }
.tc-again:hover { background: var(--rule); }
.tc-again:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.tc-stage { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 8px 14px; align-items: center; min-width: 0; }
.tc-axis { position: relative; height: 1rem; font: 500 0.75rem/1 var(--mono); color: var(--ink-hint); }
.tc-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.tc-axis span:nth-child(1) { left: 0; transform: none; }
.tc-axis span:nth-child(2) { left: 25%; }
.tc-axis span:nth-child(3) { left: 50%; }
.tc-axis span:nth-child(4) { left: 75%; }
.tc-axis span:nth-child(5) { left: auto; right: 0; transform: none; }

/* Where your voice should be. Only the first try shows it. */
.tc-flat {
  display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0.32em 0.8em; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--lift-ring);
  font: 700 0.75rem/1.2 var(--sans); color: var(--lift-ink); white-space: nowrap;
}

/* The state the lanes show, named above them, so the picture reads before the button is found. */
.tc-state { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--ink); }

/* The text that came out: a block per stretch of talk, with its first words in it. */
.tc-lane.tc-text { height: 60px; }
.tc-b { position: absolute; top: 5px; bottom: 5px; left: calc(var(--a) * 1% + 1px); width: calc(var(--w) * 1% - 2px); overflow: hidden; padding: 5px 6px; border-radius: 7px; }
.tc-b i { display: block; font: 600 0.6875rem/1.25 var(--sans); font-style: normal; }
.tc-b-them { background: var(--grid); }
.tc-b-them i { color: var(--ink-2); }
.tc-b-you { background: var(--surface); box-shadow: inset 0 0 0 1px #C5CAE0; }
.tc-b-you i { color: var(--ink); }
.tc-b-skip { padding: 0; background: repeating-linear-gradient(135deg, #CDD2E6 0 2px, transparent 2px 7px); }
/* The repeated line. The finished picture has none, so it is hidden unless the figure shows the first try. */
.tc-rep { display: none; background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); }
.tc-rep i { font-weight: 700; color: var(--lift-ink); }
.tc-rep::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px; background: var(--cut); transform-origin: left; transform: scaleX(0); }

/* What the hatching and the orange mean, under the lanes. */
.tc-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.tc-key span { display: inline-flex; align-items: center; gap: 8px; }
.tc-key i { flex: none; width: 22px; height: 12px; border-radius: 3px; }
.tc-key-skip i { background: repeating-linear-gradient(135deg, #C9CEE3 0 2px, var(--paper) 2px 6px); box-shadow: inset 0 0 0 1px var(--rule); }
.tc-key-rep i { background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); }

/* The two results side by side, always both: what the text says at the same minute, and how much of it
   is talk. Indigo is the time that came back; the card the lanes are showing gets the ring. */
.tc-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.tc-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; border-radius: 14px; min-width: 0; transition: box-shadow 0.3s; }
.tc-card-b4 { background: var(--paper); }
.tc-card-af { background: var(--primary-tint); box-shadow: inset 0 0 0 2px var(--primary); }
.tc-cn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.tc-cn b { font: 600 1.75rem/1 var(--mono); }
.tc-card-af .tc-cn b { color: var(--primary-deep); }
.tc-cs { font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.tc-card-af .tc-cs { color: var(--ink); }
.tc-at { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-hint); }
.tc-card-af .tc-at { border-top-color: #CDD5FD; }
.a-body .tc-ln { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.tc-ln li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 8px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink); }
.tc-ln time { font: 500 0.8125rem/1.75 var(--mono); color: var(--ink-hint); }
.tc-ln-rep li { font-weight: 700; color: var(--lift-ink); }

/* Two texts, one hidden. The fixed run is the default. */
.tc-fig .tc-b4 { display: none; }
.is-armed:not(.is-cut) .tc-b4 { display: inline; }
.is-armed:not(.is-cut) .tc-af { display: none; }
.is-armed:not(.is-cut) .tc-key .tc-b4 { display: inline-flex; }

/* The first try: your lane flat and orange, the quiet filled with one line, their side the only text. */
.is-armed:not(.is-cut) .tc-you .tc-bars { opacity: 0; }
.is-armed:not(.is-cut) .tc-you .tc-base { stroke: var(--lift); stroke-width: 2.5; }
.is-armed:not(.is-cut) .tc-flat { display: block; }
.is-armed:not(.is-cut) .tc-skip, .is-armed:not(.is-cut) .tc-b-skip, .is-armed:not(.is-cut) .tc-b-you { display: none; }
.is-armed:not(.is-cut) .tc-rep { display: block; }
.is-armed:not(.is-cut) .tc-card-af { box-shadow: none; }
.is-armed:not(.is-cut) .tc-card-b4 { box-shadow: inset 0 0 0 2px var(--lift); }

/* The fix, played once. */
.is-armed.is-cut .tc-rep { display: block; animation: tc-gone 1.05s var(--ease) both; }
.is-armed.is-cut .tc-rep::after { animation: tc-strike 0.5s var(--ease) 0.1s both; }
.is-armed.is-cut .tc-you .tc-bars { animation: tc-in 0.6s var(--ease) 0.95s both; }
.is-armed.is-cut .tc-b-you { animation: tc-rise 0.5s var(--ease) 1s both; }
.is-armed.is-cut .tc-skip, .is-armed.is-cut .tc-b-skip { animation: tc-in 0.5s var(--ease) 0.9s both; }
.is-armed.is-cut .tc-card-af { animation: tc-ring 0.6s var(--ease) 1.4s both; }
@keyframes tc-gone { 0%, 55% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes tc-strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tc-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tc-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes tc-ring { from { box-shadow: inset 0 0 0 0 var(--primary); } to { box-shadow: inset 0 0 0 2px var(--primary); } }

.tc-cap { margin-top: 12px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- What you will have: the file, through two tools, to the text ----------
   Top to bottom at every width, so each file name has the whole line. */
.tc-flow { margin: 0; padding: clamp(16px, 2.6vw, 22px); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; min-width: 0; }
.tc-fr { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 12px 16px; border-radius: 12px; background: var(--paper); min-width: 0; }
.tc-fr small { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.3; text-transform: uppercase; color: var(--ink-hint); }
.tc-fr b { font: 500 0.9375rem/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.tc-fr-out { background: var(--primary-tint); }
.tc-fr-out b { font-weight: 700; color: var(--primary-deep); }
/* A few lines of the file, drawn as a page: the payoff, from the same example as the set piece. */
.tc-doc { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 8px; padding: 14px 16px; border-radius: 10px; background: var(--surface); font: 400 1.0625rem/1.45 var(--serif); color: var(--ink); }
.tc-doc span { display: block; }
.tc-fx { position: relative; margin-left: 28px; padding: 12px 0 12px 22px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.tc-fx span { margin-right: 8px; font: 700 0.875rem/1.4 var(--mono); color: var(--ink); }
.tc-fx::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 8px;
  background:
    linear-gradient(#AEB5D6, #AEB5D6) 50% 0 / 2px calc(100% - 5px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 2l3 4 3-4' fill='none' stroke='%23AEB5D6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 50% 100% / 8px 8px no-repeat;
}

/* ---------- The fill-in ---------- */
.tc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tc-fields label { display: grid; gap: 7px; min-width: 0; font-size: 0.8125rem; font-weight: 700; color: var(--ink); }
.tc-fields input, .tc-fields select {
  width: 100%; min-width: 0; padding: 0.8em 0.9em; border: 1px solid var(--rule); border-radius: 12px; background-color: var(--paper);
  color: var(--ink); font: 500 0.9375rem/1.4 var(--mono); transition: border-color 0.2s, box-shadow 0.2s;
}
.tc-fields input::placeholder { color: var(--ink-hint); }
.tc-fields select {
  -webkit-appearance: none; appearance: none; padding-right: 2.4em; font-family: var(--sans); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23474E73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95em center; background-size: 12px 8px;
}
.tc-fields input:focus, .tc-fields select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 108, 248, 0.25); }

.tc-models { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.tc-models legend { margin-bottom: 7px; padding: 0; font-size: 0.8125rem; font-weight: 700; color: var(--ink); }
.tc-m {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 12px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; transition: box-shadow 0.2s, background-color 0.2s;
}
.tc-m:hover { box-shadow: inset 0 0 0 1px #B5BAD2; }
.tc-m:has(input:checked) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); }
.tc-m input {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2px #B5BAD2; cursor: pointer; transition: box-shadow 0.2s;
}
.tc-m input:checked { box-shadow: inset 0 0 0 6px var(--primary); }
.tc-m input:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.tc-m span { display: grid; gap: 2px; min-width: 0; }
.tc-m b { font: 600 0.875rem/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.tc-m small { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-hint); }

/* What the reader's own answer looks like, before any command. */
.tc-plan { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.tc-plan div { display: grid; gap: 4px; align-content: start; min-width: 0; }
.tc-plan .tc-plan-wide { grid-column: 1 / -1; }
.tc-plan dt { font-size: var(--t-eyebrow); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-hint); }
.tc-plan dd { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }

/* Error text in the table is quoted, not set as code; the short code left in it stays on one line. */
.a-table code { white-space: nowrap; }
.tc-nojs { font-size: 0.9375rem; line-height: 1.5; color: var(--ink); }

/* ---------- Inside the steps ---------- */
/* Where to listen: the recording as one bar, three marks on it. The times follow the length typed above. */
.tc-tl { margin: 0; padding: 18px 20px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 10px; min-width: 0; }
.tc-tl-bar { position: relative; height: 34px; }
.tc-tl-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; border-radius: 5px; background: var(--grid); box-shadow: inset 0 0 0 1px var(--rule); }
.tc-tl-bar i { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 1%); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.tc-tl-bar i::before { content: ""; position: absolute; left: 50%; top: -4px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--surface); }
.tc-tl-lab { position: relative; height: 1.6rem; font-family: var(--mono); }
.tc-tl-lab b { position: absolute; top: 0; left: calc(var(--p) * 1%); transform: translateX(-50%); font-size: 1.125rem; font-weight: 600; line-height: 1.4; color: var(--ink); white-space: nowrap; }
.tc-tl-lab span { position: absolute; top: 0.25rem; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-hint); }
.tc-tl-0 { left: 0; }
.tc-tl-end { right: 0; }
.tc-tl figcaption { font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.tc-flags { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.tc-flags div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.5; }
.tc-flags dt { min-width: 0; }
.tc-flags dt code { white-space: nowrap; }
.tc-flags dd { margin: 0; min-width: 0; color: var(--ink-2); }

/* What voice detection does: the file, the speech it finds, what whisper then reads. */
.tc-vad { margin: 0; padding: clamp(14px, 2.6vw, 22px); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 10px; min-width: 0; }
.tc-vrow { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
.tc-vad .tc-lane { height: 54px; }
.tc-vmark .tc-bars, .tc-vjoin .tc-bars { stroke: var(--ink-2); }
.tc-seg { position: absolute; top: 3px; bottom: 3px; left: calc(var(--a) * 1% + 2px); width: calc(var(--w) * 1% - 4px); border-radius: 8px; box-shadow: inset 0 0 0 2px var(--ink); }
.tc-vjoin { width: 79%; }
.tc-joint { stroke: #AEB5D6; stroke-width: 2; stroke-dasharray: 3 3; }
.tc-vnote { display: flex; gap: 10px; align-items: baseline; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.tc-vnote i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--lift); transform: translateY(1px); }

/* ---------- Where the two voices come from ---------- */
.tc-src { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.tc-src-p { display: grid; justify-items: center; align-content: start; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); min-width: 0; }
.tc-src-h { justify-self: start; margin-bottom: 12px; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.tc-ins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.tc-in { padding: 8px 8px; border-radius: 10px; background: var(--grid); font-size: 0.8125rem; font-weight: 700; line-height: 1.3; text-align: center; color: var(--ink); }
.tc-in-off { background: var(--lift-tint); box-shadow: inset 0 0 0 1.5px var(--lift); color: var(--lift-ink); }
.tc-wires { display: block; width: 100%; height: 36px; overflow: visible; }
.tc-wires path { fill: none; stroke-width: 2; stroke-linecap: round; }
.tc-wires .w-ok { stroke: var(--ink-2); }
.tc-wires .w-off { stroke: var(--lift); stroke-dasharray: 3 5; }
.tc-rec { padding: 8px 14px; border-radius: 10px; background: var(--night); font-size: 0.875rem; font-weight: 700; line-height: 1.2; color: #fff; }
.tc-down { display: block; width: 2px; height: 14px; background: var(--ink-2); }
.tc-file { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); gap: 6px 8px; align-items: center; width: 100%; padding: 10px; border-radius: 12px; background: var(--paper); }
.tc-fl { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-hint); }
.tc-file .tc-lane { height: 30px; background: var(--surface); }
.tc-file .tc-bars { stroke: var(--ink-2); stroke-width: 1.8; }
.tc-lane-flat .tc-base { stroke: var(--lift); stroke-width: 2.5; }

/* ---------- Phones ----------
   The lanes keep their shape at a smaller size; the repeated words drop out of the blocks, because
   the lines under the lanes say them. The flow and the two panels stack. */
@media (max-width: 640px) {
  .tc-stage { grid-template-columns: 3.1rem minmax(0, 1fr); gap: 7px 10px; }
  .tc-lane { height: 38px; }
  .tc-bars { stroke-width: 1.5; }
  .tc-who { font-size: 0.625rem; letter-spacing: 0.06em; }
  /* Too narrow for words in the lanes, so the text row goes and the two cards below carry the words. */
  .tc-who-text, .tc-lane.tc-text, .is-armed:not(.is-cut) .tc-key .tc-b4 { display: none; }
  .tc-flat { font-size: 0.6875rem; }
  .tc-tl { padding: 16px 14px 14px; }
  .tc-tl-0, .tc-tl-end { display: none; }
  .tc-tl-lab b { font-size: 1rem; }
  .tc-state { font-size: 1rem; }
  .tc-foot { grid-template-columns: minmax(0, 1fr); }
  .tc-cn b { font-size: 1.5rem; }

  .tc-fr { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
  .tc-fx { margin-left: 18px; }

  .tc-fields, .tc-models, .tc-plan { grid-template-columns: minmax(0, 1fr); }
  .tc-spots { font-size: 1.125rem; }
  .tc-flags div { grid-template-columns: minmax(0, 1fr); }

  .tc-vrow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tc-vmark .tc-skip i { display: none; }

  .tc-src { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-again, .tc-m, .tc-m input, .tc-card { transition: none; }
  .is-armed.is-cut .tc-rep { display: none; animation: none; }
  .is-armed.is-cut .tc-rep::after, .is-armed.is-cut .tc-you .tc-bars, .is-armed.is-cut .tc-b-you,
  .is-armed.is-cut .tc-skip, .is-armed.is-cut .tc-b-skip, .is-armed.is-cut .tc-card-af { animation: none; }
}
