/* Voice to Text (/language-tools/voice-to-text/). Site colour tokens only, so light and dark follow the header's theme switch. */
.vt2 { --a1: var(--brand); --a2: var(--brand-2); --ok: #10b981; --bad: #ef4444; }
.vt2-beta { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; padding: 4px 9px; border-radius: 999px; color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); }
.vt2-shell { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }

/* settings row */
.vt2-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; padding: 18px 20px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.vt2-set { display: grid; gap: 6px; }
.vt2-set > small { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vt2-set > small i { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.vt2-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.vt2-chips button { font: inherit; font-size: .9rem; font-weight: 700; display: grid; gap: 1px; text-align: left; padding: 8px 14px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.vt2-chips button em { font-style: normal; font-weight: 500; font-size: .72rem; color: var(--muted); }
.vt2-chips button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--a1) 60%, var(--border)); box-shadow: 0 6px 16px color-mix(in srgb, var(--a1) 14%, transparent); }
.vt2-chips button.active { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 10%, var(--surface)); box-shadow: 0 0 0 3px var(--ring); }
.vt2-chips button.active em { color: var(--brand-ink); }
.vt2-field select, .vt2-field input { font: inherit; font-size: .92rem; min-height: 46px; padding: 9px 12px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
.vt2-field select { min-width: 200px; cursor: pointer; }
.vt2-field select:hover, .vt2-field input:hover { border-color: color-mix(in srgb, var(--a1) 50%, var(--border)); }
.vt2-field select:focus, .vt2-field input:focus { outline: none; border-color: var(--a1); box-shadow: 0 0 0 3px var(--ring); }
.vt2-names-wrap { flex: 1; min-width: 220px; }
.vt2-names-wrap input { width: 100%; }

/* one-time setup card */
.vt2-setup { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px 18px; margin: 18px 20px 0; padding: 16px 18px; border-radius: 18px; position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--a1) 30%, var(--border));
  background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 10%, var(--surface)), color-mix(in srgb, var(--a2) 8%, var(--surface))); transition: border-color .3s ease, background .3s ease; }
.vt2-setup::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, #fff 22%, transparent) 50%, transparent 70%); transform: translateX(-100%); pointer-events: none; }
.vt2-setup[data-state="loading"]::before { animation: vt2-sheen 2.2s ease-in-out infinite; }
@keyframes vt2-sheen { to { transform: translateX(100%); } }
.vt2-setup-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 8px 20px color-mix(in srgb, var(--a1) 30%, transparent); }
.vt2-setup-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.vt2-setup-ic .ok { display: none; }
.vt2-setup[data-state="loading"] .vt2-setup-ic svg:first-child { animation: vt2-bob 1.1s ease-in-out infinite; }
@keyframes vt2-bob { 50% { transform: translateY(3px); } }
.vt2-setup[data-state="cached"] { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.vt2-setup[data-state="cached"] .vt2-setup-ic { background: linear-gradient(135deg, var(--ok), #059669); box-shadow: 0 8px 20px color-mix(in srgb, var(--ok) 28%, transparent); }
.vt2-setup[data-state="cached"] .vt2-setup-ic svg:first-child { display: none; }
.vt2-setup[data-state="cached"] .vt2-setup-ic .ok { display: block; }
.vt2-setup-body { min-width: 0; }
.vt2-setup-body strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--text); }
.vt2-setup-body p { margin: 3px 0 0; font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.vt2-setup-bar { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--a1) 14%, transparent); overflow: hidden; margin-top: 10px; display: none; }
.vt2-setup[data-state="loading"] .vt2-setup-bar { display: block; }
.vt2-setup-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--a1), var(--a2)); transition: width .3s ease; }
.vt2-setup-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--brand-ink); }
.vt2-setup-why li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.vt2-setup-why li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a1) 18%, transparent); }
.vt2-setup[data-state="cached"] .vt2-setup-why { display: none; }
.vt2-link { font: inherit; font-weight: 600; color: var(--brand-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vt2-link:hover { color: var(--bad); }

/* drop stage */
.vt2-drop { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; margin: 18px 20px 0; padding: 26px 28px; border-radius: 20px; cursor: pointer; outline: none;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--a1) 11%, transparent), transparent 55%), radial-gradient(90% 100% at 100% 100%, color-mix(in srgb, var(--a2) 11%, transparent), transparent 60%), var(--surface); transition: transform .2s ease; }
.vt2-drop::after { content: ""; position: absolute; inset: 0; border: 2px dashed color-mix(in srgb, var(--a1) 32%, var(--border)); border-radius: 20px; pointer-events: none; transition: border-color .2s ease, inset .2s ease; }
.vt2-drop:hover::after, .vt2-drop:focus-visible::after, .vt2-drop.drag::after { border-color: var(--a1); inset: -3px; }
.vt2-drop.drag { transform: scale(1.01); }
.vt2-orb { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.vt2-orb svg { position: relative; z-index: 1; width: 64px; height: 64px; padding: 16px; border-radius: 50%; color: #fff; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 10px 26px color-mix(in srgb, var(--a1) 35%, transparent); transition: transform .2s ease; }
.vt2-ring { position: absolute; inset: 10px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--a1) 45%, transparent); animation: vt2-ring 2.6s ease-out infinite; }
.vt2-ring.r2 { animation-delay: -1.3s; }
@keyframes vt2-ring { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.vt2-drop:hover .vt2-orb svg, .vt2-drop.drag .vt2-orb svg { transform: scale(1.06); }
.vt2-drop:hover .vt2-ring, .vt2-drop.drag .vt2-ring { animation-duration: 1.3s; }
.vt2-drop-text { display: grid; gap: 6px; min-width: 0; }
.vt2-drop-text strong { font-family: var(--font-head); font-size: 1.3rem; color: var(--text); }
.vt2-drop-text > span { color: var(--text-2); font-size: .92rem; }
.vt2-script { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.vt2-script b { font-weight: 600; font-size: .82rem; padding: 4px 10px; border-radius: 999px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.vt2-drop:hover .vt2-script b { color: var(--brand-ink); border-color: color-mix(in srgb, var(--a1) 30%, var(--border)); }
.vt2-drop:hover .vt2-script b:nth-child(odd) { transform: translateY(-2px); }
.vt2-drop-actions { display: grid; gap: 8px; justify-items: stretch; }
.vt2-go, .vt2-rec { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border-radius: 14px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, border-color .15s ease, color .15s ease; }
.vt2-go { border: 0; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--a1) 32%, transparent); }
.vt2-go:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 28px color-mix(in srgb, var(--a1) 40%, transparent); }
.vt2-rec { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.vt2-rec i { width: 11px; height: 11px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.vt2-rec:hover { border-color: var(--bad); color: var(--bad); }
.vt2-rec.on { border-color: var(--bad); color: #fff; background: var(--bad); }
.vt2-rec.on i { background: #fff; border-radius: 2px; animation: vt2-pulse 1s ease-in-out infinite; }
@keyframes vt2-pulse { 50% { opacity: .35; } }
.vt2-status { margin: 10px 22px 0; font-size: .88rem; color: var(--bad); min-height: 0; }
.vt2-status:empty { display: none; }

/* result cards */
.vt2-results { display: grid; gap: 16px; padding: 18px 20px 22px; }
.vt2-results:empty { padding: 10px 0 0; }
.vt2-card { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; animation: vt2-in .35s ease both; }
@keyframes vt2-in { from { opacity: 0; transform: translateY(8px); } }
.vt2-card:hover { border-color: color-mix(in srgb, var(--a1) 35%, var(--border)); box-shadow: 0 16px 36px color-mix(in srgb, var(--a1) 10%, transparent), var(--shadow); }
.vt2-card[data-state="done"] { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.vt2-card[data-state="error"] { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.vt2-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.vt2-file { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vt2-file > div { display: grid; min-width: 0; }
.vt2-file strong { color: var(--text); font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt2-sub { color: var(--muted); font-size: .8rem; }
.vt2-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--brand-ink); background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 16%, var(--surface)), color-mix(in srgb, var(--a2) 16%, var(--surface))); }
.vt2-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vt2-card[data-state="working"] .vt2-ic, .vt2-card[data-state="reading"] .vt2-ic, .vt2-card[data-state="setup"] .vt2-ic { animation: vt2-pulse 1.4s ease-in-out infinite; }
.vt2-badge { flex: none; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border); }
.vt2-card[data-state="working"] .vt2-badge, .vt2-card[data-state="reading"] .vt2-badge, .vt2-card[data-state="setup"] .vt2-badge { color: var(--brand-ink); border-color: color-mix(in srgb, var(--a1) 35%, var(--border)); background: color-mix(in srgb, var(--a1) 9%, var(--surface)); }
.vt2-card[data-state="done"] .vt2-badge { color: #047857; border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
:root[data-theme="dark"] .vt2-card[data-state="done"] .vt2-badge { color: #6ee7b7; }
.vt2-card[data-state="error"] .vt2-badge { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.vt2-prog { height: 4px; margin: 0 16px; border-radius: 999px; background: color-mix(in srgb, var(--a1) 12%, transparent); overflow: hidden; }
.vt2-prog i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--a1), var(--a2)); transition: width .3s ease; }
.vt2-card[data-state="done"] .vt2-prog { opacity: 0; height: 0; margin-top: -4px; transition: opacity .3s ease; }

.vt2-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px 0; }
.vt2-pane { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; min-width: 0; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-2); transition: border-color .2s ease, box-shadow .2s ease; }
.vt2-pane:focus-within { border-color: var(--a1); box-shadow: 0 0 0 3px var(--ring); }
.vt2-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vt2-pane-head h3 { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.vt2-lang { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--brand-ink); }
.vt2-copy { font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease; }
.vt2-copy:hover { border-color: var(--a1); color: var(--brand-ink); transform: translateY(-1px); }
.vt2-copy.ok { border-color: var(--ok); background: var(--ok); color: #fff; }
.vt2-text { width: 100%; min-height: 170px; resize: vertical; font: inherit; font-size: 1rem; line-height: 1.65; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: var(--surface); color: var(--text); outline: none; }
.vt2-orig { font-size: 1.04rem; }
.vt2-en-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vt2-en-actions:has(> .vt2-btn:not([hidden])) .vt2-en-note:empty, .vt2-en-note:empty { display: none; }
.vt2-en-note { font-size: .8rem; color: var(--text-2); }
.vt2-btn { font: inherit; font-size: .85rem; font-weight: 700; padding: 8px 14px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--a1) 35%, var(--border)); background: var(--surface); color: var(--brand-ink); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease; }
.vt2-btn:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px color-mix(in srgb, var(--a1) 28%, transparent); }
.vt2-btn:disabled { opacity: .55; cursor: wait; }
.vt2-btn[hidden] { display: none; }

/* what to do next: highlighted */
.vt2-next { margin: 14px 16px 0; padding: 14px 16px; border-radius: 16px; position: relative;
  background: linear-gradient(120deg, color-mix(in srgb, #f59e0b 12%, var(--surface)), color-mix(in srgb, var(--a1) 8%, var(--surface)));
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, #f59e0b 10%, transparent); animation: vt2-glow 2.4s ease-in-out 2; }
@keyframes vt2-glow { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, #f59e0b 18%, transparent); } }
.vt2-tip { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: .88rem; color: var(--text-2); background: var(--surface); border: 1px solid color-mix(in srgb, var(--a1) 35%, var(--border)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.vt2-tip[hidden] { display: none; }
.vt2-tip b { color: var(--text); }
.vt2-next h4 { margin: 0 0 8px; font-family: var(--font-head); font-size: 1rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.vt2-next h4::before { content: "!"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 900; color: #fff; background: #f59e0b; }
.vt2-next ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 5px; font-size: .9rem; color: var(--text-2); }
.vt2-next ol b { color: var(--text); }
.vt2-out-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vt2-segs { margin: 12px 0 0; }
.vt2-segs summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--brand-ink); padding: 4px 0; }
.vt2-segs ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.vt2-segs li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 10px; font-size: .92rem; color: var(--text); transition: background .15s ease; }
.vt2-segs li:hover { background: color-mix(in srgb, var(--a1) 7%, var(--surface)); }
.vt2-t { font: inherit; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--brand-ink); cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.vt2-t:hover { border-color: var(--a1); background: var(--a1); color: #fff; }
.vt2-card > :last-child { margin-bottom: 16px; }

/* steps */
.vt2-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.vt2-steps > div { padding: 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.vt2-steps > div:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--a1) 40%, var(--border)); box-shadow: 0 14px 30px color-mix(in srgb, var(--a1) 10%, transparent); }
.vt2-steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.vt2-steps h3 { margin: 10px 0 4px; font-size: 1.02rem; }
.vt2-steps p { margin: 0; font-size: .9rem; color: var(--text-2); }

@media (max-width: 860px) {
  .vt2-setup { grid-template-columns: auto minmax(0, 1fr); }
  .vt2-setup-why { grid-column: 1 / -1; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 14px; }
  .vt2-drop { grid-template-columns: auto minmax(0, 1fr); }
  .vt2-drop-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .vt2-panes { grid-template-columns: 1fr; }
  .vt2-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .vt2-top, .vt2-results { padding-left: 14px; padding-right: 14px; }
  .vt2-setup, .vt2-drop { margin-left: 14px; margin-right: 14px; }
  .vt2-drop { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 16px; }
  .vt2-script { justify-content: center; }
  .vt2-setup-why { grid-template-columns: 1fr; }
  .vt2-field select { min-width: 0; width: 100%; } .vt2-field { flex: 1 1 100%; }
  .vt2-top > .vt2-set:first-child { flex: 1 1 100%; } .vt2-chips { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .vt2-ring, .vt2-setup::before, .vt2-next, .vt2-card { animation: none !important; } }
