:root {
  --navy: #1a2744;
  --navy-light: #243258;
  --gold: #c9a84c;
  --gold-light: #e8c96d;
  --gold-dim: #a07830;
  --cream: #faf8f3;
  --cream-dark: #f0ece0;
  --text: #1e1e2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --chair-color: #1a4480;
  --chair-light: #dbeafe;
  --member-color: #166534;
  --member-light: #dcfce7;
  --border: #e5e2d8;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 12px;
  --sidebar-width: 300px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  position: relative;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 10;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  font-size: 28px;
  flex-shrink: 0;
}

.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: white;
}

.app-title span {
  color: var(--gold);
  font-weight: 400;
}

/* ── Mode Selector ── */
.mode-selector {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mode-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}

.mode-toggle {
  display: flex;
  gap: 8px;
}

.mode-btn {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 8px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mode-btn:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.mode-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.mode-icon { font-size: 18px; }
.mode-text { font-size: 12px; font-weight: 600; }
.mode-sub { font-size: 10px; opacity: 0.75; }

/* ── Other Roles ── */
.other-roles-section {
  margin-top: 10px;
}

.other-roles-toggle {
  width: 100%;
  background: #dbeafe;
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.other-roles-toggle:hover {
  background: #bfdbfe;
  border-color: var(--gold-light);
}

.other-roles-toggle.open {
  background: #bfdbfe;
  border-color: var(--gold-light);
  color: var(--navy);
}

.other-roles-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.other-roles-list.hidden { display: none; }

.other-role-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 12px;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.other-role-btn:hover {
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.25);
  color: white;
}

.other-role-btn.active {
  background: rgba(201,168,76,0.2);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Scenarios ── */
.scenarios-section {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
}

.scenarios-section::-webkit-scrollbar { width: 4px; }
.scenarios-section::-webkit-scrollbar-track { background: transparent; }
.scenarios-section::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.scenarios-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
  padding: 0 4px;
}

.scenarios-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scenario-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.scenario-item:hover {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.3);
}

.scenario-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.scenario-text { font-size: 12px; line-height: 1.4; color: rgba(255,255,255,0.8); }

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.footer-btn:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

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

.mode-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chair-dot { background: var(--chair-color); }
.member-dot { background: var(--member-color); }
.secondary-dot { background: var(--gold-dim); }

.edition-badge {
  font-size: 11px;
  background: var(--navy);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Chat Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

/* ── Welcome Screen ── */
.welcome-screen {
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
  padding: 0 0 32px;
}

.welcome-icon { font-size: 56px; margin-bottom: 16px; }

.welcome-screen h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.welcome-screen > p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.welcome-modes {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.welcome-mode {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}

.welcome-mode.chair-mode { border-top: 3px solid var(--chair-color); }
.welcome-mode.member-mode { border-top: 3px solid var(--member-color); }

.wm-icon { font-size: 24px; display: block; margin-bottom: 8px; }
.welcome-mode strong { display: block; margin-bottom: 6px; font-size: 14px; }
.welcome-mode p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.welcome-mode {
  cursor: pointer;
  transition: all 0.2s;
}

.welcome-mode:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.welcome-mode.selected {
  box-shadow: 0 0 0 2px var(--gold);
}

.welcome-mode.chair-mode.selected { border-top-color: var(--chair-color); background: var(--chair-light); }
.welcome-mode.member-mode.selected { border-top-color: var(--member-color); background: var(--member-light); }

.wm-select {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.welcome-mode.selected .wm-select {
  color: var(--gold-dim);
}

.welcome-mode.selected .wm-select::before {
  content: '✓ ';
}

.welcome-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 0 !important;
}

.welcome-other-roles {
  margin: 16px 0 12px;
}

.welcome-other-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 10px;
}

.welcome-other-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.welcome-other-btn {
  background: #dbeafe;
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
}

.welcome-other-btn:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.welcome-other-btn.selected {
  background: var(--gold);
  color: var(--navy);
}

.landing-footer-note {
  background: var(--navy);
  text-align: center;
  padding: 24px 40px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  line-height: 1.7;
}
.landing-footer-note p { margin: 0 0 12px; }
.landing-footer-note strong { color: var(--gold-light); }
.ronr-affiliate-link {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.ronr-affiliate-link:hover { opacity: 0.85; }

.disclaimer {
  font-size: 11px;
  color: var(--text-light);
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px !important;
  line-height: 1.5;
  font-style: italic;
}

/* ── Auth Modal ── */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--cream-dark);
  border-radius: 10px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.auth-tab.active {
  background: white;
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 12px;
}

/* ── Paywall Modal ── */
.paywall-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.paywall-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.paywall-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.paywall-price {
  margin: 16px 0;
}

.price-amount {
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
}

.price-period {
  font-size: 16px;
  color: var(--text-muted);
}

.paywall-features {
  list-style: none;
  text-align: left;
  margin: 16px auto;
  max-width: 280px;
}

.paywall-features li {
  padding: 5px 0;
  font-size: 14px;
  color: var(--text);
}

.paywall-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 8px;
}

/* ── Account Modal ── */
.status-pro {
  background: linear-gradient(135deg, #1a2744, #c9a84c);
  color: white;
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
}

.status-free {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
}

.usage-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.account-status { margin-bottom: 4px; }

/* ── Message Bubbles ── */
.message {
  display: flex;
  gap: 12px;
  max-width: 820px;
}

.message.user-message {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.user-message .message-avatar {
  background: var(--navy);
  color: var(--gold);
}

.assistant-message .message-avatar {
  background: var(--gold);
  color: var(--navy);
}

.message-bubble {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.65;
  max-width: calc(100% - 50px);
}

.user-message .message-bubble {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  border-radius: 14px 4px 14px 14px;
}

.assistant-message .message-bubble {
  border-radius: 4px 14px 14px 14px;
}

/* Markdown within messages */
.message-bubble h1, .message-bubble h2, .message-bubble h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin: 14px 0 6px;
  font-size: 15px;
}

.message-bubble h1:first-child,
.message-bubble h2:first-child,
.message-bubble h3:first-child { margin-top: 0; }

.message-bubble p { margin-bottom: 10px; }
.message-bubble p:last-child { margin-bottom: 0; }

.message-bubble strong { font-weight: 600; color: var(--navy); }
.user-message .message-bubble strong { color: var(--gold-light); }

.message-bubble em { font-style: italic; color: var(--text-muted); }
.user-message .message-bubble em { color: rgba(255,255,255,0.75); }

.message-bubble ul, .message-bubble ol {
  margin: 8px 0 10px 18px;
}

.message-bubble li { margin-bottom: 4px; }

.message-bubble blockquote {
  border-left: 3px solid var(--gold);
  padding: 6px 12px;
  margin: 10px 0;
  background: var(--cream);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-muted);
}

.message-bubble code {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--navy);
}

.message-bubble pre {
  background: var(--navy);
  color: var(--cream);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0;
}

.message-bubble pre code {
  background: none;
  border: none;
  color: inherit;
  font-size: 13px;
}

.message-bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ── Typing Indicator ── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

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

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

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Input Area ── */
.chat-input-area {
  padding: 12px 20px 14px;
  background: white;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 8px 8px 8px 14px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--navy);
}

.input-wrapper textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  outline: none;
  max-height: 160px;
  overflow-y: auto;
}

.input-wrapper textarea::placeholder { color: var(--text-light); }

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.send-btn:hover { background: var(--navy-light); transform: scale(1.05); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.input-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
  text-align: center;
}

.input-hint kbd {
  background: var(--border);
  border: 1px solid #d1cec5;
  border-radius: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-family: inherit;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide { max-width: 880px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.modal-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--navy);
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}

.close-btn:hover { background: var(--cream-dark); color: var(--text); }

.modal-body {
  padding: 20px 24px 24px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.form-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--navy); }

.icon-btn {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.icon-btn:hover { background: var(--cream-dark); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary:hover { background: var(--navy-light); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover { background: var(--cream-dark); }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0 16px;
}

.modal-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 8px;
}

/* ── Quick Reference ── */
.ref-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.ref-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}

.ref-tab.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.ref-tab:hover:not(.active) { color: var(--text); }

.ref-panel { display: block; }
.ref-panel.hidden { display: none; }

.ref-panel h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin-bottom: 16px;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ref-table th {
  background: var(--navy);
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
}

.ref-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}

.section-header {
  background: var(--cream-dark);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 10px;
}

tr.privileged td:not(.section-header) { background: #eff6ff; }
tr.subsidiary td:not(.section-header) { background: #f0fdf4; }
tr.main td:not(.section-header) { background: #fffbeb; }
tr.incidental td:not(.section-header) { background: #fdf4ff; }
tr.recall td:not(.section-header) { background: #fff7ed; }

.order-list {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-list li {
  font-size: 14px;
  line-height: 1.5;
}

.order-list li em {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.scripts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.script-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.script-item {
  margin-bottom: 10px;
  font-size: 12px;
}

.script-label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.script-text {
  display: block;
  color: var(--text);
  line-height: 1.5;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.voting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vote-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.vote-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.vote-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.vote-card ul {
  margin-left: 16px;
  font-size: 12px;
  color: var(--text);
}

.vote-card li { margin-bottom: 3px; }

/* ── Mobile ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }
  .welcome-modes { flex-direction: column; }
  .scripts-grid { grid-template-columns: 1fr; }
  .voting-grid { grid-template-columns: 1fr; }
}

/* ── Message Wrap & Action Buttons ── */
.message-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: calc(100% - 50px);
}

.message-actions {
  display: flex;
  gap: 6px;
  padding-left: 4px;
}

.action-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ── Plain English Mode ── */
.plain-english-banner {
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
}

.plain-english-mode {
  background: #fffbeb !important;
  border-color: var(--gold) !important;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* ── Header Pricing Button ── */
.header-pricing-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.15s;
}
.header-pricing-btn:hover { background: var(--gold-light); }

/* ── Landing Page Welcome ── */
.landing-hero {
  text-align: center;
  padding: 56px 40px 48px;
  background: linear-gradient(180deg, #f9f6ef 0%, #ffffff 100%);
  border-bottom: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(26,39,68,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.landing-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.landing-title {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.landing-title-accent {
  color: var(--gold);
  display: block;
}
.landing-tagline {
  font-size: 16px;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.landing-cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.landing-cta-btn {
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 10px;
}
.landing-cta-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.landing-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201,168,76,0.5);
}
.landing-cta-btn.btn-secondary {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.landing-cta-btn.btn-secondary:hover {
  background: var(--navy);
  color: white;
}
.landing-hero-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Stats Bar ── */
.landing-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--navy);
  padding: 18px 32px;
  flex-wrap: wrap;
}
.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
  text-align: center;
}
.stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  font-family: 'Playfair Display', serif;
  line-height: 1;
  margin-bottom: 3px;
}
.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.landing-feature {
  background: white;
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: background 0.15s;
}
.landing-feature:hover { background: var(--cream); }
.landing-feature:last-child { border-right: none; }
.lf-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.landing-feature strong { display: block; color: var(--navy); margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.landing-feature p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin: 0; }

.landing-roles-section {
  padding: 40px 40px 16px;
  background: var(--cream);
  border-top: 1px solid var(--border);
}
.landing-roles-label {
  text-align: center;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  font-size: 24px;
  font-family: 'Playfair Display', serif;
}
.landing-roles-section .welcome-modes {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.landing-roles-section .welcome-other-roles {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── How It Works ── */
.how-it-works {
  padding: 36px 40px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.hiw-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 28px;
}
.hiw-steps {
  display: flex;
  align-items: stretch;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.hiw-step {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px 20px;
  text-align: center;
  position: relative;
  border-top: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.hiw-num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
}
.hiw-icon { font-size: 36px; margin: 6px 0 10px; display: block; }
.hiw-step strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 8px; font-weight: 700; }
.hiw-step p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.hiw-arrow { font-size: 24px; color: var(--gold); flex-shrink: 0; align-self: center; font-weight: 700; }

/* ── Sample Chat Preview ── */
.sample-chat {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 32px 40px;
}
.sample-chat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
}
.sample-chat-inner {
  max-width: 760px;
  margin: 0 auto;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.sample-q, .sample-a {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.sample-avatar { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.sample-bubble {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}
.sample-user {
  background: var(--navy);
  color: white;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(26,39,68,0.2);
}
.sample-ai {
  background: white;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sample-section {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text);
}
.sample-section strong { color: var(--navy); }
.sample-section em {
  display: block;
  background: #f0ece0;
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  margin-top: 6px;
  border-radius: 0 6px 6px 0;
  font-style: normal;
  font-size: 13px;
  color: var(--navy);
}
.sample-cite {
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .landing-title { font-size: 34px; }
  .hiw-steps { flex-direction: column; }
  .hiw-arrow { transform: rotate(90deg); }
  .how-it-works, .sample-chat { padding: 20px 16px; }
  .landing-stats-bar { gap: 8px; }
  .landing-stat { padding: 0 16px; }
  .stat-divider { height: 24px; }
  .landing-features { grid-template-columns: repeat(2, 1fr); }
}

/* ── Free Trial Banner ── */
.free-trial-banner {
  background: linear-gradient(135deg, #1a4480, #243258);
  color: white;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  margin: 12px 0;
  text-align: center;
  border: 1px solid var(--gold);
}

/* ── Pricing Modal ── */
.modal-pricing { max-width: 760px; }
.modal-pricing .modal-body { padding: 16px 24px 24px; }

.billing-toggle {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}
.billing-btn {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.billing-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.save-badge {
  background: #16a34a;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.annual-perks-bar {
  background: linear-gradient(135deg, #1a4480, #243258);
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  text-align: center;
  margin-bottom: 14px;
  border: 1px solid var(--gold);
}
.annual-perks-bar strong { color: var(--gold-light); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-card-featured {
  border-color: var(--gold);
  border-width: 2px;
  background: #fffbeb;
}
.price-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  width: fit-content;
}
.price-tier-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.price-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.price-amount-wrap .price-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}
.price-amount-wrap .price-period {
  font-size: 12px;
  color: var(--text-muted);
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.price-btn {
  width: 100%;
  margin-top: auto;
}

/* ── Boost Section ── */
.boost-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.boost-title {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}
.boost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.boost-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: white;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.boost-card:hover {
  border-color: var(--navy);
  background: var(--cream);
}
.boost-qty { font-weight: 700; font-size: 14px; color: var(--navy); }
.boost-price { font-size: 18px; font-weight: 700; color: var(--gold-dim); margin: 4px 0; }
.boost-note { font-size: 10px; color: var(--text-muted); }

@media (max-width: 640px) {
  .pricing-grid, .boost-grid { grid-template-columns: 1fr; }
  .modal-pricing { max-width: 100%; }
}
