/* Unbranded, neutral identity - no client colours, no product branding.
   Tuned for legibility when projected: generous type, high contrast, no thin greys. */

:root {
  --ink: #16181d;
  --ink-soft: #5b6270;
  --line: #e2e5ea;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --accent: #2b2f38;
  --cite: #1f4d7a;
  --cite-bg: #eef3f9;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}

.text-muted-soft { color: var(--ink-soft); }

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #c8ccd4; display: inline-block;
}
.status-dot.ok    { background: #2e9e5b; }
.status-dot.warn  { background: #d29b22; }
.status-dot.error { background: #c4453c; }

/* ---------------------------------------------------------------- transcript */

.transcript {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  min-height: 46vh;
  max-height: 62vh;
  overflow-y: auto;
}

.msg { padding: .875rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.msg:last-child { margin-bottom: 0; }

.msg-system { background: var(--canvas); border: 1px dashed var(--line); }

.msg-user {
  background: var(--accent);
  color: #fff;
  margin-left: auto;
  max-width: 85%;
}

.msg-answer { background: var(--surface); border: 1px solid var(--line); }
.msg-answer .answer-body { line-height: 1.65; margin-bottom: .75rem; }
.msg-answer.ungrounded { border-color: #e6d3a8; background: #fdf9ef; }

/* Inline [n] markers the model wrote, made clickable. */
.cite-marker {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 .3em;
  margin: 0 .1em;
  font-size: .78em;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  vertical-align: super;
  color: var(--cite);
  background: var(--cite-bg);
  border: 1px solid #cfdcea;
  border-radius: 4px;
  cursor: pointer;
}
.cite-marker:hover { background: #dce7f3; }

.citation-list { border-top: 1px solid var(--line); padding-top: .75rem; }

.citation {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--cite-bg);
  border: 1px solid #cfdcea;
  border-radius: 8px;
  padding: .55rem .7rem;
  margin-bottom: .45rem;
  font-size: .875rem;
  color: var(--cite);
  cursor: pointer;
}
.citation:hover { background: #dce7f3; }
.citation .snippet {
  display: block;
  color: var(--ink-soft);
  font-size: .8125rem;
  margin-top: .3rem;
  line-height: 1.45;
}

.follow-ups { margin-top: .85rem; }
.follow-up {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .8rem;
  margin: 0 .35rem .4rem 0;
  font-size: .8125rem;
  color: var(--ink);
  cursor: pointer;
}
.follow-up:hover { background: var(--canvas); }

.served-note { font-size: .75rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- thinking */

.thinking { display: flex; align-items: center; padding: .75rem 1rem; }
.thinking .dot {
  width: 7px; height: 7px; margin-right: 4px; border-radius: 50%;
  background: var(--ink-soft); animation: pulse 1.25s infinite ease-in-out;
}
.thinking .dot:nth-child(2) { animation-delay: .18s; }
.thinking .dot:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .thinking .dot { animation: none; opacity: .6; }
}

/* ---------------------------------------------------------------- side panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.panel-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .75rem;
}

.seed-chip {
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.seed-chip:hover { background: #eef0f3; border-color: #cfd4dc; }

.doc-list { list-style: none; padding: 0; }
.doc-list li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  line-height: 1.4;
}
.doc-list li:last-child { border-bottom: none; }
.doc-list .pages { color: var(--ink-soft); font-size: .8125rem; }

.source-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

@media (max-width: 991px) {
  .transcript { max-height: none; min-height: 40vh; }
}

/* ------------------------------------------------------------ access gate */

.gate{
  position:fixed; inset:0; z-index:60;
  display:flex; align-items:center; justify-content:center;
  background:var(--canvas); padding:24px;
}
.gate-card{
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:28px; width:100%; max-width:380px;
}
.gate-title{font-size:1.15rem; font-weight:600; margin:0 0 .35rem}
.gate-note{font-size:.875rem; color:var(--ink-soft); margin:0 0 1.1rem; line-height:1.5}
.gate-error{font-size:.8125rem; color:#c4453c; margin:.6rem 0 0}
