/* Nightbench — calm, dark, quiet. A place to exhale, not a product screaming at you. */

:root {
  --bg: #0f1115;
  --card: #171a21;
  --text: #e8e6e1;
  --soft: #8a8f98;
  --accent: #7c9a83;        /* muted sage — calm, not clinical */
  --accent-press: #6a8871;
  --line: #262b35;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

.view { width: 100%; max-width: 520px; padding: 24px; }
.hidden { display: none; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px;
}

.logo {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--text);
}

.tagline { text-align: center; color: var(--soft); margin: 8px 0 32px; }

.gate-question { text-align: center; margin-bottom: 24px; font-size: 1.05rem; }

h2 { font-weight: 500; margin-bottom: 16px; }
h3 { font-weight: 500; font-size: 1rem; }

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn.primary { background: var(--accent); color: #10130f; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-press); }
.btn.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--soft);
  border: 1px solid var(--line);
}
.btn.ghost:hover { color: var(--text); border-color: var(--soft); }
.btn.big { padding: 18px; font-size: 1.15rem; }

.helpline {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
}
.helpline p { color: var(--soft); font-size: 0.95rem; margin-top: 4px; }
.helpline strong { color: var(--text); }
.region { color: var(--soft); font-weight: 400; font-size: 0.8rem; margin-left: 6px; }

a { color: var(--accent); }

.soft { color: var(--soft); font-size: 0.9rem; margin-top: 12px; text-align: center; }

.notice-list { list-style: none; margin: 0 0 20px; }
.notice-list li {
  padding: 10px 0 10px 26px;
  position: relative;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
}
.notice-list li:last-child { border-bottom: none; }
.notice-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* chat */
.chat-card { display: flex; flex-direction: column; height: 78vh; padding: 20px; position: relative; }
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
#chat-status { font-weight: 500; }
.chat-you { color: var(--soft); font-size: 0.8rem; margin-top: 2px; }
.btn.small { width: auto; padding: 8px 16px; margin-top: 0; font-size: 0.85rem; }
.btn.danger { color: #e08585; border-color: #6a3535; }
.chat-actions { display: flex; gap: 8px; }

.report-panel {
  position: absolute;
  inset: 0;
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.report-panel.hidden { display: none; }
.report-panel label { color: var(--soft); cursor: pointer; }
.report-panel label.attach { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-panel input { accent-color: var(--accent); margin-right: 8px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 4px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.me { align-self: flex-end; background: var(--accent); color: #10130f; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--line); border-bottom-left-radius: 4px; }
.bubble.system { align-self: center; background: transparent; color: var(--soft); font-size: 0.82rem; }
.bubble.crisis {
  align-self: center;
  max-width: 92%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.7;
}

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.chat-form { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
}
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form .btn { width: auto; margin-top: 0; padding: 12px 20px; }

.connections { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; }
.connections .soft { text-align: left; }

.conn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.conn-btns { display: flex; gap: 8px; }

.incoming {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 24px;
}
.incoming.hidden { display: none; }

footer { text-align: center; margin-top: 20px; }
footer a { color: var(--soft); font-size: 0.85rem; }
footer a:hover { color: var(--accent); }
