/* ============================================================
   PRIVACY COACH — STYLESHEET
   Aesthetic: Dark editorial · Monochrome with green accent
   Fonts: Instrument Serif (display) + DM Sans (body) + DM Mono (code)
============================================================ */

:root {
  --bg-deep:      #0a0f1a;
  --bg-dark:      #0f1623;
  --bg-mid:       #161f30;
  --bg-surface:   #1c2537;
  --bg-raised:    #232d42;

  --border:       rgba(255,255,255,0.07);
  --border-mid:   rgba(255,255,255,0.12);
  --border-hi:    rgba(255,255,255,0.2);

  --text-primary: #e8edf5;
  --text-secondary: #8a9ab0;
  --text-muted:   #4a5a72;

  --green:        #4ade80;
  --green-dim:    #1a4a2e;
  --green-border: #14532d;
  --red-dim:      #450a0a;
  --red-border:   #7f1d1d;
  --red-text:     #fca5a5;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SCREENS
============================================================ */

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ============================================================
   TRUST SCREEN
============================================================ */

#screen-trust {
  position: relative;
  background: var(--bg-deep);
}

.trust-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,222,128,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.trust-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* Header */
.trust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 48px;
}

.trust-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--bg-dark);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.logo-mark span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
}

.logo-mark span:nth-child(1) { height: 8px; }
.logo-mark span:nth-child(2) { height: 12px; }
.logo-mark span:nth-child(3) { height: 6px; }

.logo-mark-sm {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.logo-mark-sm span:nth-child(1) { height: 6px; }
.logo-mark-sm span:nth-child(2) { height: 9px; }
.logo-mark-sm span:nth-child(3) { height: 5px; }

.logo-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Headline */
.trust-headline-wrap {
  margin-bottom: 52px;
  animation: fadeUp 0.6s ease both;
}

.trust-eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.trust-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.trust-headline em {
  font-style: italic;
  color: var(--text-secondary);
}

.trust-subheadline {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
}

/* Does / Doesn't grid */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.1s ease both;
}

@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; }
}

.trust-col {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.trust-col-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.col-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.col-dot-green { background: var(--green); }
.col-dot-red   { background: var(--red-text); }

.trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.trust-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
}

.trust-list-never li::before {
  background: var(--red-dim);
  border-color: var(--red-border);
}

/* How it works */
.trust-how {
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.trust-how-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.trust-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.trust-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.trust-step:last-child { border-bottom: none; }
.trust-step:hover { background: var(--bg-dark); }

.step-num {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--green);
  background: var(--bg-deep);
  border: 1px solid var(--green-border);
  border-radius: 4px;
  padding: 2px 7px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* CTA */
.trust-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeUp 0.6s 0.3s ease both;
}

.trust-cta-note {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
}

.btn-begin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #0a1a12;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: -0.01em;
}

.btn-begin:hover {
  background: #22c55e;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(74,222,128,0.2);
}

.btn-begin:active { transform: translateY(0); }

/* ============================================================
   CHAT SCREEN
============================================================ */

#screen-chat {
  display: none;
}

#screen-chat.active {
  display: flex;
  min-height: 100vh;
}

.chat-layout {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* Sidebar */
.chat-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}

@media (max-width: 640px) {
  .chat-sidebar { display: none; }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.sidebar-stages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-stage {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: default;
  transition: all 0.2s;
}

.sidebar-stage.active {
  background: rgba(74,222,128,0.08);
  color: var(--green);
}

.sidebar-stage.done {
  color: var(--text-secondary);
}

.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  flex-shrink: 0;
}

.sidebar-stage.done .stage-dot {
  background: var(--green);
  border-color: var(--green);
}

.sidebar-stage.active .stage-dot {
  background: var(--green);
  border-color: var(--green);
  animation: blink 1.5s infinite;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Chat main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
  flex-shrink: 0;
}

.chat-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s infinite;
}

.chat-status-text {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.chat-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.chat-reset:hover {
  color: var(--text-secondary);
  border-color: var(--border-mid);
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

/* Message bubbles */
.msg {
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.25s ease;
  max-width: 100%;
}

.msg.user { align-items: flex-end; }
.msg.agent { align-items: flex-start; }

.msg-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.msg-bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
}

.msg.user .msg-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: 12px 12px 3px 12px;
  color: var(--text-primary);
}

.msg.agent .msg-bubble {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 3px 12px 12px 12px;
  color: var(--text-secondary);
  max-width: 90%;
}

.msg.agent .msg-bubble strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Typing indicator */
.typing-wrap {
  display: flex;
  align-items: flex-start;
  animation: fadeUp 0.2s ease;
}

.typing-bubble {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 3px 12px 12px 12px;
  padding: 12px 16px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* Inline components in messages */
.flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px 1px;
}

.flag-red    { background: var(--red-dim); color: var(--red-text); border: 1px solid var(--red-border); }
.flag-amber  { background: #3b2a0a; color: #fcd34d; border: 1px solid #78350f; }
.flag-green  { background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border); }

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 6px 0;
  font-size: 13px;
}

.step-num-sm {
  width: 18px;
  height: 18px;
  background: var(--bg-deep);
  border: 1px solid var(--green-border);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-top: 2px;
}

.email-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 8px 0;
  white-space: pre-wrap;
}

.copy-btn {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.copy-btn:hover { border-color: var(--border-hi); color: var(--text-primary); }

/* Stage label inside message */
.stage-label {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

/* Quick options */
.chat-quick-options {
  padding: 0 20px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-opt {
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid var(--border-mid);
  background: var(--bg-dark);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  white-space: nowrap;
}

.quick-opt:hover {
  border-color: var(--green-border);
  color: var(--green);
  background: rgba(74,222,128,0.05);
}

/* Input area */
.chat-input-area {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
  flex-shrink: 0;
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: var(--text-primary);
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.15s;
}

.chat-input::placeholder { color: var(--text-muted); }
.chat-input:focus { border-color: var(--border-hi); }

.chat-send {
  width: 38px;
  height: 38px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-md);
  color: #0a1a12;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.chat-send:hover { background: #22c55e; }
.chat-send:active { transform: scale(0.95); }

.chat-input-note {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ============================================================
   ANIMATIONS
============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
