/* Approved v3 tool surfaces. Opt-in only; no API, node coordinates or canvas transforms. */
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video){
 --tx-page:var(--txv-page);--tx-surface:var(--txv-surface);--tx-soft:var(--txv-soft);--tx-ink:var(--txv-ink);--tx-muted:var(--txv-muted);--tx-line:var(--txv-line);--tx-line-strong:var(--txv-line);--tx-jade:var(--txv-accent);--tx-jade-strong:var(--txv-accent);--tx-gold:var(--txv-warning);--tx-danger:var(--txv-danger);
 --page:var(--txv-page);--bg:var(--txv-page);--paper:var(--txv-page);--surface:var(--txv-surface);--panel:var(--txv-surface);--panel-solid:var(--txv-surface);--soft:var(--txv-soft);--panel-soft:var(--txv-soft);--surface-soft:var(--txv-soft);--ink:var(--txv-ink);--muted:var(--txv-muted);--line:var(--txv-line);--line-strong:var(--txv-line);--teal:var(--txv-accent);--blue:var(--txv-accent);--green:var(--txv-accent);--gold:var(--txv-warning);--red:var(--txv-danger);--teal-soft:var(--txv-accent-soft);--blue-soft:var(--txv-accent-soft);--green-soft:var(--txv-accent-soft);--shadow:none;
 background:var(--txv-page)!important;color:var(--txv-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei UI",sans-serif;font-size:14px;line-height:1.65;
}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.page-shell,.app-shell,.shell){width:min(1380px,calc(100% - 64px))!important;max-width:1380px!important;margin-inline:auto;padding:30px 0 50px!important;min-width:0}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(p,li,dt,dd,label){font-size:13px!important;line-height:1.75!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) small{font-size:11px!important;line-height:1.55!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(h1,h2,h3){font-weight:600!important;letter-spacing:-.025em!important;color:var(--txv-ink)}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) h1{font-size:30px!important;line-height:1.25!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) h2{font-size:19px!important;line-height:1.4!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) h3{font-size:16px!important;line-height:1.5!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(button,.button,.back-link,.download-button){font-family:inherit!important;font-size:12px!important;font-weight:550!important;line-height:1.5!important;border-radius:8px!important;min-height:38px!important;box-shadow:none!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select){min-width:0!important;width:100%;height:38px!important;min-height:38px!important;padding:8px 11px!important;border:1px solid var(--txv-line)!important;border-radius:8px!important;background:var(--txv-surface)!important;color:var(--txv-ink)!important;font-size:13px!important;box-shadow:none!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) textarea{width:100%;min-width:0!important;padding:14px!important;border:1px solid var(--txv-line)!important;border-radius:9px!important;background:var(--txv-surface)!important;color:var(--txv-ink)!important;font-family:inherit!important;font-size:13px!important;line-height:1.85!important;resize:vertical;box-shadow:none!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(input,textarea)::placeholder{color:var(--txv-muted);opacity:.85}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(input[type="checkbox"],input[type="radio"]){accent-color:var(--txv-accent)}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(button,input,textarea,select,a):focus-visible{outline:2px solid var(--txv-accent);outline-offset:3px}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) button:disabled{opacity:.5;cursor:not-allowed}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.input-panel,.control-panel,.preview-panel,.result-panel,.history-section,.mixer,.form-panel,.side-panel){border:1px solid var(--txv-line)!important;border-radius:16px!important;background:var(--txv-surface)!important;box-shadow:none!important;backdrop-filter:none!important;min-width:0}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.input-panel,.control-panel,.preview-panel,.history-section,.form-panel,.side-panel){padding:24px!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.workspace,.grid){gap:22px!important;padding-block:0!important;align-items:start;min-width:0}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .workspace>*{min-width:0!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .intro-band{padding:0 0 26px!important;gap:24px;align-items:start}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.intro-band p,.boundary-note,.status){color:var(--txv-muted)}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.kicker,.eyebrow,.ai-kicker,.value-kicker,.panel-heading>div>span){color:var(--txv-accent)!important;font-size:10px!important;font-weight:600!important;letter-spacing:.12em!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.method-points span,.status-points span,.coin-chip,.pill){border-color:var(--txv-line)!important;border-radius:6px!important;background:var(--txv-soft)!important;color:var(--txv-muted)!important;font-size:11px!important;padding:5px 9px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) .coin-chip b{color:var(--txv-accent)!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .panel-heading{gap:12px!important;margin-bottom:20px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) .form-grid{gap:16px}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.field,.content-field,.prompt-field){min-width:0;gap:7px}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.content-field textarea,.prompt-field textarea){min-height:240px!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .outline-field textarea{min-height:120px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.consent,.consent-row,.boundary-note){border-color:var(--txv-line)!important;border-radius:9px!important;background:var(--txv-soft)!important;color:var(--txv-muted)!important;padding:12px 14px}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.submit-row button,.button-ai,.button-primary,.button-dark,.primary,.download-button){color:var(--txv-surface)!important;background:var(--txv-accent)!important;border:1px solid var(--txv-accent)!important;padding:9px 15px!important;min-height:38px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) .submit-row{align-items:center;gap:14px;margin-top:20px}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .history-section{margin-top:26px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.history-card,.history-item,.reference-card,.report-block,.judge-card,.ai-result-list article){border-color:var(--txv-line)!important;border-radius:11px!important;background:var(--txv-surface)!important;box-shadow:none!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.history-card p,.history-item small,.reference-copy small){color:var(--txv-muted)!important}
/* Writing and evidence: naturally scrolling reports, one understated accent. */
html.tx-ui-v3 body:is(.tx-tool-viral,.tx-tool-script,.tx-tool-plot) .result-panel{position:static!important;max-height:none!important;overflow:visible!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .result-head{min-height:0!important;gap:20px!important;padding:24px!important;grid-template-columns:80px minmax(0,1fr)!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.score-box,.seal-box){width:80px!important;height:80px!important;border:0!important;border-radius:12px!important;background:var(--txv-soft)!important;color:var(--txv-ink)!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.score-box strong,.seal-box strong){font-family:inherit!important;font-size:34px!important;font-weight:550!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .result-body{padding:8px 24px 24px!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .empty-state{min-height:260px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.score-track i,.review-progress-track i,.dimension-meter i,.prob-fill){background:var(--txv-accent)!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.summary-block,.detail-block,.review-block,.result-top-grid article,.judge-card,.dimension-card){border:1px solid var(--txv-line)!important;border-radius:10px!important;background:var(--txv-soft)!important;padding:16px!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.evidence,.judge-evidence,.opposition-evidence){background:var(--txv-accent-soft)!important;color:var(--txv-accent)!important;border-color:var(--txv-accent)!important;font-size:12px!important;font-weight:500!important}
html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.dimension-title b,.viral-probability-row strong){color:var(--txv-accent)!important;font-family:inherit!important}
html.tx-ui-v3 .tx-tool-viral :is(.audit-bridge,.viral-probability-card,.viral-chat){background:var(--txv-soft)!important;border:1px solid var(--txv-line)!important;border-radius:10px!important;box-shadow:none!important}
html.tx-ui-v3 .tx-tool-viral .predictor-flow{gap:16px;margin:20px 0}
html.tx-ui-v3 .tx-tool-viral :is(.audit-bridge h2,.chat-heading h3){font-size:15px!important}
html.tx-ui-v3 .tx-tool-viral .audit-bridge-link{background:var(--txv-accent)!important;color:var(--txv-surface)!important;border-radius:8px}
html.tx-ui-v3 .tx-tool-viral :is(.chat-bubble.is-assistant,.chat-messages){background:var(--txv-surface);color:var(--txv-ink);border-color:var(--txv-line)}
html.tx-ui-v3 .tx-tool-script .review-progress{background:var(--txv-soft);border-color:var(--txv-line);border-radius:9px}
/* Plot mixer: keep every option and explanatory paragraph, remove only ornamental marks. */
html.tx-ui-v3 .tx-tool-plot :is(.brand-mark,.formula-plus){display:none!important}
html.tx-ui-v3 .tx-tool-plot .topbar{gap:18px!important;padding:0 0 24px!important;border:0!important;background:transparent!important}
html.tx-ui-v3 body.tx-tool.tx-tool-plot[data-surface="tool"] .brand-block h1{font-size:26px!important}
html.tx-ui-v3 .tx-tool-plot .value-proposition{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px;padding:22px!important;background:var(--txv-soft)!important;border:1px solid var(--txv-line)!important;border-radius:12px!important;box-shadow:none!important}
html.tx-ui-v3 .tx-tool-plot .value-proposition :is(p,strong){color:var(--txv-muted)!important}
html.tx-ui-v3 .tx-tool-plot .value-proposition h2{font-size:20px!important;line-height:1.5!important}
html.tx-ui-v3 .tx-tool-plot .value-proposition-body{border-color:var(--txv-line);padding-left:22px}
html.tx-ui-v3 .tx-tool-plot :is(.template-bar,.preset-bar,.optional-recipe-row){gap:14px;padding:16px 0!important;min-width:0;flex-wrap:wrap;border-color:var(--txv-line)}
html.tx-ui-v3 .tx-tool-plot .preset-list{min-width:0;flex-wrap:wrap}
html.tx-ui-v3 .tx-tool-plot :is(.template-switch,.option-groups){background:var(--txv-soft);border-color:var(--txv-line);border-radius:8px}
html.tx-ui-v3 .tx-tool-plot :is(.choice-chip,.preset-button,.template-button,.option-group-button){color:var(--txv-muted)!important;background:var(--txv-surface)!important;border-color:var(--txv-line)!important}
html.tx-ui-v3 .tx-tool-plot :is(.choice-chip.is-selected,.template-button.is-active,.option-group-button.is-active){color:var(--txv-accent)!important;background:var(--txv-accent-soft)!important;border-color:var(--txv-accent)!important}
html.tx-ui-v3 .tx-tool-plot .ingredient-section{padding:20px 22px!important;border-bottom:1px solid var(--txv-line)}
html.tx-ui-v3 .tx-tool-plot .ingredient-section:last-child{border-bottom:0}
html.tx-ui-v3 .tx-tool-plot .slot-index{width:27px;height:27px;background:var(--txv-soft)!important;color:var(--txv-muted)!important;border-radius:7px}
html.tx-ui-v3 .tx-tool-plot :is(.section-heading h2,.character-workbench-summary){font-size:14px!important}
html.tx-ui-v3 .tx-tool-plot .result-visual{border-radius:15px 15px 0 0;overflow:hidden;max-height:180px}
html.tx-ui-v3 .tx-tool-plot .result-content{padding:24px!important}
html.tx-ui-v3 .tx-tool-plot :is(.character-config,.character-card,.character-editor,.ai-generation-panel,.ai-result-summary,.ai-history-list button,.template-menu){background:var(--txv-soft)!important;border-color:var(--txv-line)!important;box-shadow:none!important;border-radius:10px!important}
html.tx-ui-v3 .tx-tool-plot .ai-generation-panel{padding:20px!important}
html.tx-ui-v3 .tx-tool-plot :is(.recipe-tags span,.ai-selling-points span){background:var(--txv-accent-soft)!important;color:var(--txv-accent)!important;border-color:var(--txv-line)!important;border-radius:6px}
/* Project audits: live data and risk states retain their semantic colours. */
html.tx-ui-v3 body.tx-tool-script-audits .hero.panel{grid-template-columns:minmax(0,1fr) 235px;padding:0 0 26px!important;background:transparent!important;border:0!important;box-shadow:none!important;gap:26px;overflow:visible}
html.tx-ui-v3 .tx-tool-script-audits .hero-card{background:var(--txv-surface)!important;color:var(--txv-ink)!important;border:1px solid var(--txv-line);border-radius:12px!important;padding:18px!important;box-shadow:none!important}
html.tx-ui-v3 .tx-tool-script-audits .hero-card :is(span,small){color:var(--txv-muted)!important}
html.tx-ui-v3 .tx-tool-script-audits .hero-card strong{font-size:30px!important;color:var(--txv-accent);font-weight:550}
html.tx-ui-v3 .tx-tool-script-audits .grid{grid-template-columns:minmax(0,1fr) 300px!important}
html.tx-ui-v3 .tx-tool-script-audits :is(.fields,.mode-fields){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px!important}
html.tx-ui-v3 .tx-tool-script-audits :is(label,details p,.prob-row span:last-child){color:var(--txv-muted)!important}
html.tx-ui-v3 .tx-tool-script-audits .section-title>span{width:28px;height:28px;border-radius:7px;background:var(--txv-soft);color:var(--txv-muted)}
html.tx-ui-v3 .tx-tool-script-audits :is(.upload-box,.file-item,.progress,.summary-cards article,.steps li,.exports button){background:var(--txv-surface)!important;border:1px solid var(--txv-line)!important;border-radius:9px!important;box-shadow:none!important;color:var(--txv-ink)}
html.tx-ui-v3 .tx-tool-script-audits .upload-box{padding:20px!important;background:var(--txv-soft)!important;border-style:dashed!important}
html.tx-ui-v3 .tx-tool-script-audits .upload-box:before{background:var(--txv-accent-soft);color:var(--txv-accent);border-radius:9px}
html.tx-ui-v3 .tx-tool-script-audits .file-item span{white-space:normal;overflow-wrap:anywhere}
html.tx-ui-v3 .tx-tool-script-audits .steps li{font-size:12px!important;min-height:44px;padding-block:12px!important}
html.tx-ui-v3 .tx-tool-script-audits .steps li:is(.active,.completed){color:var(--txv-accent)!important;background:var(--txv-accent-soft)!important}
html.tx-ui-v3 .tx-tool-script-audits .steps li.failed{color:var(--txv-danger)!important;border-color:var(--txv-danger)!important}
html.tx-ui-v3 .tx-tool-script-audits :is(.prob-track,.dimension-meter,.progress i){height:6px!important;background:var(--txv-soft)!important}
html.tx-ui-v3 .tx-tool-script-audits .progress em{background:var(--txv-accent)!important}
html.tx-ui-v3 .tx-tool-script-audits .progress-failed em{background:var(--txv-danger)!important}
html.tx-ui-v3 .tx-tool-script-audits .score-card{background:var(--txv-soft);color:var(--txv-ink);border-radius:12px!important;min-width:115px}
html.tx-ui-v3 .tx-tool-script-audits .score-card span{color:var(--txv-muted)}
html.tx-ui-v3 .tx-tool-script-audits .prob-note{background:var(--txv-soft)!important;color:var(--txv-muted)!important;border-radius:9px}
html.tx-ui-v3 .tx-tool-script-audits .result-panel{padding:24px!important}
html.tx-ui-v3 .tx-tool-script-audits .dimension{grid-template-columns:minmax(140px,220px) 78px minmax(0,1fr);gap:18px;border-color:var(--txv-line)}
/* Image studio: generous image stage; reference controls stay in the form. */
html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .workspace{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important}
html.tx-ui-v3 .tx-tool-image .preview-panel{position:static!important}
html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .preview-stage{min-height:440px!important;border:0;background:var(--txv-soft);border-radius:10px!important}
html.tx-ui-v3 .tx-tool-image .preview-stage img{max-height:650px;background:var(--txv-soft)}
html.tx-ui-v3 .tx-tool-image :is(.reference-uploader,.size-picker-group,.revised-prompt){background:var(--txv-soft)!important;border-color:var(--txv-line)!important;border-radius:10px}
html.tx-ui-v3 .tx-tool-image :is(.ratio-options,.resolution-options){background:var(--txv-soft);gap:7px}
html.tx-ui-v3 .tx-tool-image :is(.ratio-option.is-selected,.resolution-option.is-selected){border-color:var(--txv-accent);background:var(--txv-accent-soft);color:var(--txv-accent);box-shadow:none}
html.tx-ui-v3 .tx-tool-image .reference-copy strong{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
html.tx-ui-v3 .tx-tool-image .history-grid{gap:16px;grid-template-columns:repeat(4,minmax(0,1fr))}
html.tx-ui-v3 .tx-tool-image .history-info{padding:14px}
html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .history-image{min-height:170px!important}
html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .history-delete-close{width:36px!important;height:36px!important;min-height:36px!important;min-width:36px!important;padding:0!important;border-radius:50%!important;font-size:21px!important;color:#fff!important}
/* Canvas library and chrome only. All node/edge geometry remains owned by the canvas. */
html.tx-ui-v3 .tx-tool-video .flow-library{background:var(--txv-page)!important;padding:36px 40px 70px;color:var(--txv-ink)}
html.tx-ui-v3 .tx-tool-video .flow-library>*{max-width:1380px}
html.tx-ui-v3 .tx-tool-video .library-heading h1{font-size:32px!important;line-height:1.3!important;font-weight:600!important;color:var(--txv-ink)!important;letter-spacing:-.03em!important}
html.tx-ui-v3 .tx-tool-video .library-heading :is(p,small){color:var(--txv-muted)!important;font-size:12px!important}
html.tx-ui-v3 .tx-tool-video .flow-project-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,265px),1fr));gap:20px}
html.tx-ui-v3 .tx-tool-video :is(.flow-project-card,.flow-project-create,.flow-project-skeleton,.flow-library-empty){background:var(--txv-surface)!important;border:1px solid var(--txv-line)!important;border-radius:14px!important;box-shadow:none!important;color:var(--txv-ink)!important}
html.tx-ui-v3 .tx-tool-video .project-card-copy strong{color:var(--txv-ink)!important;font-size:14px!important;font-weight:550!important}
html.tx-ui-v3 .tx-tool-video :is(.project-card-copy span,.project-card-stats span,.project-card-delete,.flow-project-create small,.library-load-state){color:var(--txv-muted)!important;font-size:11px!important}
html.tx-ui-v3 .tx-tool-video :is(.project-card-preview,.project-card-stats span,.flow-project-create b){background-color:var(--txv-soft)!important;border-color:var(--txv-line)!important;color:var(--txv-accent)!important}
html.tx-ui-v3 .tx-tool-video .project-card-info{padding:17px!important;gap:13px}
html.tx-ui-v3 .tx-tool-video .project-card-sequence{background:var(--txv-surface)!important;color:var(--txv-muted)!important;border-color:var(--txv-line)!important}
html.tx-ui-v3 .tx-tool-video .primary-action{height:40px;border-radius:8px;background:var(--txv-accent);color:var(--txv-surface);font-size:13px;font-weight:550;box-shadow:none}
html.tx-ui-v3 .tx-tool-video .library-tools label{border-color:var(--txv-line)!important;background:var(--txv-surface)!important;border-radius:8px;box-shadow:none}
html.tx-ui-v3 .tx-tool-video .library-tools input{color:var(--txv-ink)!important}
html.tx-ui-v3 .tx-tool-video .flow-library-error{border-color:var(--txv-danger)!important}
html.tx-ui-v3 .tx-tool-video .library-load-state.is-error{color:var(--txv-danger)!important}
html.tx-ui-v3 .tx-tool-video:not(.editing-flow) .flow-header{background:var(--txv-surface)!important;color:var(--txv-ink)!important;border-color:var(--txv-line);box-shadow:none}
html.tx-ui-v3 .tx-tool-video :is(.canvas-topbar,.flow-dock,.asset-drawer,.add-node-menu,.appearance-panel,.canvas-zoom-menu,.context-menu,.node-navigator,.project-resources-dialog){--panel:var(--txv-surface);--panel-soft:var(--txv-soft);--panel-hover:var(--txv-soft);--ink:var(--txv-ink);--muted:var(--txv-muted);--line:var(--txv-line);--green:var(--txv-accent);--blue:var(--txv-accent);background-color:var(--txv-surface)!important;color:var(--txv-ink)!important;border-color:var(--txv-line)!important;box-shadow:0 6px 24px #17251e12!important}
@media(max-width:1050px){
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.workspace,.grid){grid-template-columns:minmax(0,1fr)!important}
 html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .workspace{grid-template-columns:minmax(0,1fr)!important}
 html.tx-ui-v3 .tx-tool-script-audits .hero.panel{grid-template-columns:minmax(0,1fr) 215px}
 html.tx-ui-v3 .tx-tool-image .history-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.page-shell,.app-shell,.shell){width:calc(100% - 32px)!important;padding:22px 0 40px!important}
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) h1{font-size:25px!important}
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.input-panel,.control-panel,.preview-panel,.history-section,.form-panel,.side-panel){padding:19px!important}
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(button,.button,.back-link,.download-button,.reference-upload-button){min-height:44px!important}
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select){height:44px!important;min-height:44px!important;font-size:16px!important}
 html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) textarea{font-size:16px!important}
 html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.intro-band,.topbar,.submit-row,.reference-head){flex-wrap:wrap;gap:14px}
 html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.method-points,.status-points){justify-content:start;flex-wrap:wrap}
 html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(.form-grid,.fields,.mode-fields,.summary-grid,.detail-grid,.result-top-grid,.character-advanced-grid,.reference-list){grid-template-columns:minmax(0,1fr)!important}
 html.tx-ui-v3 .tx-tool-plot :is(.value-proposition,.ai-generation-controls){grid-template-columns:minmax(0,1fr)!important}
 html.tx-ui-v3 .tx-tool-plot .value-proposition-body{border-left:0;padding-left:0}
 html.tx-ui-v3 .tx-tool-plot .result-content{padding:20px!important}
 html.tx-ui-v3 .tx-tool-plot .top-actions{justify-content:start;flex-wrap:wrap}
 html.tx-ui-v3 .tx-tool-script-audits .hero.panel{grid-template-columns:minmax(0,1fr)}
 html.tx-ui-v3 .tx-tool-script-audits .hero-card{max-width:none!important;display:grid;grid-template-columns:1fr auto;gap:5px 12px}
 html.tx-ui-v3 .tx-tool-script-audits .hero-card small{grid-column:1/-1}
 html.tx-ui-v3 .tx-tool-script-audits .dimension{grid-template-columns:minmax(0,1fr)!important;gap:7px}
 html.tx-ui-v3 .tx-tool-script-audits .prob-row{grid-template-columns:88px minmax(0,1fr) 76px!important;gap:8px}
 html.tx-ui-v3 .tx-tool-script-audits .summary-cards{grid-template-columns:minmax(0,1fr)!important}
 html.tx-ui-v3 .tx-tool-image .history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .history-delete-close{width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important}
 html.tx-ui-v3 body.tx-tool.tx-tool-image[data-surface="tool"] .preview-stage{min-height:300px!important}
 html.tx-ui-v3 .tx-tool-video .flow-library{padding:26px 16px 60px}
 html.tx-ui-v3 .tx-tool-video .library-heading h1{font-size:27px!important}
 html.tx-ui-v3 .tx-tool-video .flow-project-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 html.tx-ui-v3 .tx-tool-video .primary-action{height:44px}
 html.tx-ui-v3 .tx-tool-video .project-card-footer{flex-wrap:wrap}
}
@media(max-width:430px){html.tx-ui-v3 .tx-tool-video .flow-project-grid{grid-template-columns:minmax(0,1fr)}html.tx-ui-v3 .tx-tool-image .history-grid{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){html.tx-ui-v3 .tx-tool-video .flow-project-card,html.tx-ui-v3 body.tx-tool:not(.tx-tool-video) :is(button,.progress em,.score-track i){transition:none!important}}

/* Workspace hierarchy: readable inputs, distinct output, compact project library. */
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(p,li,dt,dd,label){font-size:14px!important;line-height:1.75!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(small,.status,.boundary-note){font-size:12px!important;color:var(--txv-muted)!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) textarea{font-size:15px!important;line-height:1.85!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.input-panel,.form-panel,.mixer){border-top:3px solid var(--txv-accent)!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.result-head,.section-title){border-bottom:1px solid var(--txv-line);padding-bottom:16px}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .submit-row{padding:16px;background:var(--txv-soft);border:1px solid var(--txv-line);border-radius:12px}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .history-section{border-top:3px solid var(--txv-line)!important}
html.tx-ui-v3 .tx-tool-video .flow-library{max-width:1480px;margin-inline:auto;padding:32px!important}
html.tx-ui-v3 .tx-tool-video .library-heading{padding:24px;border:1px solid var(--txv-line);border-radius:16px;background:var(--txv-surface);margin-bottom:20px}
html.tx-ui-v3 .tx-tool-video .library-heading :is(p,small){font-size:14px!important;line-height:1.7}
html.tx-ui-v3 .tx-tool-video .flow-project-grid{display:grid;grid-template-columns:repeat(auto-fill,260px)!important;justify-content:start!important;justify-items:stretch!important;gap:16px!important}
/* Match the desktop density layer's actual card width, not only the grid gap. */
@media(min-width:721px){html.tx-ui-v3 .tx-tool-video .flow-project-grid{grid-template-columns:repeat(auto-fill,195px)!important}}
html.tx-ui-v3 .tx-tool-video .project-card-copy strong{font-size:17px!important;line-height:1.5;overflow-wrap:anywhere}
html.tx-ui-v3 .tx-tool-video :is(.project-card-copy span,.project-card-stats span,.project-card-delete){font-size:13px!important}
html.tx-ui-v3 .tx-tool-video .library-tools{padding:4px 0 20px;gap:12px;flex-wrap:wrap}
@media(min-width:1100px){html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) .workspace{grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr)!important}}
@media(max-width:600px){html.tx-ui-v3 .tx-tool-video .flow-library{padding:16px!important}html.tx-ui-v3 .tx-tool-video .library-heading{padding:18px}html.tx-ui-v3 .tx-tool-video .flow-project-grid{grid-template-columns:minmax(0,1fr)!important}}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.input-panel,.form-panel,.result-panel,.mixer,.side-panel){box-shadow:0 7px 24px rgba(12,30,24,.05)!important;border-radius:18px!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.result-head,.panel-heading){background:transparent!important}
html.tx-ui-v3 body.tx-tool[data-surface="tool"]:not(.tx-tool-video) :is(.history-card,.history-item){border-left:3px solid var(--txv-line)!important;padding:16px!important}
