:root{ --ibh-accent:#2563eb; }
.de-wrap{ display:grid; grid-template-columns:230px 1fr 300px; gap:16px; align-items:start; font-family:Inter,system-ui,sans-serif; color:#1e293b; }
.de-side{ position:sticky; top:12px; background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:14px; }
.de-side-h{ font-weight:700; font-size:13px; color:var(--ibh-accent); margin-bottom:10px; }
.de-nav-item{ font-size:13px; padding:7px 9px; border-radius:8px; cursor:pointer; color:#475569; margin-bottom:2px; }
.de-nav-item:hover{ background:#f1f5f9; }
.de-nav-item.active{ background:color-mix(in srgb, var(--ibh-accent) 12%, white); color:var(--ibh-accent); font-weight:600; }
.de-progress{ font-size:12px; color:#64748b; margin:12px 0 8px; }
.de-dl{ width:100%; }
.de-complete{ margin-top:10px; font-size:12px; color:#166534; background:#f0fdf4; border:1px solid #bbf7d0; border-radius:8px; padding:8px; }
.de-main{ min-width:0; }
.de-sec-title{ font-size:20px; font-weight:800; margin-bottom:4px; }
.de-sec-desc{ font-size:13px; color:#64748b; margin-bottom:14px; }
.de-card{ background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:16px; margin-bottom:14px; }
.de-label{ display:block; font-weight:700; font-size:14px; margin-bottom:4px; }
.de-guide{ font-size:12px; color:#64748b; margin-bottom:10px; }
.de-textarea{ width:100%; min-height:90px; padding:10px 12px; border:1px solid #e2e8f0; border-radius:8px; font-size:14px; font-family:inherit; resize:vertical; box-sizing:border-box; }
.de-textarea:focus,.de-formula-input:focus{ outline:none; border-color:var(--ibh-accent); }
.de-attach-bar{ margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.de-btn-attach{ font-size:12px; padding:4px 10px; border:1px dashed var(--ibh-accent); color:var(--ibh-accent); background:none; border-radius:20px; cursor:pointer; }
.de-btn-mini{ font-size:12px; padding:3px 9px; border:1px solid #e2e8f0; background:#f8fafc; border-radius:6px; cursor:pointer; margin:4px 4px 0 0; }
.de-image{ margin-top:8px; }
.de-img-prev{ max-width:100%; max-height:220px; border-radius:8px; margin-top:8px; display:block; border:1px solid #e2e8f0; }
.de-table{ margin-top:8px; overflow-x:auto; }
.de-grid{ border-collapse:collapse; width:100%; }
.de-grid th,.de-grid td{ border:1px solid #e2e8f0; padding:0; }
.de-grid input{ width:100%; border:none; padding:7px 9px; font-size:13px; background:transparent; box-sizing:border-box; }
.de-grid th input{ font-weight:700; background:#f8fafc; }
.de-grid input:focus{ outline:2px solid var(--ibh-accent); outline-offset:-2px; }
.de-formula{ margin-top:8px; }
.de-formula-input{ width:100%; padding:9px 11px; border:1px solid #e2e8f0; border-radius:8px; font-family:ui-monospace,monospace; font-size:13px; box-sizing:border-box; }
.de-formula-prev{ margin-top:10px; padding:10px; background:#f8fafc; border-radius:8px; min-height:20px; text-align:center; }
.de-list-row{ display:flex; gap:6px; margin-bottom:5px; }
.de-list-row input{ flex:1; padding:7px 9px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; }
.de-fb-row{ display:flex; align-items:center; gap:10px; margin-top:12px; border-top:1px dashed #e2e8f0; padding-top:10px; }
.de-fb-btn{ font-size:12px; padding:6px 12px; background:var(--ibh-accent); color:#fff; border:none; border-radius:8px; cursor:pointer; }
.de-fb-status{ font-size:12px; color:#64748b; }
.de-fb-status.done{ color:#166534; } .de-fb-status.needs{ color:#b45309; } .de-fb-status.dirty{ color:#b45309; } .de-fb-status.err{ color:#dc2626; }
.de-secnav{ display:flex; justify-content:space-between; margin-top:8px; }
.de-btn{ font-size:14px; padding:9px 16px; border:1px solid #e2e8f0; background:#fff; border-radius:10px; cursor:pointer; font-weight:600; }
.de-btn.primary{ background:var(--ibh-accent); color:#fff; border:none; }
.de-review-panel{ position:sticky; top:12px; background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:14px; }
.de-review-h2{ font-weight:700; font-size:13px; color:var(--ibh-accent); margin-bottom:10px; }
.de-review-empty{ font-size:13px; color:#94a3b8; line-height:1.6; }
.de-review-h{ font-weight:700; font-size:13px; margin-bottom:6px; }
.de-review-body{ font-size:13px; line-height:1.6; color:#334155; white-space:pre-wrap; }
.de-review-body.ok{ color:#166534; }
@media(max-width:900px){ .de-wrap{ grid-template-columns:1fr; } .de-side,.de-review-panel{ position:static; } }
/* Foundation gate + provisional feedback */
.de-verify{ width:100%; margin-bottom:8px; font-size:12px; padding:8px 10px; }
.de-foundation{ font-size:11px; color:#64748b; margin-bottom:10px; padding:6px 8px; border-radius:6px; background:#f8fafc; line-height:1.4; }
.de-foundation.ok{ color:#166534; background:#f0fdf4; border:1px solid #bbf7d0; }
.de-foundation.issues{ color:#b45309; background:#fffbeb; border:1px solid #fde68a; }
.de-provisional{ font-size:12px; color:#b45309; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:8px 10px; margin-bottom:10px; line-height:1.5; }
.de-choice{ width:100%; padding:9px 11px; border:1px solid #e2e8f0; border-radius:8px; font-size:14px; font-family:inherit; background:#fff; box-sizing:border-box; }
.de-choice:focus{ outline:none; border-color:var(--ibh-accent); }
.de-info{ background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:12px 14px; }
.de-info-h{ font-weight:700; font-size:13px; color:var(--ibh-accent); margin-top:10px; }
.de-info-h:first-child{ margin-top:0; }
.de-info-desc{ font-size:12px; color:#475569; margin:2px 0 4px; line-height:1.5; }
.de-info-list{ margin:0 0 6px 18px; padding:0; }
.de-info-list li{ font-size:12px; color:#334155; line-height:1.5; margin-bottom:3px; }
.de-chat{ display:flex; flex-direction:column; gap:8px; }
.de-chat-log{ max-height:300px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:4px; }
.de-chat-msg{ font-size:13px; line-height:1.5; padding:8px 11px; border-radius:10px; max-width:85%; white-space:pre-wrap; }
.de-chat-msg.bot{ background:#f1f5f9; color:#1e293b; align-self:flex-start; border-bottom-left-radius:2px; }
.de-chat-msg.me{ background:var(--ibh-accent); color:#fff; align-self:flex-end; border-bottom-right-radius:2px; }
.de-chat-inrow{ display:flex; gap:6px; align-items:flex-end; }
.de-chat-input{ flex:1; min-height:44px; padding:9px 11px; border:1px solid #e2e8f0; border-radius:8px; font-size:13px; font-family:inherit; resize:vertical; box-sizing:border-box; }
.de-chat-input:focus{ outline:none; border-color:var(--ibh-accent); }
.de-chat-start{ align-self:flex-start; }
.de-chat-use{ margin-top:4px; width:100%; }
.de-info-links{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.de-info-link{ display:inline-block; font-size:12px; font-weight:600; padding:7px 12px; border:1px solid var(--ibh-accent); color:var(--ibh-accent); background:#fff; border-radius:8px; text-decoration:none; }
.de-info-link:hover{ background:color-mix(in srgb, var(--ibh-accent) 10%, white); }
