/* M00–M06 optional local-only AI panel, independent of existing module CSS. */
.ai-helper { box-sizing:border-box; width:min(100% - 32px,1120px); margin:44px auto 96px; padding:clamp(20px,3vw,34px); border:1px solid #d0e4d3; background:linear-gradient(135deg,#f1f8f0,#fffdf7); box-shadow:0 10px 30px rgba(18,68,49,.07); border-radius:22px; color:#184b3a; }
.ai-helper * {box-sizing:border-box}
.ai-helper .ai-head {display:flex;gap:14px;align-items:flex-start;margin-bottom:18px}
.ai-helper .ai-emblem {flex:none;background:#215b44;color:white;display:grid;place-items:center;width:48px;height:48px;border-radius:14px;font-weight:800;font-size:18px}
.ai-helper h2 {font-size:clamp(1.2rem,2.2vw,1.6rem);line-height:1.3;color:#164b3c;margin:2px 0 5px}
.ai-helper p {margin:0 0 10px;font-size:.93rem;line-height:1.6}
.ai-helper .ai-eyebrow {color:#34765a;font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-size:.72rem}
.ai-helper .ai-layout {display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:18px}
.ai-helper .ai-controls,.ai-helper .ai-response {min-width:0;padding:20px;border:1px solid #dbe6d8;border-radius:17px;background:#fff}
.ai-helper label {font-size:.88rem;font-weight:700;color:#22513e;display:block;margin-bottom:6px}
.ai-helper select,.ai-helper textarea {display:block;width:100%;max-width:100%;font:inherit;font-size:1rem;border:1px solid #a9c3b0;border-radius:11px;background:white;color:#213c30;padding:12px 13px;}
.ai-helper select:focus,.ai-helper textarea:focus {outline:2px solid #3e956e;outline-offset:2px}
.ai-helper textarea {min-height:105px;resize:vertical}
.ai-helper .ai-model-line {display:flex;align-items:center;gap:8px}
.ai-helper .ai-model-line select {flex:1;min-width:0}
.ai-helper .ai-refresh {flex:none;width:42px;height:43px;border:1px solid #abcab4;border-radius:11px;background:#f4faf4;color:#286344;cursor:pointer;font-size:1.2rem}
.ai-helper .ai-status {font-size:.77rem;color:#586e60;min-height:1.2em;margin:8px 0 14px}
.ai-helper .ai-check {display:flex;align-items:flex-start;gap:10px;margin:13px 0 6px;font-weight:500;line-height:1.5}
.ai-helper .ai-check input {width:19px;height:19px;flex:none;margin-top:2px;accent-color:#24694d}
.ai-helper .ai-context-info {font-size:.78rem;color:#68776d;margin-bottom:17px}
.ai-helper .ai-examples {display:flex;flex-wrap:wrap;gap:7px;margin:9px 0 13px}
.ai-helper .ai-sample {font-size:.77rem;line-height:1.4;border:1px solid #b4d2bd;background:#f0f8f1;color:#245b42;border-radius:100px;padding:7px 10px;cursor:pointer}
.ai-helper .ai-send {width:100%;border:0;border-radius:12px;margin-top:13px;padding:14px 12px;min-height:48px;background:#205f46;color:#fff;font:inherit;font-weight:800;cursor:pointer}
.ai-helper .ai-send:disabled {opacity:.58;cursor:wait}
.ai-helper .ai-msg {font-size:.83rem;min-height:1em;margin:10px 0 0;white-space:pre-wrap;color:#8c4c1c}
.ai-helper .ai-response h3 {font-size:1.02rem;color:#1e5f45;margin:0 0 12px}
.ai-helper .ai-idle {color:#5d7765}
.ai-helper .ai-result[hidden],.ai-helper .ai-idle[hidden] {display:none}
.ai-helper .ai-result p {white-space:pre-wrap}
.ai-helper .ai-result h4 {font-size:.89rem;margin:17px 0 7px;color:#21684c}
.ai-helper .ai-result ul {margin:0;padding-left:21px;line-height:1.6;font-size:.9rem}
.ai-helper .ai-warning {padding:12px;background:#fff4dd;border-radius:11px;color:#764d19;font-size:.83rem!important}
.ai-helper .ai-footnote {font-size:.76rem!important;color:#5d7063;margin-top:14px!important}
.ai-launcher {position:fixed;z-index:45;right:18px;bottom:18px;padding:10px 16px;border-radius:100px;background:#205b45;color:white;border:2px solid white;box-shadow:0 8px 24px rgba(0,0,0,.17);font:inherit;font-size:.85rem;font-weight:800;cursor:pointer;max-width:160px}
@media (max-width:760px) {
 .ai-helper {width:calc(100% - 24px);padding:17px;margin:26px auto 110px;border-radius:17px}
 .ai-helper .ai-layout {grid-template-columns:1fr;gap:12px}
 .ai-helper .ai-controls,.ai-helper .ai-response {padding:15px}
 .ai-launcher {bottom:calc(76px + env(safe-area-inset-bottom, 0px));right:11px;padding:9px 12px;}
}

.ai-inline { display:inline-block; margin:15px 0 5px; padding:10px 15px; border:1px solid #9fc5af; background:#ecf8ef; color:#205e44; font:inherit; font-size:.86rem; font-weight:800; border-radius:12px; cursor:pointer; max-width:100%; }
.ai-inline:focus-visible,.ai-launcher:focus-visible,.ai-sample:focus-visible {outline:3px solid #ce9b35;outline-offset:3px}

.ai-helper {scroll-margin-top:90px}
.ai-launcher[hidden] {display:none}
@media(max-width:760px){.ai-helper{scroll-margin-top:95px}}
