
#rules-view .rules-page{max-width:1400px;padding:24px 0 36px}
#rules-list{display:block;font-size:14px;color:var(--ink,#23392d)}
#rules-list *{box-sizing:border-box}
#rules-list h2,#rules-list h3,#rules-list h4,#rules-list p{margin:0}
#rules-list h2{font-size:23px;letter-spacing:-.6px}#rules-list h3{font-size:20px}#rules-list h4{font-size:14px}
#rules-list button{font:inherit;cursor:pointer;border:1px solid var(--line,#dce3dd);border-radius:8px;padding:9px 13px;color:inherit;background:var(--surface,#fff);font-size:12px;line-height:1.4}
#rules-list button:hover{border-color:var(--green,#1d6a49);background:var(--green-soft,#eaf3ec)}
#rules-list button:disabled{opacity:.4;cursor:not-allowed}
#rules-list :is(button,input,select,textarea,summary):focus-visible{outline:2px solid var(--green,#1d6a49);outline-offset:3px}
.rt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;position:sticky;top:8px;z-index:5;padding:16px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px}
.rt-toolbar p{color:var(--muted);margin-top:7px!important;line-height:1.6;font-size:13px}
.rt-save-group{display:grid;gap:8px;justify-items:end;flex-shrink:0}.rt-save-group>div{display:flex;gap:8px}
#routing-status{font-size:12px;color:var(--muted)}
#rules-list [data-action=save]{background:var(--green-deep,#124b34);border-color:transparent;color:#fff;font-weight:700}
.rt-context{display:flex;gap:16px;justify-content:space-between;align-items:center;margin:0 0 16px;padding:10px 14px;background:var(--green-soft,#eaf3ec);border-radius:8px;color:var(--muted);font-size:12px;line-height:1.5}
.rt-context>span:first-child{color:var(--green-deep);font-weight:700}
#routing-error{padding:12px 16px;margin-bottom:12px!important;border:1px solid #e8b58f;border-radius:8px;background:#fff3e9;color:#814d20;white-space:pre-wrap}
.rt-workspace{display:grid;grid-template-columns:280px minmax(0,1fr);align-items:start;gap:18px}
.rt-sidebar,.rt-editor{border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff);min-width:0;overflow:hidden}
.rt-sidebar{position:sticky;top:114px;display:flex;flex-direction:column;max-height:calc(100dvh - 130px)}
.rt-sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 14px 12px;gap:5px}
#rules-list .rt-sidebar-heading h3{font-size:14px}.rt-sidebar-heading h3 span{margin-left:4px;color:var(--muted);font-size:12px;font-weight:400}
#rules-list .rt-sidebar-heading button{font-size:11px;padding:6px 8px}
#routing-tree{padding:0 8px 12px;overflow:auto;max-height:calc(100dvh - 285px);min-height:200px}
.rt-tree-list,.rt-tree-list ul{list-style:none;padding:0;margin:0}.rt-tree-list ul{margin-left:13px;padding-left:8px;border-left:1px solid var(--line)}
.rt-row{display:flex;align-items:flex-start;border:1px solid var(--rt-edge);border-radius:10px;margin:8px 0;min-width:0;padding:4px;background:var(--rt-card);box-shadow:0 2px 4px rgba(31,51,43,.07),0 1px 0 rgba(255,255,255,.7) inset;transition:border-color .15s,box-shadow .15s}
.rt-row.is-selected{background:var(--green-soft);border-color:var(--green,#1d6a49)}
.rt-row.is-inactive .rt-row-title{color:var(--muted)}
#rules-list .rt-fold{display:grid;place-items:center;background:transparent;border:1px solid transparent;border-radius:7px;margin:9px 3px 0 0;padding:0;width:26px;height:26px;flex-shrink:0;color:var(--rt-accent)}
#rules-list .rt-fold:hover{background:var(--rt-badge);border-color:var(--rt-edge)}
.rt-fold svg{transition:transform .18s ease}.rt-fold[aria-expanded=true] svg{transform:rotate(90deg)}
.rt-fold-spacer{width:29px;flex-shrink:0}
#rules-list .rt-select{border:0;background:transparent;text-align:left;flex:1;min-width:0;padding:10px 7px 10px 0;border-radius:0}
.rt-row-title{display:flex;align-items:baseline;gap:7px;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.rt-depth{font-size:10px;color:var(--muted);font-weight:500}
.rt-row-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:5px 0 0 13px;font-size:10px;color:var(--muted)}
.rt-badge{display:inline-block;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:var(--green-soft);color:var(--green)}
.rt-badge.mode-clarify{background:#eaf0fc;color:#365c9b}.rt-badge.mode-human{background:#f4efe6;color:#7d6242}
#rules-list .rt-common-button{margin-top:auto;border:0;border-top:1px solid var(--line);border-radius:0;padding:16px;text-align:left;display:flex;justify-content:space-between}
#rules-list .rt-common-button.is-selected{background:var(--green-soft);color:var(--green);font-weight:700}
.rt-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px;border-bottom:1px solid var(--line)}
.rt-eyebrow{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-bottom:6px;overflow-wrap:anywhere}.rt-eyebrow>span:first-child{margin:0 5px;opacity:.5}
.rt-editor-heading p{font-size:13px;color:var(--muted);line-height:1.6;margin-top:7px!important}
.rt-enable{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;font-weight:600}
#rules-list input[type=checkbox]{width:16px;height:16px;accent-color:var(--green);margin:0;flex-shrink:0}
.rt-editor-body{padding:0 24px 20px}.rt-section{padding:20px 0;border-bottom:1px solid var(--line)}
.rt-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.rt-order{display:flex;gap:5px}#rules-list .rt-order button{font-size:11px;padding:5px 8px}
.rt-two-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.rt-field{display:flex;flex-direction:column;gap:8px;font-weight:650;font-size:13px;min-width:0}
.rt-field small{font-size:12px;font-weight:400;color:var(--muted);line-height:1.5}
#rules-list .rt-field :is(input,select,textarea),#routing-preview-question{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:11px 12px;font:inherit;line-height:1.65;color:inherit;background:var(--surface);font-weight:400}
#rules-list .rt-field textarea{height:auto;min-height:84px;resize:vertical}
#rules-list .rt-field textarea[data-field=response]{min-height:116px}
.rt-mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
#rules-list .rt-mode-options button{text-align:left;padding:12px 10px;min-width:0}
.rt-mode-options span{display:block;font-weight:700;font-size:13px}.rt-mode-options small{display:block;font-size:11px;color:var(--muted);font-weight:400;line-height:1.5;margin-top:5px}
#rules-list .rt-mode-options [aria-pressed=true]{background:var(--green-soft);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.rt-human-note{padding:14px;border-radius:8px;background:var(--green-soft);font-size:13px}.rt-human-note p{margin-top:6px!important;color:var(--muted);line-height:1.6;font-size:12px}
.rt-preview-card{margin-top:18px;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.rt-preview-card>div{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;background:var(--green-soft);padding:10px 14px;font-size:12px}
.rt-preview-card span{font-size:11px;color:var(--muted)}
#routing-live-preview,#routing-preview-result{padding:14px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.8;max-height:280px;overflow:auto}
.rt-editor-footer{display:flex;justify-content:space-between;gap:8px;padding-top:18px}#rules-list .rt-delete{color:#a34e42;border-color:transparent}
.rt-editor-body>.rt-field{margin-top:22px}
.rt-empty{padding:30px 18px;color:var(--muted);font-size:13px;line-height:1.7}
.rt-footnote{font-size:11px;color:var(--muted);line-height:1.7;margin-top:14px!important}
.rt-server-test{margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.rt-server-test summary{cursor:pointer;font-weight:600;font-size:13px}.rt-server-test p{margin:14px 0!important;color:var(--muted);font-size:12px}
@media(max-width:900px){.rt-workspace{grid-template-columns:230px minmax(0,1fr);gap:12px}.rt-editor-heading{padding:18px}.rt-editor-body{padding:0 18px 18px}.rt-two-fields{grid-template-columns:1fr}.rt-mode-options{grid-template-columns:1fr}#rules-list .rt-mode-options button{display:flex;align-items:center;justify-content:space-between;gap:8px}.rt-mode-options small{margin:0}}
@media(max-width:640px){#rules-view .rules-page{padding-top:16px}.rt-toolbar{align-items:stretch;flex-direction:column;gap:12px}.rt-save-group{justify-items:stretch;gap:6px}.rt-save-group>div{justify-content:flex-end}.rt-context{align-items:flex-start;flex-direction:column;gap:4px}.rt-workspace{grid-template-columns:1fr}.rt-sidebar{position:static;max-height:none}#routing-tree{max-height:235px;min-height:100px}.rt-editor-heading{align-items:flex-start}.rt-mode-options small{font-size:10px}}

/* Compact administration layout. */
.rt-title{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.rt-local-badge{padding:5px 8px;border-radius:5px;background:var(--green-soft);color:var(--green-deep);font-size:11px;font-weight:600}
.rt-save-group{display:flex;align-items:center;gap:14px}#routing-status{font-weight:700;font-size:13px}
.rt-workspace{grid-template-columns:310px minmax(0,1fr);gap:20px}
.rt-sidebar{top:94px;max-height:calc(100dvh - 110px)}
#rules-list .rt-sidebar-heading h3{font-size:17px}.rt-sidebar-heading h3 span{font-size:14px}
.rt-sidebar-heading{padding:18px 16px 10px}
.rt-tree-tools{display:flex;gap:6px;padding:0 16px 12px}
#rules-list .rt-tree-tools button{border:0;padding:4px 6px;font-size:12px;color:var(--muted)}
#routing-tree{max-height:calc(100dvh - 270px)}
.rt-row-title{font-size:15px;line-height:1.5;align-items:center;gap:8px}.rt-depth{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border-radius:7px;background:var(--rt-badge);color:var(--rt-accent);border:1px solid var(--rt-edge);font-size:13px;font-weight:800;box-shadow:0 1px 2px rgba(30,40,50,.05)}
.rt-row-meta{font-size:12px}.rt-badge{font-size:11px;padding:3px 7px}
.rt-row.is-selected{background:var(--rt-card);border-color:var(--green);box-shadow:0 0 0 1px var(--green),0 3px 7px rgba(27,69,45,.12)}
.rt-row:hover:not(.is-selected){border-color:var(--rt-accent);box-shadow:0 3px 7px rgba(31,51,43,.1)}
.rt-row.is-inactive{border-style:dashed}
.rt-row .rt-row-meta{margin-left:32px;gap:5px}
.rt-row[data-depth="1"]{--rt-card:#fff;--rt-edge:#d1e1d6;--rt-badge:#dcefe2;--rt-accent:#276041}
.rt-row[data-depth="2"]{--rt-card:#fff;--rt-edge:#d5e0ee;--rt-badge:#e0eafd;--rt-accent:#355d99}
.rt-row[data-depth="3"]{--rt-card:#fff;--rt-edge:#e1d8ed;--rt-badge:#ede2f7;--rt-accent:#76539b}
.rt-editor-heading{padding:18px 24px}.rt-eyebrow{font-size:12px}#rules-list .rt-editor-heading h3{font-size:23px}
.rt-enable{font-size:14px}
.rt-node-actions{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px 24px;background:var(--green-soft);border-bottom:1px solid var(--line)}
.rt-node-actions>div{display:flex;gap:6px;flex-wrap:wrap}
#rules-list .rt-node-actions button{font-size:12px;padding:8px 10px;font-weight:600}
#rules-list .rt-node-actions .rt-delete{color:#a33f31;border-color:#d9b9b3}
.rt-section{padding:18px 0}.rt-field{font-size:15px;gap:9px}#rules-list h4{font-size:15px}
#rules-list .rt-field :is(input,select,textarea){font-size:15px;line-height:1.7;padding:12px}
#rules-list .rt-field input[data-field=name]{font-weight:650;font-size:16px}
.rt-mode-options{margin:12px 0 0;gap:9px}#rules-list .rt-mode-options button{text-align:center;padding:13px 8px}
.rt-mode-options span{font-size:14px}
.rt-preview-card>div{font-size:13px}.rt-preview-card span{font-size:11px}
#routing-live-preview{font-size:14px;line-height:1.8}
.rt-undo{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;margin-bottom:14px;background:var(--green-soft);border:1px solid var(--line);border-radius:9px;font-size:13px}
@media(max-width:1050px){.rt-workspace{grid-template-columns:265px minmax(0,1fr);gap:12px}.rt-node-actions{padding:12px 18px}}
@media(max-width:900px){.rt-mode-options{grid-template-columns:repeat(3,minmax(0,1fr))}#rules-list .rt-mode-options button{display:block}.rt-mode-options span{font-size:12px}}
@media(max-width:640px){.rt-workspace{grid-template-columns:1fr}.rt-save-group{justify-content:space-between}.rt-sidebar{position:static;max-height:none}.rt-node-actions{padding:12px 16px}.rt-editor-heading{padding:16px}.rt-row-title{font-size:15px}.rt-title{gap:8px}#routing-tree{max-height:255px}.rt-undo{align-items:flex-start;flex-wrap:wrap}}

#routing-tree{margin:0 8px 10px;padding:4px 9px 10px;background:#eaf0ec;border:1px solid #d7e0d9;border-radius:10px;box-shadow:inset 0 2px 5px rgba(32,57,43,.10),inset 0 1px 2px rgba(32,57,43,.05),0 1px 0 rgba(255,255,255,.8);scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#adbcb1 transparent}
.rt-tree-list ul{margin-left:12px;padding-left:7px;border-left:1px solid #c8d4cc}
html[data-theme="dark"] #routing-tree{background:#121c17;border-color:#2c3b32;box-shadow:inset 0 3px 7px rgba(0,0,0,.4),0 1px 0 rgba(255,255,255,.04);scrollbar-color:#496052 transparent}
html[data-theme="dark"] .rt-row{box-shadow:0 2px 4px rgba(0,0,0,.2)}
html[data-theme="dark"] .rt-row.is-selected{box-shadow:0 0 0 1px var(--green),0 3px 7px rgba(0,0,0,.25)}
html[data-theme="dark"] .rt-tree-list ul{border-left-color:#3a4b40}
@media(prefers-reduced-motion:reduce){.rt-fold svg,.rt-row{transition:none}}

/* Single-line rows; hover belongs to the outer card, not its inner button. */
.rt-sidebar{font-size:12px}
#rules-list .rt-sidebar-heading h3{font-size:15px}.rt-sidebar-heading h3 span{font-size:12px}
#rules-list .rt-tree-tools button,#rules-list .rt-common-button{font-size:11px}
.rt-row{align-items:center;margin:6px 0;padding:4px;color:#23392d}
#rules-list .rt-select,#rules-list .rt-select:hover,#rules-list .rt-select:active,#rules-list .rt-select:focus{display:flex;align-items:center;gap:6px;padding:7px 5px 7px 0;background:transparent;border:0;border-radius:6px;box-shadow:none}
#rules-list .rt-select:focus-visible{outline:2px solid var(--rt-accent);outline-offset:-2px}
#rules-list .rt-fold{width:22px;height:24px;margin:0 3px 0 0}
.rt-fold-spacer{width:25px}
.rt-row .rt-row-title{flex:1;min-width:0;gap:6px;font-size:13px;line-height:1.5;white-space:nowrap}
.rt-node-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rt-row .rt-depth{width:20px;height:20px;border-radius:6px;font-size:11px}
.rt-row .rt-row-meta{flex-shrink:0;flex-wrap:nowrap;gap:4px;margin:0;white-space:nowrap;font-size:10px}
.rt-row .rt-badge{padding:2px 5px;font-size:10px;line-height:1.5}
.rt-inactive-dot{width:6px;height:6px;border-radius:50%;background:#89948d;flex-shrink:0}
.rt-row.is-inactive .rt-row-title{color:#727e76}
.rt-tree-list ul{margin-left:9px;padding-left:5px}

/* Separate classification settings into clearly bounded option groups. */
.rt-editor{--rt-label:#476252;--rt-value:#172b22;--rt-input:#f4f7f5;--rt-control-edge:#aabdb1;--rt-control-top:#fff;--rt-control-bottom:#eaf0ec;--rt-hover:#e1ece5;--rt-pressed:#1d6a49;--rt-pressed-text:#fff;--rt-inset:rgba(30,57,41,.10)}
.rt-editor article .rt-editor-body{display:grid;gap:14px;padding:18px;background:var(--green-soft)}
.rt-editor article .rt-section{min-width:0;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 2px 4px rgba(32,57,43,.04)}
#rules-list .rt-editor :is(.rt-field,h4){color:var(--rt-label);font-size:14px;font-weight:700}
#rules-list .rt-editor .rt-field :is(input,textarea){color:var(--rt-value);background:var(--rt-input);border-color:var(--rt-control-edge);box-shadow:inset 0 2px 4px var(--rt-inset),0 1px 0 var(--surface);font-weight:400}
#rules-list .rt-editor .rt-field input[data-field=name]{font-size:16px;font-weight:600}
#rules-list .rt-editor .rt-field :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
#rules-list .rt-editor .rt-field select{color:var(--rt-value);background:linear-gradient(var(--rt-control-top),var(--rt-control-bottom));border-color:var(--rt-control-edge);box-shadow:0 2px 3px var(--rt-inset),inset 0 1px 0 var(--surface);font-weight:500;cursor:pointer}
#rules-list .rt-editor .rt-field select option{color:var(--rt-value);background:var(--surface)}
#rules-list .rt-editor .rt-field :is(input,select,textarea):focus{border-color:var(--green);outline:2px solid var(--green);outline-offset:2px}
#rules-list .rt-editor button{color:var(--rt-value);border-color:var(--rt-control-edge);background:linear-gradient(var(--rt-control-top),var(--rt-control-bottom));box-shadow:0 2px 3px var(--rt-inset),inset 0 1px 0 var(--surface)}
#rules-list .rt-editor button:hover:not(:disabled){border-color:var(--green);background:var(--rt-hover)}
#rules-list .rt-editor button:active:not(:disabled){box-shadow:inset 0 2px 3px var(--rt-inset)}
#rules-list .rt-editor .rt-mode-options [aria-pressed=true]{background:var(--rt-pressed);border-color:var(--rt-pressed);color:var(--rt-pressed-text);box-shadow:0 2px 4px var(--rt-inset)}
#rules-list .rt-editor .rt-mode-options [aria-pressed=true]:hover{background:var(--rt-pressed);border-color:var(--rt-pressed)}
#rules-list .rt-editor button:disabled{opacity:1;color:var(--muted);background:var(--rt-input);border-color:var(--line);box-shadow:none}
#rules-list .rt-editor .rt-delete{color:#a33f31;border-color:#d4a69e;background:#fff5f2}
#rules-list .rt-editor .rt-delete:hover:not(:disabled){color:#8f2d21;border-color:#b86859;background:#ffe9e3}
html[data-theme="dark"] .rt-editor{--rt-label:#a8c5b4;--rt-value:#f0f6f2;--rt-input:#121c16;--rt-control-edge:#526b5c;--rt-control-top:#35483c;--rt-control-bottom:#293a30;--rt-hover:#3b5344;--rt-pressed:#89d2a7;--rt-pressed-text:#102b1c;--rt-inset:rgba(0,0,0,.25)}
html[data-theme="dark"] #rules-list .rt-editor .rt-delete{color:#ffc1b5;border-color:#945e54;background:#432b27}
html[data-theme="dark"] #rules-list .rt-editor .rt-delete:hover:not(:disabled){color:#ffe0d8;border-color:#c98a7d;background:#59362f}
@media(max-width:640px){.rt-editor article .rt-editor-body{gap:12px;padding:12px}.rt-editor article .rt-section{padding:14px}}

.rt-answer-tabs{display:flex;gap:6px;margin:14px 0 18px;padding:4px;border-radius:9px;background:var(--rt-input);border:1px solid var(--line)}
#rules-list .rt-editor .rt-answer-tabs button{flex:1;border:1px solid transparent;background:transparent;box-shadow:none;color:var(--rt-label);font-weight:650;padding:10px 12px}
#rules-list .rt-editor .rt-answer-tabs [aria-selected=true]{background:var(--surface);border-color:var(--rt-control-edge);color:var(--rt-value);box-shadow:0 2px 4px var(--rt-inset)}
.rt-document-toolbar,.rt-document-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--rt-label)}
.rt-document-list{display:grid;gap:14px;margin-top:14px}
.rt-document{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:9px;background:var(--rt-input)}
.rt-document-empty{padding:24px 12px;text-align:center;color:var(--muted);font-size:13px;border:1px dashed var(--rt-control-edge);border-radius:9px}

.rt-classification-fields>.rt-field{margin-top:18px}

.rt-answer-section{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.rt-preview-section .rt-preview-card{margin-top:0}

/* Side-by-side classification and response controls. */
.rt-classification-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,8fr);gap:18px;align-items:start}
.rt-classification-fields>div{min-width:0}
.rt-classification-fields>.rt-field{margin-top:0}
.rt-response-layout{display:grid;grid-template-columns:minmax(108px,1fr) minmax(0,9fr);gap:20px;align-items:start}
.rt-response-modes,.rt-response-content{min-width:0}
#rules-list .rt-response-modes h4{font-size:13px}
.rt-response-modes .rt-mode-options{grid-template-columns:minmax(0,1fr);gap:9px;margin:14px 0 0}
#rules-list .rt-response-modes .rt-mode-options button{padding:12px 7px}
.rt-response-modes .rt-mode-options span{font-size:12px;white-space:nowrap}
.rt-response-content{border-left:1px solid var(--line);padding-left:20px;min-height:168px}
.rt-response-content>.rt-answer-section{margin:0;padding:0;border:0}
@media(max-width:640px){.rt-classification-fields{grid-template-columns:minmax(0,1fr);gap:16px}.rt-response-layout{grid-template-columns:minmax(0,1fr);gap:16px}.rt-response-modes .rt-mode-options{grid-template-columns:repeat(3,minmax(0,1fr))}.rt-response-content{border-left:0;border-top:1px solid var(--line);padding:16px 0 0;min-height:0}.rt-response-content:empty{display:none}}

.rt-human-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}
.rt-human-toggle{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer}
#rules-list .rt-human-toggle input{width:16px;height:16px;margin:0;accent-color:#1d6c4d;box-shadow:none}
.rt-unclassified-editor .rt-enable, .rt-unclassified-editor .rt-eyebrow, .rt-unclassified-editor .rt-node-actions, .rt-unclassified-editor .rt-classification-fields { display: none; }

#rules-list .rt-common-button{margin-top:0;align-items:center;flex-shrink:0}
.rt-menu-chevron{width:22px;height:22px;flex:none;color:var(--green);fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.rt-server-test{padding:0;overflow:hidden}
.rt-server-test summary{padding:16px 20px;cursor:pointer;font-weight:700}
.rt-test-safe{font-size:11px;font-weight:500;color:var(--muted);margin-left:10px}
.rt-test-layout{display:grid;grid-template-columns:minmax(240px,3fr) minmax(0,7fr);gap:20px;padding:0 20px 20px;align-items:start}
.rt-test-input{display:grid;gap:10px}
.rt-test-input label,.rt-test-label{font-size:12px;font-weight:700;color:var(--muted)}
#routing-preview-question{height:130px;min-height:100px;resize:vertical;background:var(--bg);box-shadow:inset 0 2px 4px #1233250b}
#rules-list .rt-test-input button{justify-self:end;background:var(--green);color:white;border-color:var(--green);padding:10px 18px;font-weight:700}
#routing-preview-result{padding:16px;max-height:none;overflow:visible;white-space:normal;border:1px solid var(--line);border-radius:10px;background:var(--surface);min-height:180px}
.rt-test-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rt-test-result-head strong{display:block;margin-top:4px;font-size:15px}
.rt-test-reason{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.rt-test-reason p{margin:5px 0 0;font-size:12px;line-height:1.7}
.rt-test-answer{margin-top:16px;padding:14px;border-radius:8px;background:var(--green-soft)}
.rt-test-answer pre{margin:7px 0 0;font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.rt-test-empty{margin:45px 0;text-align:center;color:var(--muted);font-size:12px}
@media(max-width:760px){.rt-test-layout{grid-template-columns:minmax(0,1fr)}.rt-test-result-head{align-items:flex-start}}

/* Compact classification workspace. */
.rt-sidebar-heading{gap:6px;padding:14px 10px;flex-wrap:wrap}
.rt-sidebar-heading .rt-tree-tools{padding:0;gap:4px;margin-left:auto}
#rules-list .rt-tree-tools button{background:var(--green-soft);color:var(--green);border:1px solid var(--line);border-radius:6px;padding:5px 6px;font-size:11px}
#rules-list .rt-tree-tools button:hover{background:var(--line)}
#routing-tree{max-height:min(54dvh,520px);min-height:180px;padding-bottom:6px}
.rt-row{margin:4px 0;padding:2px 4px}
#rules-list .rt-select,#rules-list .rt-select:hover,#rules-list .rt-select:active,#rules-list .rt-select:focus{padding-top:5px;padding-bottom:5px}
#rules-list .rt-common-button{font-size:13px;font-weight:600;padding:14px 16px}
.rt-node-actions{align-items:center}
.rt-node-actions>.rt-enable{order:3;margin-left:8px}
.rt-node-actions>div:nth-of-type(2){margin-left:auto}
@media(max-width:640px){#routing-tree{max-height:230px;min-height:120px}.rt-node-actions>.rt-enable{margin-left:auto}}

/* Conversation-style customer guidance preview. */
.rt-chat-preview{display:flex;flex-direction:column;gap:20px;padding:20px;background:var(--surface-soft,#f3f6f2);max-height:460px;overflow:auto}
.rt-chat-message{display:flex;align-items:flex-start;gap:10px;min-width:0}
.rt-chat-message>div{min-width:0;max-width:85%}
.rt-chat-message small{display:block;margin:0 0 5px;color:var(--muted);font-size:11px}
.rt-chat-avatar{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:10px;font-size:13px;background:var(--green);color:white}
.rt-chat-bubble,#routing-live-preview.rt-chat-bubble{margin:0;padding:12px 16px;border:1px solid var(--line);border-radius:3px 14px 14px 14px;background:var(--green-soft);white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:14px;line-height:1.8;max-height:none;overflow:visible}
.rt-chat-answer{justify-content:flex-end}
.rt-chat-answer small{text-align:right}
.rt-chat-answer #routing-live-preview{background:var(--surface,#fff);border-radius:14px 3px 14px 14px}
.rt-chat-answer .rt-chat-avatar{background:var(--line);color:var(--muted)}
html[data-theme="dark"] .rt-chat-preview{background:#142019}
html[data-theme="dark"] .rt-chat-answer #routing-live-preview{background:#202d25}
@media(max-width:640px){.rt-chat-preview{padding:14px;gap:16px}.rt-chat-message>div{max-width:calc(100% - 42px)}}
