html.embed-mode,html.embed-mode body{min-height:0!important;overflow:hidden!important;background:transparent!important}
html.embed-mode [hidden]{display:none!important}
html.embed-mode .site-header,html.embed-mode .tool-title,html.embed-mode .tool-aside,html.embed-mode body>footer{display:none!important}
html.embed-mode .tool-shell{min-height:0!important;padding:0!important}
html.embed-mode .tool-layout{display:block!important;max-width:none!important}
html.embed-mode .tool-main{padding:20px!important;border:0!important;box-shadow:none!important}
html.embed-mode .agent-panel .agent-messages{min-height:0!important;max-height:none!important;overflow:visible!important;padding:16px 20px!important;background:#fbfcfb!important}
html.embed-mode .agent-panel .agent-messages:empty{display:none!important}
html.embed-mode .agent-panel .agent-role{display:none!important}
html.embed-mode .agent-panel{padding:0!important;background:transparent!important}
html.embed-mode .agent-panel .agent-composer{position:relative;min-height:178px;padding:22px 70px 62px 24px!important;border:1px solid #dfe4e2!important;border-radius:24px;background:#fff!important;box-shadow:0 12px 30px rgba(23,32,28,.055)!important}
html.embed-mode .agent-panel .agent-composer>label{display:none!important}
html.embed-mode .agent-panel .agent-composer>textarea{min-height:78px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;resize:none!important;font-size:17px;line-height:1.65}
html.embed-mode .agent-panel .agent-composer>textarea:focus{border:0!important;box-shadow:none!important}
html.embed-mode .agent-panel .agent-composer>textarea::placeholder{color:#a7afb4}
html.embed-mode .agent-panel .agent-hint{display:none!important}
html.embed-mode .agent-panel .form-actions{position:absolute;right:18px;bottom:16px;margin:0!important}
html.embed-mode .agent-panel .btn-primary{width:46px;height:46px;min-height:46px;padding:0!important;border:0!important;border-radius:50%!important;color:#4f7fc5!important;background:#dcecff!important;box-shadow:none!important;font-size:25px;font-weight:500;line-height:1}
html.embed-mode .agent-panel .btn-primary:hover{border:0!important;background:#cfe4ff!important;box-shadow:none!important;transform:translateY(-1px)}
html.embed-mode .form-actions .btn-secondary{display:none!important}

html.embed-mode body:not([data-product="knowledge_qa"]) #tool-form{padding:0;background:transparent}
html.embed-mode body:not([data-product="knowledge_qa"]) .field{margin-bottom:14px}
html.embed-mode body:not([data-product="knowledge_qa"]) .field>span{margin-bottom:7px;font-size:13px}
html.embed-mode body:not([data-product="knowledge_qa"]) .field input:not([type="file"]),html.embed-mode body:not([data-product="knowledge_qa"]) .field textarea,html.embed-mode body:not([data-product="knowledge_qa"]) .field select{padding:12px 14px;border-color:#dfe4e2;border-radius:13px;background:#fff}
html.embed-mode body:not([data-product="knowledge_qa"]) .field textarea{min-height:96px}
html.embed-mode body:not([data-product="knowledge_qa"]) .field:has(input[name="sourceFile"]){padding:20px;border:1px dashed #cbd7d2;border-radius:18px;background:#fbfcfc}
html.embed-mode body:not([data-product="knowledge_qa"]) input[type="file"]{width:100%;padding:0;border:0;background:transparent;color:#78847e;font-size:13px}
html.embed-mode body:not([data-product="knowledge_qa"]) input[type="file"]::file-selector-button{margin-right:12px;padding:9px 14px;border:0;border-radius:10px;color:#416fae;background:#e7f1ff;cursor:pointer;font-weight:650}
html.embed-mode body:not([data-product="knowledge_qa"]) .field:has(input[name="sourceFile"]) small{margin:9px 0 0;color:#89938e}
html.embed-mode body:not([data-product="knowledge_qa"]) .form-actions{justify-content:flex-end;margin-top:14px}
html.embed-mode body:not([data-product="knowledge_qa"]) .form-actions .btn-primary{min-width:112px;border:0;color:#416fae;background:#dcecff;box-shadow:none}
html.embed-mode body:not([data-product="knowledge_qa"]) .form-actions .btn-primary:hover{background:#cfe4ff;box-shadow:none}

body[data-product^="lesson_"] .tool-shell>.usage-notice{max-width:980px;margin:0 auto 18px}
body[data-product^="lesson_"] .lesson-tool-layout{grid-template-columns:minmax(0,1fr);max-width:980px}
body[data-product^="lesson_"] #tool-form{display:grid;gap:18px}
body[data-product^="lesson_"] .lesson-request-panel{padding:22px;border:1px solid #e0e8e4;border-radius:18px;background:#fbfcfc}
body[data-product^="lesson_"] .lesson-requirements-field{margin:0}
body[data-product^="lesson_"] .lesson-requirements-field textarea{min-height:132px;background:#fff}
body[data-product^="lesson_"] .lesson-mode-field{min-width:0;margin:18px 0 0;padding:17px 0 0;border:0;border-top:1px solid #e2e9e5}
body[data-product^="lesson_"] .lesson-mode-field legend{padding:0 0 10px;color:var(--ink-2);font-size:14px;font-weight:700}
body[data-product^="lesson_"] .lesson-mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body[data-product^="lesson_"] .lesson-mode-option{position:relative;display:block;cursor:pointer}
body[data-product^="lesson_"] .lesson-mode-option input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
body[data-product^="lesson_"] .lesson-mode-option span{display:flex;min-height:68px;flex-direction:column;justify-content:center;padding:11px 14px;border:1px solid #d9e2de;border-radius:13px;background:#fff;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease}
body[data-product^="lesson_"] .lesson-mode-option:hover span{border-color:#adc2b9;transform:translateY(-1px)}
body[data-product^="lesson_"] .lesson-mode-option input:focus-visible+span{outline:3px solid rgba(37,99,235,.2);outline-offset:2px}
body[data-product^="lesson_"] .lesson-mode-option input:checked+span{border-color:#91b7ee;color:#285fae;background:#eef5ff;box-shadow:0 0 0 2px rgba(65,127,197,.08)}
body[data-product^="lesson_"] .lesson-mode-option strong{font-size:14px;line-height:1.35}
body[data-product^="lesson_"] .lesson-mode-option small{margin-top:3px;color:#75847d;font-size:12px}
body[data-product^="lesson_"] .lesson-upload-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:end;padding:20px;border:1px dashed #c7d6cf;border-radius:18px;background:#fbfcfc}
body[data-product^="lesson_"] .lesson-source-field{min-width:0;margin:0}
body[data-product^="lesson_"] .lesson-source-field small{margin-top:7px;color:#7b8982}
body[data-product^="lesson_"] .lesson-submit-button{min-height:48px;padding:0 24px;border:0;color:#356cac;background:#dcecff;box-shadow:none;white-space:nowrap}
body[data-product^="lesson_"] .lesson-submit-button:hover{color:#2f629f;background:#cfe4ff;box-shadow:none}
body[data-product^="lesson_"] #tool-error{margin:0}
html.embed-mode body[data-product^="lesson_"] .lesson-upload-panel .lesson-source-field{padding:0!important;border:0!important;background:transparent!important}
html.embed-mode body[data-product^="lesson_"] #tool-form>.flash:empty{display:none}

html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(1),html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(2){display:inline-block;width:calc(50% - 8px);vertical-align:top}
html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(2){margin-left:12px}
html.embed-mode .bridge-section{margin:10px 0;border-bottom:1px solid #e6eae8}
html.embed-mode .bridge-section>summary{padding:14px 2px;cursor:pointer;font-size:17px;font-weight:720;list-style-position:inside}
html.embed-mode .bridge-section>.field-help{margin:0 0 12px}
html.embed-mode .bridge-section>.bridge-score-grid{margin-bottom:14px}

@media(max-width:600px){
  html.embed-mode .tool-main{padding:14px!important}
  html.embed-mode .agent-panel .agent-composer{min-height:156px;padding:18px 62px 56px 18px!important;border-radius:20px}
  html.embed-mode .agent-panel .agent-composer>textarea{min-height:68px;font-size:15px}
  html.embed-mode .agent-panel .btn-primary{width:42px;height:42px;min-height:42px;font-size:23px}
  body[data-product^="lesson_"] .lesson-request-panel,body[data-product^="lesson_"] .lesson-upload-panel{padding:16px}
  body[data-product^="lesson_"] .lesson-mode-options{grid-template-columns:1fr}
  body[data-product^="lesson_"] .lesson-mode-option span{min-height:58px}
  body[data-product^="lesson_"] .lesson-upload-panel{grid-template-columns:1fr;gap:14px}
  body[data-product^="lesson_"] .lesson-submit-button{width:100%}
  html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(1),html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(2){display:block;width:100%}
  html.embed-mode body[data-product="bridge_assessment"] #tool-form>.field:nth-of-type(2){margin-left:0}
}

/* 工具页使用说明（与首页图片隐患识别页 usage-notice 同款样式） */
.usage-notice {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
  color: #33445c;
}
.usage-notice-title {
  font-weight: 600;
  color: #172b4d;
  margin-bottom: 6px;
}
.usage-notice-line {
  margin-bottom: 4px;
}
.usage-notice-line:last-child {
  margin-bottom: 0;
}

/* 输出示例弹层（与首页一致） */
/* ---------- 功能输出示例 Modal ---------- */
.example-output-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.example-output-modal.is-open {
  display: flex;
}

.example-output-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.example-output-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: min(85vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}

.example-output-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.example-output-modal__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.example-output-modal__title {
  margin: 0 40px 14px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--workspace-navy, #111827);
  line-height: 1.35;
}

.example-output-modal__body {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
}

.usage-notice-example {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  /* 与使用说明圆角底部留出空隙，避免视觉贴边 */
  padding-bottom: 2px;
}

.example-output-open-btn {
  margin: 0;
  margin-top: 0;
  padding: 4px 6px 6px 4px;
  border: none;
  background: none;
  color: #2b66e3;
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #2b66e3;
  text-underline-offset: 3px;
  text-underline-position: from-font;
  cursor: pointer;
  border-radius: 6px;
  overflow: visible;
  position: relative;
}

/* common.css 里 button 默认 overflow:hidden + ::before 渐变，会裁切链接式下划线和左下角笔画 */
.example-output-open-btn::before {
  display: none;
}

.example-output-open-btn:hover {
  color: #2457c8;
  text-decoration-color: #2457c8;
}

.example-output-sample pre {
  margin: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.example-output-sample__hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: #64748b;
}
.example-output-sample__figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.example-output-sample__figure img {
  display: block;
  width: 100%;
}
.usage-notice-example {
  margin-top: 8px;
  margin-bottom: 0;
  padding-bottom: 2px;
}

/* 专项方案审查：直通结果区（与图片识别/知识查询的结果框一致） */
.scheme-direct-result h3 {
  margin: 18px 0 10px;
  font-size: 16px;
  color: #172b4d;
}
.scheme-progress-tip {
  margin: 0 0 10px;
  font-size: 13px;
  color: #2b66e3;
}
.scheme-result-block {
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.8;
  color: #2b3a55;
}
.scheme-result-block[data-placeholder="true"] {
  color: #8a97ab;
}
.scheme-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
