/* Cut page: Edit by text. Builds on workbench.css and the site tokens. */

.te-side { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #343539; }
.te-side h2, .te-side-h { font: 900 24px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin: 0; color: #f2efe7; }
.te-side p { margin: 0; }
.stage.audio-only #source { display: none; }
.stage.audio-only #caption-canvas { max-height: 200px; } /* black with captions: an audiogram, if you export one */

.te { margin-top: 18px; display: grid; gap: 12px; min-width: 0; }
.te[hidden] { display: none !important; }
.te-bar, .te-export, .te-review-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.te-sp { flex: 1; }
.te-bar .btn-ghost, .te-export .btn-ghost, .te-export .btn-accent, .te-review-head button { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.te-play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.te-play svg { width: 16px; height: 16px; fill: currentColor; }
#te-time { font: 600 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d0d0c9; font-variant-numeric: tabular-nums; }

.te-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.te-tool { position: relative; display: grid; gap: 2px; text-align: left; padding: 10px 44px 10px 12px; border-radius: 12px; border: 1px solid #343539; background: #18191b; color: #eee; cursor: pointer; min-height: 58px; }
.te-tool:hover { border-color: #55565a; }
.te-tool strong { font-size: 14px; font-weight: 700; }
.te-tool span { font-size: 12px; color: #a6a6a6; }
.te-tool output { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: #27272b; color: #ddd; font: 700 13px/26px var(--ui); text-align: center; }
.te-tool.has output { background: var(--accent); color: var(--accent-ink); }
.te-tool[aria-expanded="true"] { border-color: var(--accent); }
.te-tool select { width: auto !important; padding: 2px 4px !important; font-size: 12px !important; border-radius: 6px !important; display: inline; }

.te-review { border: 1px solid var(--accent); border-radius: 14px; padding: 12px; background: #17150f; display: grid; gap: 8px; }
.te-review-head strong { font-size: 15px; }
.te-review p { margin: 0; font-size: 12.5px; color: #b8b6ae; }
.te-review ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.te-review li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 9px; background: #1d1d20; font-size: 13px; }
.te-review li input { accent-color: var(--accent); width: 18px; height: 18px; }
.te-review li time { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: #a6a6a6; }
.te-review li .ctx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b8b6ae; }
.te-review li .ctx b { color: #fff; background: rgba(255, 191, 47, 0.2); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.te-review li .flag { font-size: 11.5px; color: #ffb3c0; }
.te-review li button { border: 0; background: #27272b; color: #eee; border-radius: 8px; width: 34px; height: 30px; cursor: pointer; min-height: 0 !important; display: grid; place-items: center; }
.te-review li button svg { width: 12px; height: 12px; fill: currentColor; }

.te-summary { margin: 0; color: #d0d0c9; font-size: 13.5px; min-height: 18px; }
.te-words { max-height: 46vh; overflow: auto; padding: 14px 16px; border-radius: 14px; background: #0f1012; border: 1px solid #2b2c30; font-size: 17px; line-height: 1.75; color: #ecebe6; outline: none; overflow-wrap: anywhere; }
.te-words:focus-visible { border-color: var(--accent); }
.te-words p { margin: 0 0 12px; }
.te-words .w { border-radius: 4px; cursor: pointer; padding: 1px 0; }
.te-words .w:hover { background: rgba(255, 255, 255, 0.07); }
.te-words .w.filler { text-decoration: underline dotted rgba(255, 191, 47, 0.8); text-underline-offset: 4px; }
.te-words .w.low { text-decoration: underline dashed rgba(255, 255, 255, 0.35); text-underline-offset: 4px; }
.te-words .w.struck { text-decoration: line-through; text-decoration-color: #ff4f6d; color: #6c6c73; }
.te-words .w.sel { background: rgba(255, 191, 47, 0.28); }
.te-words .w.now { background: var(--accent); color: var(--accent-ink); }
.te-words .w.struck.now { background: transparent; color: #6c6c73; }
.te-words .gap { display: inline-block; margin: 0 4px; padding: 0 6px; border-radius: 6px; font: 600 11px/18px ui-monospace, SFMono-Regular, Menlo, monospace; color: #9b9ba2; background: #1d1d20; vertical-align: 2px; cursor: default; }
.te-words .gap.capped { color: var(--accent); }
.te-words .gap.sound { color: #ffb3c0; }
.te-hint { margin: 0; font-size: 12.5px; color: #9b9ba2; }
.te-burn { gap: 10px !important; align-items: center; font-size: 13px; color: #c7c7c7; }
.te-burn input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

@media (max-width: 800px) {
  .te-tools { grid-template-columns: 1fr; }
  .te-words { font-size: 16px; max-height: 60vh; }
  .te-bar .btn-ghost { flex: 1 1 auto; }
  .te-export > * { flex: 1 1 40%; }
}
