:root {
  --bg: #070a12;
  --card: rgba(15, 22, 36, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --cyan: #00e5ff;
  --emerald: #10b981;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --subtle: #64748b;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 12%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 88% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
}

.shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.4rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.9rem; }
.logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.brand h1 { font-size: 1.35rem; font-weight: 800; }
.accent { color: var(--cyan); }
.subtitle { font-size: 0.78rem; color: var(--muted); }

.nav-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.ai-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.score-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.big-num { font-family: var(--font-mono); font-size: 1.85rem; font-weight: 800; }
.sub { font-size: 0.75rem; color: var(--subtle); font-family: var(--font-mono); }
.text-green { color: var(--emerald); }
.text-rose { color: var(--rose); }
.text-cyan { color: var(--cyan); }

.progress-track { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--rose), var(--amber), var(--emerald)); transition: width 0.35s ease; }

.workspace, .diagnostics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 960px) {
  .workspace, .diagnostics-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-head {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.panel-head h3 { font-size: 0.95rem; font-weight: 700; }
.head-tools { display: flex; gap: 0.5rem; }

textarea {
  width: 100%;
  height: 300px;
  background: transparent;
  border: none;
  padding: 1.15rem 1.25rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-sm { padding: 0.38rem 0.72rem; font-size: 0.76rem; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), #00a8ff); color: #070a12; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border); color: var(--text); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.upload-label { cursor: pointer; }

.kw-sections {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.kw-sections h4 { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kw-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.kw-chip.hit { background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.kw-chip.miss { background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.35); color: #fda4af; }

.bullet-audit {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
}
.bullet-item {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.81rem;
}
.bullet-item.strong { border-left-color: var(--emerald); }
.bullet-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--amber); margin-top: 0.35rem; }
.bullet-item.strong .bullet-meta { color: var(--emerald); }
.ai-rewrite-box {
  margin-top: 0.45rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #a5f3fc;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.empty-msg { color: var(--subtle); font-size: 0.84rem; text-align: center; padding: 1.5rem 0; }

.footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--subtle);
}
.footer a { color: var(--cyan); text-decoration: none; }

