/* ═══════════════════════════════════════════════════════
   RESET & ROOT
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --bg:          #022D38;
  --ink:         #A4CBD5;
  --ink-mid:     rgba(164, 203, 213, 0.65);
  --ink-low:     rgba(164, 203, 213, 0.45);
  --ink-faint:   rgba(164, 203, 213, 0.15);
  --accent:      #A4CBD5;
  --accent-hi:   #c8ff00;   /* one electric moment — used very sparingly */
  --rule:        rgba(164, 203, 213, 0.15);
  --rule-strong: rgba(164, 203, 213, 0.3);

  /* Type */
  --font:        'Source Code Pro', 'Courier New', monospace;
  --size-xs:     13px;
  --size-sm:     14px;
  --size-base:   15px;
  --size-md:     17px;
  --size-lg:     19px;

  /* Layout */
  --sidebar-w:   240px;
  --header-h:    44px;
  --input-h:     52px;
  --gap:         24px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.4s ease;
}

.auth-screen.fading { opacity: 0; pointer-events: none; }

.auth-inner {
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Top label */
.auth-eyebrow {
  font-size: var(--size-xs);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-low);
  margin-bottom: 28px;
}

/* The name — big, confident */
.auth-name {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.auth-role {
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

/* Input wrapper — animates on error */
.auth-field {
  position: relative;
  margin-bottom: 14px;
}

.auth-field.shake {
  animation: authShake 0.35s ease;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px); }
  45%       { transform: translateX(6px); }
  70%       { transform: translateX(-4px); }
  85%       { transform: translateX(4px); }
}

.auth-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 10px;
  transition: border-color 0.2s;
}

.auth-field.error .auth-input-row {
  border-bottom-color: var(--ink);
}

.auth-caret {
  color: var(--ink-mid);
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.2s;
}

.auth-field.error .auth-caret {
  color: var(--ink);
}

.auth-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: var(--size-md);
  color: var(--ink);
  letter-spacing: 0.08em;
  padding: 0;
}

.auth-input::placeholder { color: var(--ink-low); letter-spacing: 0.06em; }

/* Submit button — appears as a small tag to the right */
.auth-submit {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--rule-strong);
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.1em;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-submit:hover { border-color: var(--ink); color: var(--ink); }

.auth-submit.loading {
  opacity: 0.4;
  pointer-events: none;
}

/* Error message — stays visible until next attempt */
.auth-error {
  font-size: var(--size-xs);
  color: var(--ink);
  letter-spacing: 0.08em;
  min-height: 18px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s, transform 0.2s;
  padding-top: 2px;
}

.auth-error.visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-hint {
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.08em;
  margin-top: 24px;
}


/* ═══════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap);
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
  gap: 16px;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 0.1s;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.header-name {
  font-size: var(--size-base);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.header-divider {
  color: var(--ink-low);
}

.header-title {
  font-size: var(--size-sm);
  color: var(--ink-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-mid);
  letter-spacing: 0.08em;
  padding: 4px 0;
  transition: color 0.15s;
}

.nav-btn:hover { color: var(--ink); }

/* Tone toggle */
.tone-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.tone-label {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  letter-spacing: 0.06em;
  transition: color 0.2s;
  min-width: 130px;
  text-align: right;
}

.tone-toggle.hard .tone-label { color: var(--ink); }

.tone-switch {
  width: 28px;
  height: 15px;
  background: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 8px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.tone-toggle.hard .tone-switch {
  background: var(--ink);
  border-color: var(--ink);
}

.tone-pip {
  position: absolute;
  top: 2px; left: 2px;
  width: 9px; height: 9px;
  background: var(--ink-mid);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.tone-toggle.hard .tone-pip {
  transform: translateX(13px);
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════════
   BODY GRID
═══════════════════════════════════════════════════════ */
.body-grid {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  overflow: hidden;
  min-height: 0;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.sidebar {
  border-right: 1px solid var(--rule);
  padding: var(--gap) 20px var(--input-h) 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 0.2s;
  position: relative;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-section { padding: 16px 0; }

.sidebar-heading {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  margin-bottom: 12px;
}

/* Status grid */
.status-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  align-items: start;
}

.status-key {
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-val {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  letter-spacing: 0.04em;
  word-break: break-word;
  transition: color 0.3s;
}

.status-val.updated {
  color: var(--ink);
  animation: flashIn 0.5s ease;
}

@keyframes flashIn {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.sidebar-rule {
  height: 1px;
  background: var(--rule);
  margin: 0 0 0 0;
}

/* Skills */
.skills-counter {
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.skills-counter span { color: var(--ink-mid); }

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

.skill-item {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: skillReveal 0.4s ease forwards;
  opacity: 0;
}

.skill-item::before {
  content: '+';
  color: var(--ink-low);
  flex-shrink: 0;
  font-size: 10px;
}

@keyframes skillReveal {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Triforce easter egg */
.sidebar-triforce {
  position: absolute;
  bottom: calc(var(--input-h) + 20px);
  right: 16px;
  width: 20px;
  cursor: pointer;
  opacity: 0.04;
  transition: opacity 0.3s ease;
}

.sidebar-triforce:hover { opacity: 0.35; }

.triforce-svg { width: 100%; height: auto; }

.tri { fill: var(--ink); }
.tri-bg { fill: var(--bg); }  /* The negative space triangle */

/* ═══════════════════════════════════════════════════════
   SIDEBAR TEXT
═══════════════════════════════════════════════════════ */
.sidebar .sidebar-section {
  opacity: 0.8;
}

.sidebar .sidebar-section .sidebar-heading,
.sidebar .sidebar-section .status-key,
.sidebar .sidebar-section .status-val,
.sidebar .sidebar-section .status-val.updated,
.sidebar .sidebar-section .skills-counter,
.sidebar .sidebar-section .skills-counter span,
.sidebar .sidebar-section .skill-item {
  color: #A4CBD5;
}

.sidebar .sidebar-section .skill-item::before {
  color: #A4CBD5;
}

/* ═══════════════════════════════════════════════════════
   CHAT AREA
═══════════════════════════════════════════════════════ */
.chat-area {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 36px var(--gap) calc(var(--input-h) + 36px) var(--gap);
  scroll-behavior: smooth;
  min-height: 0;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 0.25s;
}

.chat-area::-webkit-scrollbar { width: 3px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background: var(--rule); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 560px;
}

.empty-line {
  font-size: var(--size-md);
  color: var(--ink);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.suggestions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.suggestion {
  background: none;
  border: none;
  border-top: 1px solid var(--rule);
  padding: 10px 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-sm);
  color: var(--ink-mid);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.12s;
  gap: 12px;
}

.suggestion:last-child { border-bottom: 1px solid var(--rule); }

.suggestion::after {
  content: '→';
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.12s, transform 0.12s;
  flex-shrink: 0;
  font-size: var(--size-xs);
}

.suggestion:hover { color: var(--ink); }
.suggestion:hover::after { opacity: 1; transform: translateX(0); }

/* Messages */
.messages {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.msg {
  padding: 16px 0;
  border-top: 1px solid var(--ink-faint);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 16px;
  opacity: 0;
  animation: msgIn 0.3s ease forwards;
}

.msg:first-child { border-top: none; }

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

.msg-who {
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.1em;
  padding-top: 2px;
  text-align: right;
}

.msg.user .msg-who { color: var(--ink-mid); }

.msg-text {
  font-size: var(--size-base);
  color: var(--ink);
  line-height: 1.65;
  max-width: 580px;
  position: relative;
}

.msg.user .msg-text {
  color: var(--ink);
  font-weight: 400;
}

.msg.assistant .msg-text {
  color: var(--ink);
  font-weight: 300;
}

.msg-text p { margin-bottom: 8px; }
.msg-text p:last-child { margin-bottom: 0; }
.msg-text strong { font-weight: 500; }
.msg-text em { font-style: italic; opacity: 0.8; }
.msg-text ul { padding-left: 16px; margin: 6px 0; }
.msg-text li { margin-bottom: 3px; }

/* Copy button — appears on assistant message hover */
.msg-copy {
  position: absolute;
  top: 0; right: -28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-low);
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  letter-spacing: 0.06em;
}

.msg.assistant:hover .msg-copy { opacity: 1; }
.msg-copy:hover { color: var(--ink-mid); }
.msg-copy.copied { color: var(--ink-mid); }

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

.td {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-low);
  animation: tdot 1s ease-in-out infinite;
}
.td:nth-child(2) { animation-delay: 0.15s; }
.td:nth-child(3) { animation-delay: 0.3s; }

@keyframes tdot {
  0%, 60%, 100% { transform: scale(1); opacity: 0.35; }
  30% { transform: scale(1.5); opacity: 0.9; }
}

/* ═══════════════════════════════════════════════════════
   FLOATING INPUT BAR
═══════════════════════════════════════════════════════ */
.input-bar {
  position: fixed;
  bottom: 0;
  /* Width = full viewport minus sidebar */
  left: var(--sidebar-w);
  right: 0;
  height: var(--input-h);
  background: var(--bg);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  padding: 0 var(--gap);
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 0.3s;
  z-index: 10;
}

.input-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 680px;
}

.input-caret {
  color: var(--ink-mid);
  font-size: var(--size-md);
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  outline: none;
  font-family: var(--font);
  font-size: var(--size-base);
  color: var(--ink);
  resize: none;
  line-height: 1.55;
  max-height: 80px;
  padding: 4px 0;
  transition: border-color 0.15s;
  letter-spacing: 0.01em;
}

.chat-input:focus { border-bottom-color: var(--ink-low); }
.chat-input::placeholder { color: var(--ink-low); }

.send-btn {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--ink);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  transition: background 0.15s, transform 0.1s;
}

.send-btn:hover { background: var(--ink-mid); }
.send-btn:active { transform: scale(0.92); }
.send-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* Send button spinner state */
.send-btn.loading svg { display: none; }
.send-btn.loading::after {
  content: '';
  width: 8px; height: 8px;
  border: 1px solid rgba(2,45,56,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Input shake on empty submit */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
}

.input-bar.shake { animation: shake 0.3s ease; }

/* Locked state — input disabled by AI tag */
.input-bar.locked .chat-input,
.input-bar.locked .send-btn {
  opacity: 0.25;
  pointer-events: none;
}

.input-bar.locked .input-caret {
  opacity: 0.25;
}

/* ═══════════════════════════════════════════════════════
   RIGHT DRAWER
═══════════════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  background: var(--bg);
  border-left: 1px solid var(--rule);
  z-index: 51;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.drawer.is-visible {
  transform: translateX(0);
}

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

.drawer-title {
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  color: var(--ink-mid);
}

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-low);
  padding: 4px;
  transition: color 0.15s;
}

.drawer-close:hover { color: var(--ink); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.drawer-body::-webkit-scrollbar { width: 3px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--rule); }

.drawer-section { display: flex; flex-direction: column; gap: 12px; }

.drawer-section-label {
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  color: var(--ink-low);
  text-transform: lowercase;
}

.drawer-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
}

.drawer-grid span:nth-child(odd) {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  white-space: nowrap;
}

.drawer-grid span:nth-child(even) {
  font-size: var(--size-xs);
  color: var(--ink-low);
  line-height: 1.5;
}

.drawer-steps {
  list-style: decimal;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-steps li {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  line-height: 1.55;
}

.drawer-section p {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: fixed;
  top: 50%; left: 50%;
  width: min(600px, calc(100vw - 48px));
  max-height: 80vh;
  background: var(--bg);
  border: 1px solid var(--rule);
  z-index: 61;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Start hidden — transform + opacity controlled by class */
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  color: var(--ink-mid);
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-low);
  padding: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.modal-close:hover { color: var(--ink); }

.modal-tabs {
  display: flex;
  gap: 12px;
}

.modal-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.08em;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.modal-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
}

.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--rule); }

/* Principles modal */
.principle {
  padding: 16px 0;
  border-top: 1px solid var(--ink-faint);
}

.principle:first-child { border-top: none; padding-top: 0; }

.principle-statement {
  font-size: var(--size-base);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.principle-body {
  font-size: var(--size-sm);
  color: var(--ink-mid);
  line-height: 1.6;
  font-weight: 300;
}

/* Prompt modal */
.prompt-intro {
  font-size: var(--size-xs);
  color: var(--ink-low);
  line-height: 1.6;
  margin-bottom: 20px;
}

.prompt-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--size-xs);
}

.prompt-line {
  color: var(--ink-mid);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.prompt-redacted {
  color: var(--ink-low);
  letter-spacing: 0.05em;
  user-select: none;
}

/* Annotated view */
.prompt-block.annotated {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.annotation-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-faint);
}

.annotation-row:last-child { border-bottom: none; }

.annotation-code {
  font-size: var(--size-xs);
  color: var(--ink-mid);
  line-height: 1.5;
}

.annotation-note {
  font-size: var(--size-xs);
  color: var(--ink-low);
  line-height: 1.6;
  font-style: italic;
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

/* ═══════════════════════════════════════════════════════
   SYSTEM MESSAGES (easter egg output, errors)
═══════════════════════════════════════════════════════ */
.sys-msg {
  padding: 10px 0;
  font-size: var(--size-xs);
  color: var(--ink-low);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--ink-faint);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 16px;
}

.sys-msg.error { color: var(--ink-mid); }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .input-bar { left: 0; }
  .header-title { display: none; }
  .drawer { width: 100%; }
}
