/* Shared layout for all tools. State and result controls remain in their original forms. */
:root{--accent:#5143c8;--line:#e0e4ec;--muted:#626b7a}
body{background:#f5f7fb;color:#202a3a;line-height:1.65}
aside{background:#fff;padding:24px 16px;width:238px}
aside button{border-radius:8px;line-height:1.5;padding:9px 12px}
aside .brand{font-size:20px;letter-spacing:-.6px}
aside .nav-label{font-size:11px;letter-spacing:.04em;color:#768092;margin:22px 12px 5px}
aside .nav-home{margin-top:18px}
aside a:not(.brand){font-size:12px}
main{margin-left:238px;padding:24px 36px 64px;max-width:1510px}
h1{font-size:30px;line-height:1.3;letter-spacing:-.8px;margin:8px 0 28px}
h2{font-size:19px;line-height:1.45;letter-spacing:-.35px;margin:0 0 16px}
h3{font-size:16px;line-height:1.5}
p{line-height:1.65}.muted,small{color:var(--muted)}
section,.card{padding:26px;border-radius:12px;border-color:var(--line);box-shadow:0 2px 5px #14253c03}
section{margin:20px 0}section>p:first-of-type{margin-top:0}
label{font-size:14px;color:#354152}input,select,textarea{font-size:15px;min-width:0;border-color:#cbd3df}
input::placeholder,textarea::placeholder{color:#969fad}
button{font-size:14px;border-color:#d6dce6;color:#394459;padding:9px 14px}
button.primary{box-shadow:0 2px 3px #5143c817}
button:hover{background:#f1f0fb}button.primary:hover{background:#4034ad}
details{background:#fafbfd;border-color:#e4e8ef;padding:12px 15px}
summary{color:#455268}details p:last-child{margin-bottom:0}
.hint{background:#f4f6fa;border-left-color:#ccd4e2;color:#5a6678;line-height:1.65}
.important{color:#b42332;font-weight:700}
.grid>*{min-width:0}.row{gap:9px}pre{font-family:Consolas,'Malgun Gothic',monospace;background:#f7f9fc}
#work-toolbar{margin:18px 36px 0 274px;padding:12px 16px;border-radius:10px;max-width:1200px;background:#fff}
#work-toolbar .row>div:first-child strong{font-size:13px}#work-toolbar small{font-size:12px}
#work-toolbar details{margin:10px 0 0;padding:0;border:0;background:transparent}#work-toolbar summary{font-size:12px;font-weight:400}
#work-toolbar button,#work-toolbar .file-button{font-size:12px;min-height:34px;padding:6px 10px}
#work-toolbar [data-work=undo]:disabled{display:none}
.hero{padding:8px 0}.hero h1{margin-bottom:12px}.hero p{max-width:650px}
.cards{gap:14px}.card{padding:22px}.card h2{font-size:18px;margin:10px 0}.card .eyebrow{font-size:11px;color:#768092}.card p{margin:0 0 20px}.card button{background:#f5f4ff;border-color:transparent;color:#5143c8}
#tool-search{max-width:720px;min-height:46px}
.input-modes{display:flex;gap:4px;padding:5px;border:1px solid #e0e4ee;border-radius:10px;background:#ebeff6;width:fit-content;max-width:100%}
.input-modes button{background:transparent;border-color:transparent;color:#626b7a;min-height:38px}
.input-modes [aria-pressed=true]{background:white;border-color:#e0e4ee;color:#4034ad;box-shadow:0 1px 4px #14253c0a}
.template-links{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.template-links a{padding:8px 12px;border:1px solid #d6dce6;border-radius:7px;text-decoration:none;color:#5143c8;font-size:13px}
.template-demo{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
#document-status:empty,#document-error:empty,#vision-status:empty,#vision-error:empty,#tc-error:empty{display:none}
.usage-help{margin:12px 0 18px}.usage-help summary{font-size:13px}
#tool-menu{display:none}
#tc-results:not(:has(.tc-group))>.filters,#tc-results:not(:has(.tc-group))>.results-head{display:none}
#tc-results:not(:has(.tc-group))>.row.spread>.row{display:none}
#tc-results:not(:has(.tc-group)) .empty{padding:18px;margin:0;text-align:left}
input[type=file]::file-selector-button{font:inherit;border:0;border-radius:5px;padding:7px 10px;margin-right:10px;color:#5143c8;background:#f1effb;cursor:pointer}
@media(max-width:1050px){main{padding:24px; margin-left:238px}#work-toolbar{margin-left:262px;margin-right:24px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 aside{position:static;width:100%;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px}
 aside .brand{width:auto;margin:0;font-size:18px}aside>small{width:auto;margin:0;font-size:11px}
 #tool-menu{display:block;order:0}aside>:not(.brand):not(small):not(#tool-menu){display:none}
 aside.menu-open>:not(.brand):not(small):not(#tool-menu){display:block;width:100%}aside.menu-open .nav-label{margin:12px 0 0}
 aside.menu-open button.nav-home{margin:0}aside.menu-open .language-label{margin:0}
 main{margin:0;padding:22px 16px 48px}h1{font-size:25px;margin-bottom:22px}h2{font-size:18px}
 #work-toolbar{margin:12px 16px 0;padding:10px 12px}#work-toolbar>.row>div:first-child{display:none}
 section,.card{padding:18px}.cards,.grid{grid-template-columns:minmax(0,1fr)}
 .input-modes{width:100%}.input-modes button{flex:1;font-size:12px;padding:8px 4px}
 .tc-group summary{gap:8px}.document-toolbar label{min-width:120px}
}

#evidence-dialog{width:min(1000px,94vw);max-height:88vh}#evidence-dialog td{white-space:pre-wrap;overflow-wrap:anywhere;min-width:180px}#work-conflict:not([hidden]){padding:12px;border:2px solid #b45309;margin-bottom:10px}#work-conflict button{margin:4px}#tc-generation-summary{font-size:.875rem;color:#475569}.flow-issues{border-left:3px solid #b45309;padding-left:12px}.flow-issues button{text-align:left}.ocr-lines textarea{min-height:42px}
#edit-dialog{width:min(1180px,95vw);max-width:95vw;max-height:90vh}
.tc-editor-compare{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,2fr);gap:20px;align-items:start}
.tc-editor-source{position:sticky;top:0;max-height:70vh;overflow:auto;margin:0;background:var(--surface,#f7f7fc)}
.tc-editor-source blockquote{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}
.tc-editor-fields{min-width:0}.tc-editor-fields>.grid{grid-template-columns:1fr}
.tc-issues small{display:block}.tc-issues{margin-top:6px}
#work-capacity{display:block;margin-top:8px}#tc-pages{margin-top:12px}
.template-example td,.template-example th{white-space:normal;min-width:100px}
@media(max-width:760px){.tc-editor-compare{grid-template-columns:1fr}.tc-editor-source{position:static;max-height:220px}}

/* Shared workbench layout: restrained navigation, grouped forms, readable results. */
:root{--surface:#fff;--surface-soft:#f8f9fc;--accent-soft:#eeebfb;--text:#202a3a}
aside{padding:22px 14px;background:#fcfcfe}
aside .brand{display:block;padding:0 10px;font-size:19px}
aside>small{padding:0 10px;margin:4px 0 18px;font-variant-numeric:tabular-nums}
aside .language-label{padding:0 10px;font-weight:400;font-size:11px;color:var(--muted)}
aside .language-label select{font-size:12px;padding:6px 9px}
aside .nav-label{font-size:10px;font-weight:650;margin:20px 12px 6px;letter-spacing:.025em}
aside button[data-tool]{display:flex;align-items:center;gap:10px;padding:10px 12px;font-size:13px;font-weight:500;min-height:40px;border:1px solid transparent}
aside button[data-tool]:hover{background:#f0f1f7}
aside button[aria-current=true]{color:#4937b2;background:var(--accent-soft);border-color:#e1daf8;font-weight:650}
.tool-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
aside .legacy{border-top:1px solid var(--line);padding-top:18px;margin:24px 10px 10px}
aside>a:not(.brand){display:block;margin:8px 10px;font-size:11px;text-decoration:none;color:var(--muted)}
aside>a:hover{color:var(--accent)}
main{max-width:1600px;padding-top:28px}
main>h1{font-size:27px;font-weight:700;letter-spacing:-.7px;margin:0 0 24px}
section{margin:18px 0;padding:24px;box-shadow:none}
section>h2{font-size:17px;padding-bottom:16px;border-bottom:1px solid #edf0f5;margin-bottom:20px}
section>p:not(.hint):not(.important):not(.danger){color:var(--muted);font-size:14px}
.panel-heading{gap:12px;padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid #edf0f5}
.panel-heading h2{margin:0;font-size:17px;flex:1 1 auto}
.panel-actions{gap:6px;margin-left:auto;justify-content:flex-end}
.panel-actions button{font-size:12px;padding:7px 10px;min-height:34px}
label{font-weight:600;font-size:13px;margin:16px 0 7px}
label>input:not([type=checkbox]),label>select,label>textarea{margin-top:7px}
input,select,textarea{border-color:#d4dae4;border-radius:7px;font-size:14px;padding:10px 12px;box-shadow:0 1px 2px #15223804}
input:hover,select:hover,textarea:hover{border-color:#aab4c5}
input:focus,select:focus,textarea:focus{border-color:var(--accent)}
input[type=number]{font-variant-numeric:tabular-nums}
textarea{line-height:1.7}
.grid{column-gap:20px;row-gap:8px}
.grid>label{min-width:0;margin:8px 0}
.required{font-size:11px;font-weight:500}
button{border-radius:7px;font-weight:550;transition:background-color .12s,border-color .12s}
button.primary{font-weight:650;box-shadow:none;padding:10px 18px}
section>.primary{margin-top:18px}
.hint{border:0;border-radius:7px;background:var(--surface-soft);font-size:12px;padding:10px 12px;margin:12px 0}
.hint:empty,.danger:empty,[role=alert]:empty{display:none}
.usage-help,.optional-settings{background:transparent;border-color:#e6e9f0}
details>summary{font-size:13px}
details:not([open])>summary{color:#576174}
.sample-settings,.request-field{background:var(--surface-soft);border-color:#e5e8f0;box-shadow:none}
.sample-settings h3{font-size:14px}
.result-options{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:16px;padding:12px 14px;background:var(--surface-soft);border-radius:8px}
.result-options>label{margin:0;flex:1;min-width:180px;font-size:12px}
.result-options button{font-size:12px;min-height:40px;background:white}
.result-panel>#result{margin-top:18px}
.table-scroll{border-color:#e0e5ed;border-radius:8px;background:white}
.table-scroll:empty{display:none}
table{font-size:13px;line-height:1.6}
th{background:#f5f6fa;color:#525d70;font-size:12px;font-weight:650;padding:12px 14px;border-bottom:1px solid #dce2ec}
td{padding:12px 14px;border-bottom:1px solid #edf0f5}
tbody tr:last-child td{border-bottom:0}
tbody tr:nth-child(even){background:#fbfcfe}
tbody tr:hover{background:#f5f3fc}
.boundary-table td:first-child{font-weight:650;font-variant-numeric:tabular-nums;color:#343052}
.boundary-table th:first-child{width:28%}
pre{background:#f8f9fc;border:1px solid #e6e9f0;border-radius:8px;font-family:ui-monospace,Consolas,monospace;line-height:1.8}
#result:not(:has(table)):not(:has(pre)){color:#5b6576}
.filters{gap:4px;border-bottom:1px solid #e8eaf1;padding-bottom:12px}
.filters button{border-color:transparent;background:transparent;font-size:12px;min-height:34px;padding:6px 12px}
.filters [aria-pressed=true]{background:var(--accent-soft);border-color:#e1daf8}
.input-modes{background:#eef0f5;padding:4px;border:0;border-radius:9px;gap:3px}
.input-modes button{font-size:13px;padding:9px 16px}
.input-modes [aria-pressed=true]{border-color:transparent;box-shadow:0 1px 3px #202a3a1a}
#work-toolbar{background:transparent;box-shadow:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0 0 14px;margin-top:22px;max-width:calc(1600px - 72px)}
#work-toolbar strong{font-size:12px;margin-right:6px}
#work-status{font-size:11px}
#work-toolbar details>summary{font-size:11px;color:#697386}
#work-toolbar button,#work-toolbar .file-button{background:#fff;border-color:#dfe3ec;font-weight:500}
.hero h1{font-size:30px;margin:10px 0 12px;max-width:650px}
.hero .eyebrow{font-size:10px;letter-spacing:.16em;color:#6c5ac0}
.hero p{font-size:14px}
#tool-search{max-width:none;background:#fff;min-height:46px;border-radius:9px}
.cards{gap:16px}
.card{position:relative;box-shadow:none;transition:border-color .12s}
.card:hover{border-color:#c6bddf}
.card>.tool-icon{width:36px;height:36px;padding:8px;border-radius:9px;background:#f0edfb;color:#6352ad;margin-bottom:16px}
.card .eyebrow{font-size:10px;color:#798092;letter-spacing:0}
.card h2{font-size:17px;margin:6px 0 10px}
.card p{font-size:13px;line-height:1.7;margin-bottom:18px;color:#626b7a}
.card button{background:transparent;padding:0;border:0;min-height:32px;font-size:12px}
.card button:hover{color:#35258e;text-decoration:underline}
.editor-field{min-width:0}
.editor-field textarea{min-height:240px;font-family:ui-monospace,Consolas,monospace;font-size:13px}
#request-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#request-fields>.request-field{margin:8px 0}
#tc-results>label{max-width:320px}
#tc-results .tc-group{background:white}
#tc-results .tc-group>summary{padding:4px 0}
@media(min-width:1180px){
 main.tool-split{display:grid;grid-template-columns:minmax(310px,.85fr) minmax(380px,1.15fr);gap:0 20px;align-items:start}
 main.tool-split>h1,main.tool-split>#language-data-note{grid-column:1/-1}
 main.tool-split>section{margin:0;min-width:0}
 main.tool-split .grid{column-gap:14px}
}
@media(max-width:1179px){#request-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){
 aside{padding:14px 16px;background:#fcfcfe}
 aside .brand{padding:0;font-size:17px}
 aside>small{padding:0;margin:0}
 aside.menu-open button[data-tool]{display:flex}
 aside .language-label{padding:0}
 aside>a:not(.brand){margin:8px 0}
 main{padding:22px 16px 40px}
 main>h1{font-size:23px;margin-bottom:22px}
 section{padding:18px;margin:16px 0}
 .panel-heading{align-items:flex-start;gap:12px}
 .panel-heading h2{width:100%}
 .panel-actions{margin-left:0;justify-content:flex-start}
 .result-options{padding:12px}
 .result-options>label{flex-basis:100%;min-width:0}
 .result-options button{min-height:36px}
 #work-toolbar{margin:14px 16px 0;padding-bottom:12px}
 #work-toolbar>.row>div:first-child{display:block;width:100%}
 #work-toolbar>.row{gap:8px}
 .hero h1{font-size:25px}
 .cards{grid-template-columns:minmax(0,1fr);gap:12px}
 .card{padding:18px 18px 18px 70px;min-height:140px}
 .card>.tool-icon{position:absolute;left:18px;top:22px}
 .input-modes button{padding:9px 8px;font-size:12px}
 .editor-field textarea{min-height:180px}
}
@media(prefers-reduced-motion:reduce){button,.card{transition:none}}

.usage-guide{grid-column:1/-1;margin:0 0 22px;padding:0;border:1px solid #dfe3ed;background:#fff;min-width:0}
.usage-guide>summary{padding:13px 16px;color:#5143a6;font-size:13px;list-style-position:inside}
.usage-guide[open]>summary{border-bottom:1px solid #e9ecf3;margin:0}
.usage-guide-body{padding:18px;max-width:1040px;margin:auto;min-width:0}
.usage-steps{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}
.usage-steps button{font-size:13px;min-height:36px;padding:7px 16px;border:1px solid transparent;background:#f5f6fa}
.usage-steps button[aria-pressed=true]{background:#eeebfb;color:#4937b2;border-color:#d8d0f3}
.usage-guide h3{font-size:16px;margin:0 0 8px}
.usage-guide p{font-size:14px;line-height:1.7;margin:0 0 16px;max-width:850px}
.usage-guide figure{margin:0 0 12px;border:1px solid #e3e7ef;border-radius:8px;padding:10px;background:#f8f9fc;overflow:auto}
.usage-guide img{display:block;width:auto;height:auto;max-width:100%;max-height:760px;margin:auto;border-radius:4px;background:white}
.usage-guide img:not([src]){display:none}
.usage-guide figcaption{font-size:11px;color:#626b7a;margin-top:8px}
.usage-guide a{font-size:12px;color:#5143c8}
@media(max-width:700px){.usage-guide-body{padding:14px}.usage-guide p{font-size:13px}.usage-steps{gap:4px}.usage-steps button{flex:1;padding:7px 10px}.usage-guide img{max-width:none;max-height:none}.usage-guide figcaption{min-width:260px}}
.usage-guide .usage-pan-hint{display:none}
@media(max-width:700px){.usage-guide .usage-pan-hint{display:block;font-size:11px;color:#626b7a;margin-bottom:8px}}

.brand{display:flex;align-items:center;gap:8px}.brand-icon{display:block;flex:none;border-radius:6px}

/* Clear input and output regions, retaining the original form controls. */
.work-region-title{font-size:12px;font-weight:750;letter-spacing:.03em;color:#72638e;margin:0 0 18px;padding-bottom:12px;border-bottom:1px solid #ece8f2}
.work-output>.work-region-title{color:#536b83}
.work-input,.work-output{min-width:0}
.work-input-stack{background:#fff;border:1px solid #e1ddea;border-radius:16px;padding:22px;min-width:0}
.work-input-stack>section{border:0;box-shadow:none;padding:0;margin:20px 0 0;background:transparent}
.work-input-stack>.input-modes{margin:0 0 20px;display:flex;flex-wrap:wrap}
.work-input-stack #request-fields{grid-template-columns:1fr}
.work-input .grid{grid-template-columns:1fr}
.work-input textarea{max-width:100%}
.work-output>.row.spread{align-items:flex-start;flex-wrap:wrap}
main.tool-split>.usage-guide,main.tool-split>#language-data-note{grid-column:1/-1}
@media(min-width:1180px){
 main.tool-split{display:grid;grid-template-columns:minmax(330px,.9fr) minmax(400px,1.3fr);gap:22px;align-items:start}
 main.tool-split>h1{grid-column:1/-1;margin-bottom:0}
 main.tool-split>.work-input,main.tool-split>.work-output{margin:0}
 main.tool-split>.work-input-stack{grid-column:1}
 main.tool-split>.work-output{grid-column:2}
}
@media(max-width:1179px){.work-input-stack{margin-bottom:20px}.work-output{margin-top:20px}}
@media(max-width:700px){.work-input-stack{padding:16px}.work-region-title{margin-bottom:14px}.work-input-stack>.input-modes button{flex:1 1 100px}}
body[data-current-tool="home"] main{max-width:1250px}
body[data-current-tool="home"] #language-data-note{display:none}

@media(min-width:701px){.work-input .request-field .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.work-input .request-field .grid>*{min-width:0}}

/* Task-focused layout: compact generators, wide editors and review flows. */
.task-workbench>h1{margin-bottom:6px}.tool-intro{grid-column:1/-1;color:#626b7a;font-size:14px;margin:0 0 6px}
.task-workbench .usage-guide{margin:0 0 8px;border:0;background:transparent}
.task-workbench .usage-guide>summary{padding:7px 0;width:fit-content;font-weight:500}
.task-workbench .usage-guide[open]{background:white;border:1px solid var(--line);padding:0 12px}
.task-workbench.tool-flow{display:block}.task-workbench.tool-flow>.work-output{margin-top:24px}
.task-workbench .work-input>h2,.task-workbench .work-output>h2{font-size:21px;border:0;padding:0;margin:0 0 20px}
.task-workbench .panel-heading{padding-bottom:0;border:0;margin-bottom:18px}.task-workbench .panel-heading h2{font-size:21px}
.task-workbench .input-notes{margin:0 0 18px;padding:9px 12px;background:#f8f9fc;font-size:12px}
.task-workbench .input-notes summary{font-size:12px}.input-notes p{font-size:13px;margin:10px 0}
.task-workbench label{margin:12px 0;font-size:13px}.task-workbench input,.task-workbench select{min-height:42px}
.task-workbench .work-input .grid{gap:10px 16px}
.task-workbench .input-submit{margin:22px 0 0}.input-submit>.primary{width:100%;min-height:46px;font-size:15px}
.task-workbench .result-options{margin:20px 0 0;padding:10px;background:#f8f9fc;gap:8px}
.task-workbench .result-options label{margin:0;flex:1}.task-workbench .result-options select{font-size:12px;padding:6px 8px;min-height:34px}
.task-workbench .result-options button{font-size:11px;min-height:34px;padding:6px 9px}
.task-workbench .work-output>.hint{font-size:12px;background:none;border:0;padding:0;margin:10px 0 0}
.result-empty{padding:55px 18px;text-align:center;border:1px dashed #dce1ec;border-radius:10px;background:#fafbfe;margin:14px 0}
.result-empty>span{display:block;font-size:28px;color:#a49bc5;margin-bottom:12px}.result-empty strong{display:block;font-size:15px;color:#536079}.result-empty p{font-size:13px;color:#788398;margin:8px 0 0}
.work-output.is-empty .panel-actions,.work-output.is-empty .result-options,.work-output.is-empty>#result,.work-output.is-empty>.hint{display:none}
.work-output.is-empty>:is(.filters,.results-head,#tc-check-count,#tc-notes-panel,#request-summary,#request-results){display:none}
.work-output.is-empty>label:has(#tc-quality-filter),.work-output.is-empty>details:has(#quality-summary),.work-output.is-empty #draft-list .empty{display:none}
.result-jump,.input-return{font-size:12px;color:#6553b6;text-decoration:none}.result-jump{margin-left:10px}.input-return{display:inline-block;margin-top:18px}
.work-input-stack{padding:22px}.work-input-stack>section{margin-top:16px}
.task-workbench.tool-flow .work-input .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.task-workbench.tool-flow #request-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.task-workbench.tool-flow .work-input textarea{min-height:210px}
.task-workbench.tool-flow #request-fields textarea{min-height:90px}
.task-workbench.tool-flow .work-input-stack #request-fields .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-current-tool=boundary] .work-input>.grid{display:block}
body[data-current-tool=boundary] .work-input>.grid>label{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;align-items:center;margin:16px 0}
.field-name .required{display:none}.field-name{font-size:14px;font-weight:600}
.input-example{background:#f5f4fa;border:1px solid #e8e5f2;border-radius:10px;padding:16px;margin-top:22px}
.example-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.example-heading strong{font-size:14px}
.example-action{font-size:12px;min-height:30px;padding:4px 9px;background:white;color:#5642be}
.input-example p{font-size:13px;margin:10px 0;color:#69738b}.input-example .example-legend{font-size:11px;margin:10px 0 0}
.example-values{display:flex;flex-wrap:wrap;gap:7px}
.validity-badge{display:inline-block;border-radius:5px;padding:3px 9px;font-size:13px;font-weight:700;white-space:nowrap}
.validity-badge.is-valid{color:#176345;background:#e3f5ec}.validity-badge.is-invalid{color:#a42e3b;background:#fde8ec}
.boundary-value{font-weight:700;font-variant-numeric:tabular-nums}.boundary-table{min-width:0}.boundary-table td,.boundary-table th{padding:13px 16px}
@media(min-width:1180px){
 .task-workbench.tool-split{grid-template-columns:minmax(320px,390px) minmax(0,1fr);gap:12px 24px}
 .task-workbench.tool-split>.work-input,.task-workbench.tool-split>.work-output{margin-top:12px;padding:24px}
 .task-workbench.tool-split>.work-output{min-height:380px}
}
@media(min-width:701px){
 #work-toolbar{margin-top:8px;padding:8px 0;border-bottom:1px solid #e5e8ef;border-radius:0;background:transparent}
 #work-toolbar details{margin-top:2px}#work-toolbar summary{font-size:11px}
 aside .brand{display:flex;padding:0 8px;gap:8px;font-size:18px}aside .brand-icon{width:26px;height:26px}
 aside>small{margin-bottom:10px}aside .nav-label{margin-top:12px}aside button[data-tool]{min-height:36px;padding:7px 12px}
}
@media(max-width:700px){
 .task-workbench.tool-flow .work-input .grid,.task-workbench.tool-flow #request-fields,.task-workbench.tool-flow .work-input-stack #request-fields .grid{grid-template-columns:1fr}
 .task-workbench .work-input,.task-workbench .work-output{padding:18px}.task-workbench .work-input-stack>section{padding:0}
 .tool-intro{font-size:13px}.result-empty{padding:32px 12px}.result-jump{display:inline-block;margin-left:0}
 .boundary-table td,.boundary-table th{padding:10px 8px}.validity-badge{font-size:12px;padding:3px 7px}
}

.status-badge{display:inline-block;padding:3px 9px;border-radius:5px;font-size:12px;line-height:1.5;font-weight:700;white-space:nowrap}
.tone-good{color:#176345;background:#e3f5ec}.tone-danger{color:#a42e3b;background:#fde8ec}.tone-info{color:#285da3;background:#e9f1fc}.tone-review{color:#895615;background:#fff2d7}.tone-special{color:#6951a4;background:#f0eafa}.tone-neutral{color:#586373;background:#edf0f4}
.tool-example pre{font-size:12px;line-height:1.6;margin:10px 0;padding:10px;background:white;border:1px solid #e7e5ee;max-height:150px;white-space:pre-wrap;overflow-wrap:anywhere}
.tool-example>strong{font-size:13px}.tool-example>p{font-size:12px}.tool-flow .tool-example{max-width:680px}
.check-row:has(input[type=checkbox]:checked){background:#eef8f2;border-radius:8px;padding:5px}
.check-row:has(input[type=checkbox]:checked) input[type=text]{color:#387858;text-decoration:line-through}
.comparison-match{padding:24px;background:#f3faf6;border-radius:8px}
.work-output.is-empty #extension-summary:empty{display:none}

/* Center the twelve-tool launcher in the space remaining beside navigation. */
body[data-current-tool="home"] main{max-width:none;width:calc(100% - 238px);margin-left:238px;padding:28px 36px 48px;display:flex;justify-content:center}
body[data-current-tool="home"] main>.launcher{width:100%;max-width:1100px;margin:0 auto}
body[data-current-tool="home"] #work-toolbar{max-width:none;margin-right:36px}
@media(max-width:700px){body[data-current-tool="home"] main{width:100%;margin:0;padding:20px 16px 36px}body[data-current-tool="home"] #work-toolbar{margin-right:16px}}

#tc-results.work-output:not(.is-empty)>.filters,#tc-results.work-output:not(.is-empty)>.results-head{display:flex}

/* Hidden result guidance must never compete with generated content. */
.result-empty[hidden]{display:none!important}
.tone-false{color:#793d10;background:#ffe1bd;border:1px solid #d5a370}

/* Full-width results for tables, editable rules and diagnostic code. */
.wide-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,310px);gap:20px 28px;align-items:start}
.wide-settings>h2{grid-column:1/-1;margin-bottom:0!important}
.wide-settings .input-fields{min-width:0}
.wide-settings .input-example{margin:0;max-width:none}
.wide-settings .settings-submit{grid-column:1/-1;border-top:1px solid var(--line);padding-top:16px}
.settings-submit .primary{min-width:200px}
.task-workbench.tool-flow .wide-settings textarea{min-height:130px}
.wide-settings .input-fields>label:first-child{margin-top:0}
body[data-current-tool=decision] #extension-table table{table-layout:auto;min-width:680px}
body[data-current-tool=decision] #extension-table td:last-child{width:38%;min-width:250px}
/* Stable columns across TC groups; keep reading in the page, not nested scroll boxes. */
#draft-list .tc-table-scroll{max-height:none;overflow-x:auto}
#draft-list .tc-table{table-layout:fixed;min-width:780px}
.tc-table .tc-col-select{width:54px}.tc-table .tc-col-item{width:30%}.tc-table .tc-col-actions{width:150px}
#draft-list .tc-table :is(td,th){padding:12px 14px;overflow-wrap:anywhere;white-space:normal}
#draft-list .tc-table :is(td,th):first-child{text-align:center;padding:12px 8px}
#draft-list .tc-table input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:3px 0}
#draft-list .tc-table .expected-preview{max-width:none;line-height:1.75;font-size:13px}
#draft-list .tc-table td:nth-child(2)>span[data-no-translate]{display:block;font-weight:600;margin-bottom:8px;line-height:1.65}
#draft-list .tc-table td small{white-space:normal;font-size:11px;line-height:1.6;margin:4px 0}
#draft-list .tc-table td .status-badge{font-size:11px;padding:2px 7px}
#draft-list .tc-table td:last-child button{display:block;width:100%;font-size:12px;margin:0 0 8px;padding:6px;white-space:normal}
#draft-list .tc-group{padding:14px;background:white}
@media(max-width:1050px){.wide-settings{grid-template-columns:minmax(0,1fr)}.wide-settings .input-example{max-width:none}.settings-submit .primary{width:100%}}
@media(max-width:700px){#draft-list .tc-group{padding:10px}#draft-list .tc-table :is(td,th){padding:10px}.wide-settings{gap:14px}.task-workbench.tool-flow .wide-settings .grid{grid-template-columns:1fr}}

.tc-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#draft-list .tc-table .tc-meta small{margin:0}
