/* TRW Free Speech to Text Transcriber. Every selector is scoped to .trw-stt. */
.trw-stt {
	--s-ink: #17302a; --s-muted: #50655e; --s-green: #0b7a52; --s-green-deep: #075a3c; --s-gold: #f2b52c;
	--s-wash: #edf5f0; --s-line: #cddcd4; --s-warn: #fff5d9;
	--s-font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
	font-family: var(--s-font); color: var(--s-ink); font-size: 16px; line-height: 1.5; max-width: 820px; margin: 0 auto 2.5em; text-align: left;
}
.trw-stt *, .trw-stt *::before, .trw-stt *::after { box-sizing: border-box; }
.trw-stt [hidden] { display: none !important; }
.trw-stt p { margin: 0; }
.trw-stt .trw-stt-title { font-family: var(--s-font); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; color: var(--s-ink); margin: 0 0 6px; padding: 0; }
.trw-stt .trw-stt-lede { color: var(--s-muted); font-size: 1.05rem; margin-bottom: 12px; }
.trw-stt .trw-stt-privacy { display: inline-flex; align-items: center; gap: 8px; background: var(--s-wash); color: var(--s-green-deep); border-radius: 999px; padding: 7px 14px 7px 12px; font-weight: 700; font-size: 0.9rem; line-height: 1.35; }
.trw-stt .trw-stt-privacy svg { flex: none; }
.trw-stt .trw-stt-card { background: #fff; border: 1px solid var(--s-line); border-radius: 18px; padding: 16px; margin-top: 14px; }
@media (min-width: 700px) { .trw-stt .trw-stt-card { padding: 20px 24px; } }
.trw-stt .trw-stt-h { font-family: var(--s-font); font-size: 1.15rem; font-weight: 800; color: var(--s-ink); margin: 0 0 10px; padding: 0; }
.trw-stt .trw-stt-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.trw-stt .trw-stt-btn, .trw-stt button.trw-stt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; margin: 0; width: auto;
	border: 2px solid transparent; border-radius: 12px; font-family: var(--s-font); font-size: 1rem; font-weight: 700; line-height: 1.2;
	text-transform: none; letter-spacing: 0; text-decoration: none; text-shadow: none; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.trw-stt button.trw-stt-btn--primary { background: var(--s-green); color: #fff; }
.trw-stt button.trw-stt-btn--primary:hover { background: var(--s-green-deep); color: #fff; }
.trw-stt button.trw-stt-btn--secondary { background: #fff; color: var(--s-green-deep); border-color: var(--s-green); }
.trw-stt button.trw-stt-btn--ghost { background: transparent; color: var(--s-muted); border-color: var(--s-line); }
.trw-stt button.trw-stt-btn--big { min-height: 64px; padding: 14px 20px; font-size: 1.12rem; width: 100%; }
.trw-stt button.trw-stt-btn--wide { width: 100%; min-height: 56px; font-size: 1.1rem; margin-top: 14px; }
.trw-stt button.trw-stt-btn:disabled { opacity: .45; cursor: not-allowed; }
.trw-stt button:focus-visible, .trw-stt textarea:focus-visible, .trw-stt select:focus-visible, .trw-stt input:focus-visible { outline: 3px solid var(--s-gold); outline-offset: 2px; }
.trw-stt .trw-stt-help { color: var(--s-muted); font-size: 0.88rem; margin-top: 8px; }
.trw-stt .trw-stt-msg { margin-top: 10px; font-size: 0.95rem; }
.trw-stt .trw-stt-msg:empty { display: none; }
.trw-stt .trw-stt-msg.is-error { background: #fde8e6; color: #7a1712; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.trw-stt .trw-stt-msg.is-warn { background: var(--s-warn); color: #5a4300; padding: 10px 14px; border-radius: 10px; }
.trw-stt .trw-stt-msg.is-ok, .trw-stt .trw-stt-msg.is-info { color: var(--s-green-deep); font-weight: 600; }
.trw-stt dl.trw-stt-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0 0 12px; font-size: 0.95rem; }
.trw-stt dl.trw-stt-info dt { font-weight: 700; color: var(--s-muted); }
.trw-stt dl.trw-stt-info dd { margin: 0; overflow-wrap: anywhere; }
.trw-stt audio.trw-stt-player { display: block; width: 100%; margin: 0 0 12px; }
.trw-stt .trw-stt-settings { display: grid; gap: 6px; }
.trw-stt .trw-stt-label { font-weight: 700; margin: 6px 0 0; }
.trw-stt select.trw-stt-input { display: block; width: 100%; min-height: 48px; margin: 0; padding: 8px 12px; border: 2px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-ink); font: inherit; font-size: 16px; }
.trw-stt label.trw-stt-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0 0; cursor: pointer; }
.trw-stt label.trw-stt-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--s-green); }
.trw-stt .trw-stt-consent { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--s-warn); color: #4a3700; }
.trw-stt .trw-stt-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.trw-stt .trw-stt-row > * { flex: 1 1 150px; }
.trw-stt .trw-stt-progress { margin-top: 14px; }
.trw-stt .trw-stt-stage { margin-bottom: 6px; }
.trw-stt .trw-stt-progress progress { display: block; width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: hidden; background: #e2ebe6; accent-color: var(--s-green); -webkit-appearance: none; appearance: none; }
.trw-stt .trw-stt-progress progress::-webkit-progress-bar { background: #e2ebe6; }
.trw-stt .trw-stt-progress progress::-webkit-progress-value { background: var(--s-green); }
.trw-stt .trw-stt-progress .trw-stt-btn { margin-top: 12px; }
.trw-stt textarea.trw-stt-text { display: block; width: 100%; min-height: 240px; margin: 8px 0 0; padding: 12px; border: 2px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-ink); font: 16px/1.6 var(--s-font); resize: vertical; box-shadow: none; }
.trw-stt textarea.trw-stt-text:focus { border-color: var(--s-green); outline: none; }
.trw-stt .trw-stt-reset { width: 100%; margin-top: 14px; }

/* v0.2: microphone recording */
.trw-stt .trw-stt-choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .trw-stt .trw-stt-choices { grid-template-columns: 1fr 1fr; } }
.trw-stt .trw-stt-btn svg { flex: none; }
.trw-stt .trw-stt-recorder { margin-top: 14px; padding: 14px; border: 2px solid var(--s-line); border-radius: 14px; background: #fbfdfc; }
.trw-stt .trw-stt-rec-status { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.trw-stt .trw-stt-rec-dot { width: 16px; height: 16px; border-radius: 50%; background: #9aa9a3; flex: none; }
.trw-stt [data-rec="recording"] .trw-stt-rec-dot { background: #d32f2f; animation: trw-stt-pulse 1.1s ease-in-out infinite; }
.trw-stt [data-rec="paused"] .trw-stt-rec-dot { background: #e0a800; }
@keyframes trw-stt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.trw-stt .trw-stt-rec-time { margin-left: auto; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--s-ink); }
.trw-stt [data-rec="recording"] .trw-stt-rec-time { color: #b71c1c; }
.trw-stt .trw-stt-meter { height: 10px; margin-top: 10px; border-radius: 999px; background: #e2ebe6; overflow: hidden; }
.trw-stt .trw-stt-meter span { display: block; height: 100%; width: 0; background: var(--s-green); transition: width .08s linear; }
.trw-stt button.trw-stt-btn--rec { background: #c62828; color: #fff; }
.trw-stt button.trw-stt-btn--rec:hover { background: #a31f1f; color: #fff; }
.trw-stt .trw-stt-rec-controls button { min-height: 52px; }
@media (prefers-reduced-motion: reduce) { .trw-stt [data-rec="recording"] .trw-stt-rec-dot { animation: none; } }
