/* LAN Control — Comms inbox: LAN Communications insights and AI Replied (public/lan-inbox.js) */
.lx { display:block; }
.lx-top { margin-bottom:16px; gap:12px; }
.lx-small { font-size:12.5px; }
.lx-k { font-size:11.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); font-weight:600; }

/* the wall */
.lx-wall { border-color:color-mix(in srgb, var(--gold) 45%, var(--line)); }
.lx-wall .panel-h h2 svg.i { width:17px; height:17px; color:var(--gold); }
.lx-wall-b { display:grid; grid-template-columns:minmax(0, 1fr); gap:0; }
.lx-wall-l { border-right:0; }
.lx-wall-l p { margin:0; padding:14px 18px 6px; color:var(--ink-2); font-size:13.5px; }
.lx-layers { margin:0; padding:10px 18px 14px 38px; display:grid; gap:7px; }
.lx-layers li { font-size:13px; color:var(--ink-2); }
.lx-layers li::marker { color:var(--gold); font-weight:700; }
.lx-layers b { display:block; color:var(--ink); font-weight:600; font-size:13px; }
.lx-layers span { color:var(--muted); font-size:12.5px; }
@media (max-width:820px) { .lx-wall-b { grid-template-columns:1fr; } .lx-wall-l { border-right:0; border-bottom:1px solid var(--line); } }

/* charts */
.lx-bars { width:100%; height:180px; display:block; }
.lx-bars text { font:500 10px Montserrat, sans-serif; fill:var(--muted); }
.lx-bars .axis { stroke:var(--line-2); }
.lx-bars .b-in { fill:var(--accent); }
.lx-bars .b-pp { fill:color-mix(in srgb, var(--accent) 35%, var(--soft)); }
.lx-bars .b-ai { fill:var(--gold); }
.lx-legend { display:flex; gap:12px; align-items:center; font-size:12px; color:var(--muted); }
.lx-legend i { width:10px; height:10px; border-radius:3px; display:inline-block; margin-right:4px; vertical-align:-1px; }
.lx-legend i.in { background:var(--accent); } .lx-legend i.pp { background:color-mix(in srgb, var(--accent) 35%, var(--soft)); } .lx-legend i.ai { background:var(--gold); }
.lx-heat { display:grid; grid-template-columns:36px repeat(24, 1fr); gap:3px; align-items:center; }
.lx-heat .lbl { font-size:11px; color:var(--muted); }
.lx-heat i { aspect-ratio:1; border-radius:3px; background:color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--soft)); }
.lx-heat b { font-size:10px; color:var(--muted); font-weight:500; }
.lx-purpose { height:30px; width:100%; max-width:220px; }

/* switches */
.lx-sw { position:relative; display:inline-block; width:36px; height:20px; cursor:pointer; vertical-align:middle; }
.lx-sw input { opacity:0; width:0; height:0; position:absolute; }
.lx-sw span { position:absolute; inset:0; background:var(--line-2); border-radius:20px; transition:background .2s; }
.lx-sw span::before { content:""; position:absolute; width:16px; height:16px; left:2px; top:2px; background:#fff; border-radius:50%; transition:transform .2s; box-shadow:0 1px 2px rgba(0,0,0,.25); }
.lx-sw input:checked + span { background:var(--accent); }
.lx-sw input:checked + span::before { transform:translateX(16px); }
.lx-sw input:focus-visible + span { box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* hero: the Lantern */
.lx-hero { display:grid; grid-template-columns:minmax(0, 1.7fr) minmax(260px, 1fr); }
.lx-canvas-wrap { position:relative; min-height:280px; background:radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 70%); border-right:1px solid var(--line); }
.lx-canvas-wrap canvas { display:block; width:100%; }
.lx-cap { padding:14px 18px 0; }
.lx-canvas { position:relative; }
.lx-cap b { display:block; font-size:15px; color:var(--ink); }
.lx-cap span { font-size:12px; color:var(--muted); }
.lx-side { padding:16px 18px; }
.lx-kv { margin:12px -18px 0; width:calc(100% + 36px); border-top:1px solid var(--line); }
.lx-cover { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:5px; font-size:13px; }
.lx-cover li { display:flex; align-items:center; gap:8px; color:var(--muted); }
.lx-cover li i { width:9px; height:9px; border-radius:50%; border:2px dashed var(--line-2); flex:none; }
.lx-cover li.on { color:var(--ink); font-weight:500; }
.lx-cover li.on i { border:0; background:var(--gold); box-shadow:0 0 0 3px var(--gold-soft); }
.lx-confirm { display:grid; gap:8px; padding:12px; border-radius:10px; background:var(--warn-soft); color:var(--ink); margin-top:8px; font-size:13px; }
.lx-confirm span { color:var(--ink-2); font-size:12.5px; }
@media (max-width:900px) { .lx-hero { grid-template-columns:1fr; } .lx-canvas-wrap { border-right:0; border-bottom:1px solid var(--line); } }

/* forms */
.lx-form { display:grid; gap:10px; }
.lx-form label { display:grid; gap:5px; font-size:13px; font-weight:500; color:var(--ink-2); }
.lx-form .row label { display:inline-grid; }
.lx-check { display:flex !important; align-items:center; gap:8px; font-weight:400 !important; font-size:13px; cursor:pointer; }
.lx-check input { height:auto; width:auto; }
.lx-may { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:6px 16px; margin-top:6px; }
.lx-drop { position:relative; border:1.5px dashed var(--line-2); border-radius:10px; padding:22px; text-align:center; color:var(--muted); font-size:13px; cursor:pointer; transition:border-color .15s, background .15s; }
.lx-drop.over, .lx-drop:hover { border-color:var(--accent); background:var(--accent-soft); }
.lx-drop input { position:absolute; inset:0; opacity:0; cursor:pointer; height:100%; }
.lx-dim td { opacity:.55; }
.lx-editrow td { background:var(--soft); }
.lx-chats { max-height:520px; overflow:auto; }
.lx-chats td:nth-child(2) { max-width:380px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lx-chats td:first-child { max-width:260px; }

/* try it */
.lx-test { display:grid; gap:10px; }
.lx-thread { height:260px; overflow:auto; display:flex; flex-direction:column; gap:8px; padding:10px; border-radius:10px; background:var(--soft); }
.lx-b { max-width:82%; padding:8px 11px; border-radius:10px; font-size:13.5px; line-height:1.45; background:var(--surface); box-shadow:var(--shadow-sm); }
.lx-b.them { align-self:flex-start; }
.lx-b.me { align-self:flex-end; background:color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.lx-b.err { color:var(--bad); }
.lx-b .sub { margin-top:4px; font-size:11.5px; }
.lx-held { margin-top:6px; font-size:12px; color:var(--bad); display:flex; gap:5px; align-items:center; }
.lx-held svg.i { width:14px; height:14px; }
.lx-typing { align-self:flex-end; color:var(--muted); font-size:18px; letter-spacing:2px; }

/* Communications → Chats: page heading + pill switches on top, the chat window framed below (same look as AI Reply Modulator) */
main.full > .cpage { display:flex; flex-direction:column; height:100%; min-height:0; }
.cpage .cp-head { flex:none; padding:clamp(16px, 2.2vw, 28px) var(--pad) 0; animation:rise .32s var(--ease); }
.cpage .cp-head .ph { margin-bottom:16px; }
.cpage .cp-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.cpage .cp-bar .seg { margin-bottom:0; }
.cpage .chat-host { flex:1; min-height:0; margin:0 var(--pad) var(--pad); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow-sm); }
.cpage .chat-host .wa, .cpage .chat-host .sx { height:100% !important; }
@media (max-width: 820px) {
  main.full > .cpage { height:calc(100dvh - var(--hdr)); }
  .cpage .cp-head { padding:14px 16px 0; }
  .cpage .cp-head .ph { margin-bottom:12px; }
  .cpage .cp-head .ph p { display:none; }
  .cpage .cp-bar { margin-bottom:10px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .cpage .cp-bar .seg { flex:none; }
  .cpage .chat-host { margin:0; border-radius:0; border-width:1px 0 0; box-shadow:none; }
}

/* Channels in AI Reply Modulator */
.lx-ch { display:inline-flex; align-items:center; gap:6px; font-weight:600; white-space:nowrap; }
.lx-ch i { width:8px; height:8px; border-radius:50%; background:var(--c); flex:none; }
.lx-chans td { vertical-align:middle; }

/* Teach (AI Reply Modulator → a chat → Teach) */
.lx-teach { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; padding:6px 2px; }
.lx-thread-sm { height:200px; }
@media (max-width: 800px) { .lx-teach { grid-template-columns:1fr; } }
