/* Qapha demo — chat + guardian dashboard. Imports tokens.css + khuluma.css for
   the shared CongoSky/Khuluma Ndebele chrome, then adds the two-pane demo. */

.demo-intro { margin: 0 0 1rem; }
.demo-intro .lede { font-size: 1.05rem; color: var(--kh-cream); }

.disclaimer {
  font-size: .82rem; color: var(--kh-muted);
  border-left: var(--kh-stroke-heavy) solid var(--kh-mustard);
  background: var(--kh-panel); padding: .6rem .8rem; margin: 1rem 0;
}

/* role + scenario controls */
.controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0 1rem; }
.controls .lab { font-family: var(--kh-font-head); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--kh-muted); }
.seg { display: inline-flex; border: var(--kh-stroke) solid var(--kh-ink-stroke); }
.seg button {
  font-family: var(--kh-font-head); font-size: .82rem; font-weight: 600;
  background: var(--kh-panel); color: var(--kh-muted);
  border: 0; padding: .4rem .8rem; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--kh-mustard); color: var(--kh-bg); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 0; }
.chip {
  font-size: .78rem; font-family: var(--kh-font-head); font-weight: 500;
  background: var(--kh-panel2); color: var(--kh-cream);
  border: var(--kh-stroke) solid var(--kh-ink-stroke); cursor: pointer;
  padding: .3rem .6rem; border-radius: var(--kh-radius-pill);
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--kh-mustard); }
.chip[data-tier="red"]   { box-shadow: inset 0 0 0 1px var(--kh-warrior-red); }
.chip[data-tier="amber"] { box-shadow: inset 0 0 0 1px var(--kh-terracotta); }

/* two panes */
.panes { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 800px) { .panes { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.pane { background: var(--kh-panel); border: var(--kh-stroke-heavy) solid var(--kh-ink-stroke); display: flex; flex-direction: column; min-height: 420px; }
.pane-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: var(--kh-stroke) solid var(--kh-ink-stroke); background: var(--kh-panel2); }
.pane-head h2 { font-family: var(--kh-font-head); font-size: .95rem; margin: 0; color: var(--kh-ink); }
.pane-head .who { font-size: .72rem; color: var(--kh-muted); }
.pane-head .eye { margin-left: auto; font-size: .72rem; color: var(--kh-olive); font-weight: 600; }
.pane-head .eye.blind { color: var(--kh-mustard); }

/* chat log */
.log { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; max-height: 460px; }
.msg { max-width: 82%; padding: .5rem .7rem; border: var(--kh-stroke) solid var(--kh-ink-stroke); line-height: 1.45; font-size: .95rem; }
.msg.child   { align-self: flex-end; background: var(--kh-ndebele-blue); color: #fff; }
.msg.other   { align-self: flex-end; background: var(--kh-terracotta); color: #2a160e; }
.msg.bot     { align-self: flex-start; background: var(--kh-panel2); color: var(--kh-ink); }
.msg .from { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: .15rem; font-family: var(--kh-font-head); }
.msg .flag { display: inline-block; margin-top: .3rem; font-size: .68rem; font-family: var(--kh-font-head); padding: .1rem .4rem; border-radius: var(--kh-radius-pill); }
.msg .flag.red   { background: var(--kh-warrior-red); color: #fff; }
.msg .flag.amber { background: var(--kh-terracotta); color: #2a160e; }

/* composer */
.composer { display: flex; gap: .5rem; padding: .6rem; border-top: var(--kh-stroke) solid var(--kh-ink-stroke); }
.composer input { flex: 1; background: var(--kh-bg); color: var(--kh-ink); border: var(--kh-stroke) solid var(--kh-ink-stroke); padding: .5rem .6rem; font: inherit; }
.composer button { font-family: var(--kh-font-head); font-weight: 600; background: var(--kh-mustard); color: var(--kh-bg); border: var(--kh-stroke) solid var(--kh-ink-stroke); padding: .5rem .9rem; cursor: pointer; }

/* guardian dashboard */
.guardian { padding: .8rem; overflow-y: auto; max-height: 520px; }
.status-card { display: flex; align-items: center; gap: .7rem; padding: .7rem; border: var(--kh-stroke) solid var(--kh-ink-stroke); background: var(--kh-panel2); margin-bottom: .8rem; }
.lamp { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid var(--kh-ink-stroke); }
.lamp.green { background: var(--kh-olive); box-shadow: 0 0 0 3px rgba(74,92,56,.3); }
.lamp.amber { background: var(--kh-terracotta); box-shadow: 0 0 0 3px rgba(184,107,82,.3); }
.lamp.red   { background: var(--kh-warrior-red); box-shadow: 0 0 0 3px rgba(168,32,40,.35); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(168,32,40,0); } }
.status-card .st-text b { font-family: var(--kh-font-head); display: block; }
.status-card .st-text span { font-size: .82rem; color: var(--kh-muted); }

.priv-note { font-size: .8rem; color: var(--kh-muted); background: var(--kh-bg); border: var(--kh-stroke) dashed var(--kh-line); padding: .5rem .6rem; margin-bottom: .8rem; }
.priv-note code { color: var(--kh-cream); }

.alerts:empty::after { content: "No alerts. Your child's conversations are private. You'll see something here only if Qapha spots a real safety signal."; display: block; color: var(--kh-muted); font-size: .88rem; padding: .4rem 0; }

.alert { border: var(--kh-stroke) solid var(--kh-ink-stroke); margin-bottom: .7rem; }
.alert .a-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; }
.alert.red   .a-head { background: var(--kh-warrior-red); color: #fff; }
.alert.amber .a-head { background: var(--kh-terracotta); color: #2a160e; }
.alert .a-head .tier { font-family: var(--kh-font-head); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: .05rem .35rem; border-radius: var(--kh-radius-pill); }
.alert .a-head .cat { font-family: var(--kh-font-head); font-weight: 600; font-size: .9rem; }
.alert .a-body { padding: .55rem .65rem; background: var(--kh-panel2); }
.alert .a-body .action { font-size: .9rem; }
.alert .a-meta { display: flex; gap: .8rem; margin-top: .45rem; font-size: .74rem; color: var(--kh-muted); align-items: center; flex-wrap: wrap; }
.alert .redbar { font-family: monospace; letter-spacing: .1em; color: var(--kh-dust); }
.alert .reveal { font-size: .74rem; font-family: var(--kh-font-head); background: none; border: 1px solid var(--kh-line); color: var(--kh-muted); padding: .12rem .45rem; cursor: pointer; border-radius: var(--kh-radius-pill); }
.alert .reveal:hover { color: var(--kh-ink); border-color: var(--kh-mustard); }
.alert .revealed { font-size: .82rem; color: var(--kh-cream); margin-top: .35rem; padding: .35rem .45rem; background: var(--kh-bg); border-left: 2px solid var(--kh-mustard); }

.help-links { font-size: .82rem; margin-top: .3rem; }
.help-links a { color: var(--kh-mustard); }

.reset { background: none; border: 0; color: var(--kh-muted); font-size: .78rem; text-decoration: underline; cursor: pointer; padding: 0; margin-top: .4rem; }
