/* Shared styles for the text tools, part C (source: builder/lib/txc.css). */
.ev-hint{margin-bottom:0;font-size:.88rem;color:var(--text-muted)}
.ev-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ev-stat{font-variant-numeric:tabular-nums}
.tx-center{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center}
.tx-big{min-width:150px;min-height:50px;font-size:1.08rem}
.linkish{padding:0;border:0;background:none;color:var(--brand-ink);font:inherit;text-decoration:underline;cursor:pointer}
/* text to speech */
.ts-opts{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.ts-opts output{float:right;font-weight:700;color:var(--brand-ink)}
.ts-now{padding:14px 16px;border:1px solid var(--brand-line);border-radius:var(--radius);background:var(--brand-soft)}
.ts-now[hidden]{display:none}
.ts-prog{display:block;font-size:.8rem;font-weight:700;color:var(--brand-ink);margin-bottom:4px}
.ts-now p{margin:0;font-size:1.15rem;line-height:1.6}
.ts-now mark{padding:0 2px;border-radius:4px;background:#FFE08A;color:#1D2433}
/* speech to text */
.st-opts{grid-template-columns:minmax(200px,1fr) minmax(0,1.4fr);align-items:end}
.st-checks{display:flex;flex-wrap:wrap;gap:8px}
.st-mic{display:grid;justify-items:center;gap:8px;text-align:center}
.st-btn{display:inline-flex;align-items:center;gap:10px;padding:14px 26px;border:0;border-radius:999px;background:var(--brand);color:#fff;font:inherit;font-size:1.1rem;font-weight:700;cursor:pointer;box-shadow:var(--shadow-md)}
.st-btn svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.st-btn.is-on{background:#DC2626;animation:stpulse 1.4s infinite}
@keyframes stpulse{50%{box-shadow:0 0 0 12px rgba(220,38,38,.16)}}
@media (prefers-reduced-motion:reduce){.st-btn.is-on{animation:none}}
.st-status{margin:0;color:var(--text-muted);font-weight:600}
.st-interim{min-height:1.5em;margin:0;color:var(--text-faint);font-style:italic}
/* notepad */
.np-wrap{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px;align-items:stretch}
.np-side{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;min-width:0;max-height:640px}
.np-sidehead{display:flex;justify-content:space-between;align-items:center;gap:8px}
.np-list{list-style:none;margin:0;padding:0;display:grid;gap:4px;align-content:start;overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:4px;background:var(--surface-2)}
.np-list li{margin:0}
.np-item{display:grid;gap:2px;width:100%;padding:8px 10px;border:0;border-radius:9px;background:transparent;text-align:left;font:inherit;color:var(--text);cursor:pointer;min-width:0}
.np-item b{font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-item span{font-size:.76rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-item:hover{background:var(--surface)}
.np-item.is-cur{background:var(--surface);box-shadow:inset 3px 0 0 var(--brand)}
.np-none{padding:10px;color:var(--text-muted);font-size:.88rem}
.np-sidefoot{display:flex;flex-wrap:wrap;gap:6px}
.np-main{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:8px;min-width:0}
.np-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}
.np-saved{font-size:.85rem;font-weight:600;color:var(--text-muted)}
.np-tools{display:flex;flex-wrap:wrap;gap:4px}
.np-tools [aria-pressed="true"]{background:var(--brand-soft);color:var(--brand-ink)}
.np-text{width:100%;min-height:440px;padding:16px 18px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);color:var(--text);font:inherit;line-height:1.6;resize:vertical;overflow-wrap:anywhere}
.np-text.is-mono{font-family:var(--mono)}
.np-foot{font-size:.85rem;color:var(--text-muted)}
@media (max-width:760px){.np-wrap{grid-template-columns:1fr}.np-side{max-height:none;grid-template-rows:auto auto auto auto}.np-list{max-height:200px}.np-text{min-height:320px}}
/* invisible text */
.iv-opts{grid-template-columns:minmax(0,2fr) minmax(110px,1fr)}
.iv-show{position:relative;overflow:hidden;display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2)}
.iv-prev{display:flex;justify-content:center;align-items:center;min-height:80px;font-size:2.6rem;line-height:1.25;overflow:hidden}
.iv-br{color:var(--text-faint);font-weight:300}
.iv-x{display:inline-block;min-width:2px;min-height:1.25em;max-width:100%;background:var(--brand-soft);outline:1px dashed var(--brand);white-space:pre-wrap;overflow-wrap:anywhere}
.iv-desc{margin:0;text-align:center;color:var(--text-muted);font-size:.94rem;max-width:62ch;justify-self:center}
.iv-desc b{color:var(--text)}
.iv-total{text-align:center;margin:0}
.iv-manual{max-width:420px;width:100%;justify-self:center;margin:0}
.iv-manual label{font-size:.82rem;font-weight:600;color:var(--text-muted);text-align:center}
.iv-manual input{text-align:center;background:var(--surface)}
.iv-probe{position:absolute;left:0;top:0;visibility:hidden;white-space:pre;font-size:40px;pointer-events:none}
.iv-codes summary{cursor:pointer;font-weight:700}
.iv-codes .kv-table{margin-top:8px}
.iv-code{display:flex;justify-content:space-between;align-items:center;gap:8px}
.iv-code code{font-family:var(--mono);overflow-wrap:anywhere}
.iv-h{margin:4px 0 0;font-size:1.05rem}
.iv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.iv-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"head btn" "mini btn";gap:2px 10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.iv-card-head{grid-area:head;display:grid;min-width:0}
.iv-card-head b{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv-card-head span{font-size:.75rem;color:var(--text-muted)}
.iv-mini{grid-area:mini;font-size:1.2rem;line-height:1.3;color:var(--text-faint);white-space:nowrap;overflow:hidden}
.iv-mini span{background:var(--brand-soft);outline:1px dashed var(--brand-line);white-space:pre}
.iv-card .btn{grid-area:btn}
.iv-checkcol{align-self:end}
.iv-checks{display:flex;flex-wrap:wrap;gap:6px 18px}
.iv-sum{margin:0;font-weight:600}
.iv-sum:empty{display:none}
.iv-tight{gap:6px}
.iv-legend{margin:0;font-size:.85rem;color:var(--text-muted)}
.iv-reveal{max-height:340px;overflow:auto;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}
.iv-more{color:var(--text-muted);font-style:italic}
.iv-chip{display:inline-block;margin:0 1px;padding:0 4px;border-radius:4px;font:700 .68rem/1.5 var(--mono);vertical-align:1px;white-space:nowrap}
.iv-chip.is-remove{background:#FDE68A;color:#78350F}
.iv-chip.is-space,.iv-chip.is-brk{background:#E0E7FF;color:#3730A3}
.iv-chip.is-keep{background:var(--surface-3);color:var(--text-muted)}
html[data-theme="dark"] .iv-chip.is-remove{background:#78350F;color:#FDE68A}
html[data-theme="dark"] .iv-chip.is-space,html[data-theme="dark"] .iv-chip.is-brk{background:#312E81;color:#E0E7FF}
.iv-found td{white-space:nowrap}
@media (max-width:560px){.iv-opts{grid-template-columns:1fr}.iv-prev{font-size:2rem;min-height:64px}}
/* social media character counter */
.sm-stats{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.92rem;color:var(--text-muted)}
.sm-stat b{color:var(--text);font-size:1.02rem}
.sm-chips .chip{cursor:pointer}
.sm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px;align-items:start}
.sm-card{display:grid;gap:12px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.sm-name{margin:0;font-size:1rem}
.sm-row{display:grid;gap:5px}
.sm-row-head,.sm-row-foot{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.sm-field{font-weight:600;font-size:.92rem}
.sm-num{font-variant-numeric:tabular-nums;font-weight:700;font-size:.92rem;white-space:nowrap}
.sm-bar{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.sm-bar span{display:block;height:100%;width:0;border-radius:inherit;background:var(--brand);transition:width .15s}
.sm-row.is-near .sm-bar span{background:#D97706}
.sm-row.is-over .sm-bar span{background:#DC2626}
.sm-row-foot{font-size:.8rem;color:var(--text-muted)}
.sm-left{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.sm-row.is-over .sm-left,.sm-row.is-over .sm-num{color:#DC2626}
.sm-row.is-near .sm-left{color:#B45309}
.sm-note{text-align:right}
.sm-smsfix{margin-top:4px}
.sm-cutinfo{margin:0;color:var(--text-muted);font-size:.92rem}
.sm-cutinfo:empty{display:none}
.sm-preview{max-height:300px;overflow:auto;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.sm-over{background:#FECACA;color:#7F1D1D;border-radius:3px}
.sm-fold{display:inline-block;margin:0 4px;padding:0 6px;border-radius:99px;background:var(--brand-soft);color:var(--brand-ink);font-size:.75rem;font-weight:700;vertical-align:1px;white-space:nowrap}
html[data-theme="dark"] .sm-over{background:#7F1D1D;color:#FECACA}
html[data-theme="dark"] .sm-row.is-over .sm-left,html[data-theme="dark"] .sm-row.is-over .sm-num{color:#F87171}
html[data-theme="dark"] .sm-row.is-near .sm-left{color:#FBBF24}
@media (max-width:560px){.sm-grid{grid-template-columns:1fr}}
