/* v1.7.38 – BS85 Kết nối thầy cô – theo nguyên mẫu Gemini Canvas (teal #0f766e, navy #0B2D5B, hổ phách chỉ cho cảnh báo) */
.kn-wrap{max-width:1180px;margin:0 auto;padding-bottom:32px}
.kn-hd h1{margin:0 0 4px}.kn-hd p{margin:0 0 20px}
.kn-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:24px;align-items:start}
.kn-col{display:flex;flex-direction:column;gap:24px;min-width:0}.kn-col>.card{margin:0}
.kn-h2{font-size:18px;margin:0 0 4px;display:flex;align-items:center;gap:10px}
.kn-sub{display:block;font-size:13px;color:#64748b}
.kn-cnt{display:inline-flex;min-width:24px;height:24px;padding:0 8px;border-radius:999px;background:#ccfbf1;color:#0f766e;font-size:13px;font-weight:700;align-items:center;justify-content:center}
.kn-st-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.kn-ct{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.kn-ct>b{display:flex;align-items:center;gap:8px;font-size:17px}
.kn-dot{width:8px;height:8px;border-radius:50%;background:#0f766e;display:inline-block}
.kn-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:8px;background:#f1f5f9;color:#0B2D5B;font-size:12px;font-weight:600}
.kn-box{text-align:center;padding:18px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}
.kn-box span{display:block;font-size:13px;color:#64748b;margin-bottom:8px}
.kn-box code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:clamp(26px,4vw,36px);font-weight:700;letter-spacing:.18em;color:#0B2D5B;background:none;word-break:break-all}
.kn-btns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.kn-btns .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px}
.kn-rot{display:inline-flex;align-items:center;gap:6px;margin-top:10px;border:0;background:none;color:#0f766e;font-weight:600;cursor:pointer;padding:6px 0;font-size:13px}
.kn-rot:focus-visible,.kn-tg:focus-visible{outline:3px solid #99f6e4;outline-offset:2px}
.kn-sw{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:16px;margin-top:12px;border-top:1px solid #e2e8f0}
.kn-sw b{display:block}
.kn-state{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:6px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:600}.kn-state.on{background:#ccfbf1;color:#0f766e}
.kn-tg{position:relative;width:48px;height:28px;border-radius:999px;border:0;background:#cbd5e1;cursor:pointer;flex:none;transition:background .15s}
.kn-tg i{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .15s}
.kn-tg[aria-checked="true"]{background:#0f766e}.kn-tg[aria-checked="true"] i{transform:translateX(20px)}
.kn-tg:disabled{opacity:.5;cursor:not-allowed}
.kn-rules{list-style:none;margin:12px 0 0;padding:12px 14px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;display:grid;gap:6px;font-size:13px;color:#475569}
.kn-rules li{display:flex;gap:8px;align-items:flex-start}.kn-rules svg{color:#0f766e;flex:none;margin-top:2px}
.kn-rules .kn-warn{color:#92400e;font-weight:600}
.kn-find{display:flex;gap:10px;margin:14px 0 8px}.kn-find input{flex:1;min-width:0;text-transform:uppercase}
.kn-navybtn{background:#0B2D5B;color:#fff;border-color:#0B2D5B}.kn-navybtn:hover{background:#0a2448}
.kn-cap{font-size:12px;font-weight:700;letter-spacing:.06em;color:#64748b;margin:18px 0 6px;padding-top:14px;border-top:1px solid #f1f5f9}
.kn-sch,.kn-row,.kn-found,.kn-q{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #f1f5f9}
.kn-sch:last-child,.kn-row:last-child,.kn-q:last-child{border-bottom:0}
.kn-mid{flex:1;min-width:0}.kn-nm{display:inline;font-size:15px;color:#0f172a}
.kn-st{font-size:13px;font-weight:600;color:#64748b;background:#f1f5f9;padding:4px 10px;border-radius:8px;white-space:nowrap}.kn-st.ok{color:#0f766e;background:#f0fdfa}
.kn-inv{border-color:#0f766e;color:#0f766e;white-space:nowrap}
.kn-av{width:40px;height:40px;border-radius:12px;background:#f0fdfa;color:#0f766e;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:none}
.kn-av.hs{background:#eef2ff;color:#0B2D5B}
.kn-ver{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:2px 8px;border-radius:6px;background:#f0fdfa;color:#0f766e;font-size:12px;font-weight:600;vertical-align:2px}
.kn-reqs{display:grid;gap:12px}
.kn-req{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid #e2e8f0;border-radius:12px}
.kn-req.kn-hs{display:block;border-left:4px solid #0B2D5B}
.kn-req.kn-hs .kn-nm{display:block;margin:6px 0}
.kn-req blockquote{margin:0 0 10px;padding:2px 0 2px 12px;border-left:3px solid #e2e8f0;color:#334155;font-style:italic;font-size:14px}
.kn-tags{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.kn-navy{background:#0B2D5B;color:#fff;font-size:12px;font-weight:600;padding:3px 8px;border-radius:6px}
.kn-k{font-size:13px;font-weight:600;color:#334155}
.kn-chip{font-size:12px;font-weight:600;color:#0f766e;background:#f0fdfa;padding:3px 8px;border-radius:6px}
.kn-acts{display:flex;gap:8px;justify-content:flex-end;flex:none}
.kn-msg{display:inline-flex;align-items:center;gap:6px;background:#f0fdfa;color:#0f766e;border-color:#ccfbf1;white-space:nowrap}
.kn-row .xmenu{position:relative}.kn-row .xmenu-p{right:0;left:auto}
.kn-empty{display:flex;flex-direction:column;gap:4px;padding:22px 16px;border:1px dashed #cbd5e1;border-radius:12px;text-align:center;color:#64748b}
.kn-empty b{color:#334155}
.kn-alert{padding:12px 16px;border:1px solid #fcd34d;background:#fffbeb;color:#78350f;border-radius:12px;margin:0 0 16px}
.kn-err{color:#b91c1c;font-size:14px;margin:8px 0}
/* học sinh */
.kn-s{max-width:520px}
.kn-step{display:flex;flex-direction:column;gap:6px}
.kn-kic,.kn-ok{width:48px;height:48px;border-radius:14px;background:#f0fdfa;color:#0f766e;display:inline-flex;align-items:center;justify-content:center;margin-bottom:6px}
.kn-ok{border-radius:50%;width:56px;height:56px}.kn-done{align-items:center;text-align:center}
.kn-lbl{display:block;font-weight:600;font-size:14px;margin:14px 0 6px}
.kn-big{width:100%;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:26px;letter-spacing:.2em;text-align:center;text-transform:uppercase;padding:14px;border-radius:12px;color:#0B2D5B}
.kn-wide{width:100%;min-height:48px;margin-top:12px}
.kn-tcard{display:flex;gap:12px;align-items:center;padding:14px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}
.kn-tcard .kn-ver{margin:6px 0 0}
.kn-pu{border:0;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.kn-pc{display:block}.kn-pc input{position:absolute;opacity:0}
.kn-pc span{display:flex;align-items:center;justify-content:center;text-align:center;min-height:44px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:10px;font-size:14px;cursor:pointer}
.kn-pc input:checked+span{border-color:#0f766e;background:#f0fdfa;color:#0f766e;font-weight:600}
.kn-pc input:focus-visible+span{outline:3px solid #99f6e4;outline-offset:2px}
.kn-s textarea{width:100%}
.kn-cntc{display:block;text-align:right;font-size:12px;color:#64748b}
.kn-rulebox{padding:12px 14px;border-radius:10px;background:#fffbeb;border:1px solid #fde68a;color:#78350f;font-size:13px;margin-top:10px}
.kn-rulebox ul{margin:6px 0 0;padding-left:18px}
.kn-mine{margin-top:20px}
.kn-pill{font-size:12px;font-weight:600;padding:3px 8px;border-radius:6px;white-space:nowrap}
.kn-pill.wait{background:#fef3c7;color:#92400e}.kn-pill.ok{background:#ccfbf1;color:#0f766e}.kn-pill.no{background:#f1f5f9;color:#475569}
/* tin nhắn: nhãn + cảnh báo của hội thoại kết nối */
.knlbl{display:inline-block;padding:1px 8px;border-radius:6px;background:#0B2D5B;color:#fff;font-size:12px;font-weight:600}
.xtag.kn{background:#eef2ff;color:#0B2D5B}
.knwarn{margin:0 12px;padding:8px 12px;border-radius:10px;background:#fffbeb;border:1px solid #fcd34d;color:#92400e;font-size:13px;font-weight:600}
@media(max-width:900px){.kn-grid{grid-template-columns:1fr}}
@media(max-width:480px){.kn-btns{grid-template-columns:1fr}.kn-req{flex-wrap:wrap}.kn-req .kn-acts{width:100%}.kn-req .kn-acts .btn{flex:1}
  .kn-row{flex-wrap:wrap}.kn-row .kn-mid{min-width:calc(100% - 60px)}.kn-msg{margin-left:52px}.kn-pu{grid-template-columns:1fr}}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .kn-box,:root:not([data-theme="light"]) .kn-rules,:root:not([data-theme="light"]) .kn-tcard{background:rgba(148,163,184,.08)}}
.kn-hsc{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:12px 14px;border:1px solid #c7d2fe;border-radius:10px;background:#eef2ff}
.kn-hsc code{display:block;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:20px;font-weight:700;letter-spacing:.14em;color:#0B2D5B;background:none;margin-top:2px}
.kn-hsb{display:flex;gap:8px}.kn-hsb .btn{display:inline-flex;align-items:center;gap:6px}
