/* ============================================================
NIKA FRONT-END CSS — Shared Chrome (header / switcher / account)
Companion to style.css (core theme + reset); same :root variables.
Nika Chat Front End 0612
============================================================ */

/* 1. Header bar */
.nk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nk-brand img {
  height: 30px;
  width: auto;
  display: block;
}

/* 2. Surface switcher (Chat / Search / Analyze) */
.nk-switch {
  display: inline-flex;
  background: #f1f1f6;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.nk-pill {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1;
}
.nk-pill:hover {
  color: var(--text-strong);
}
.nk-pill.is-active {
  background: var(--bg);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* 3. Account chip */
.nk-acct {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nk-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}
.nk-chip .nk-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.nk-login {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ============================================================
4. Landing (home) — hero + inline Chat/Search/Analyze panels
============================================================ */
.nk-landing {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 22px 80px;
}
.nk-hero {
  text-align: center;
  margin-bottom: 30px;
}
.nk-hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 14px;
}
.nk-hero h1 .accent {
  color: var(--primary);
}
.nk-sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}
.nk-panel-lead {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 16px;
}
.nk-ask {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.nk-ask input {
  flex: 1;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.nk-ask input:focus {
  outline: none;
  border-color: var(--primary);
}
.nk-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 2px 0;
}
.nk-models {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}
.nk-spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 250, 181, 0.45);
  display: inline-block;
}

/* ============================================================
5. Chat (public/chat.html) — light theme, scoped to .chat-surface
============================================================ */
body.chat-body { height:100vh; display:flex; flex-direction:column; margin:0; }
.chat-surface { flex:1; display:flex; flex-direction:column; min-height:0; }
.chat-surface #thread { flex:1; overflow-y:auto; padding:22px 16px; }
.chat-surface .row { max-width:820px; margin:0 auto; }
.chat-surface .msg { margin:0 0 4px; display:flex; }
.chat-surface .msg.user { justify-content:flex-end; }
.chat-surface .bubble { max-width:82%; padding:12px 16px; border-radius:15px; line-height:1.55; font-size:15px; word-wrap:break-word; overflow-wrap:anywhere; }
.chat-surface .user .bubble { background:var(--primary); color:#fff; border-bottom-right-radius:4px; white-space:pre-wrap; }
.chat-surface .edge .bubble { background:#f1f1f6; color:var(--text); border-bottom-left-radius:4px; }
.chat-surface .edge .bubble > :first-child { margin-top:0; }
.chat-surface .edge .bubble > :last-child { margin-bottom:0; }
.chat-surface .bubble p { margin:8px 0; }
.chat-surface .bubble strong { font-weight:600; }
.chat-surface .bubble h1, .chat-surface .bubble h2, .chat-surface .bubble h3 { font-size:15px; margin:12px 0 5px; color:var(--primary); }
.chat-surface .bubble ul, .chat-surface .bubble ol { margin:6px 0; padding-left:20px; }
.chat-surface .bubble li { margin:4px 0; }
.chat-surface .bubble table { border-collapse:collapse; margin:8px 0; font-size:13px; }
.chat-surface .bubble th, .chat-surface .bubble td { border:1px solid var(--border); padding:5px 9px; }
.chat-surface .bubble th { background:#f1f1f6; }
.chat-surface .bubble code { background:#f1f1f6; padding:1px 5px; border-radius:4px; }
.chat-surface .bubble pre { background:#f6f7f9; padding:10px; border-radius:8px; overflow-x:auto; }
.chat-surface .bubble a { color:var(--text); }
.chat-surface .bubble hr { border:none; border-top:1px solid var(--border); margin:10px 0; }
.chat-surface .meta { display:flex; align-items:center; gap:10px; margin:0 0 18px; font-size:12px; color:var(--text-muted); }
.chat-surface .meta .note { flex:1; }
.chat-surface .meta .fb { display:flex; gap:4px; }
.chat-surface .meta .t { background:none; border:none; cursor:pointer; font-size:14px; opacity:.5; padding:2px; }
.chat-surface .meta .t:hover, .chat-surface .meta .t.on { opacity:1; }
.chat-surface footer { border-top:1px solid var(--border); padding:12px 16px; }
.chat-surface #evidencebar { max-width:820px; margin:0 auto 10px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:13px; color:var(--text-muted); }
.chat-surface #evidencebar .label { flex:1; min-width:150px; }
.chat-surface #evidencebar a { color:var(--primary); text-decoration:none; }
.chat-surface #evidencebar a:hover { text-decoration:underline; }
.chat-surface .composer { max-width:820px; margin:0 auto; display:flex; gap:10px; }
.chat-surface #input { flex:1; resize:none; background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:12px; padding:12px 14px; font-size:15px; font-family:inherit; max-height:140px; }
.chat-surface #input:focus { outline:none; border-color:var(--primary); }
.chat-surface #send { background:var(--primary); color:#fff; border:none; border-radius:12px; padding:0 22px; font-weight:600; cursor:pointer; }
.chat-surface #send:disabled { opacity:.5; cursor:default; }
.chat-surface .typing { color:var(--text-muted); font-style:italic; }
.chat-cta { display:inline-block; margin-top:10px; background:var(--primary); color:#fff; border: none; padding:0 22px; border-radius:12px; text-decoration:none; font-weight:600; cursor: pointer; }

/* public search form: opt-in + notice */
.email-optin { display:flex; align-items:center; gap:10px; margin:4px 0; font-weight:600; color:var(--text-strong); cursor:pointer; }
.email-optin input[type="checkbox"] { width:18px; height:18px; flex:none; }
.form-notice { border:1px solid var(--border); border-left:3px solid var(--primary); background:var(--bg); border-radius:var(--radius-sm); padding:12px 16px; margin:12px 0; }
