/* === CHATSIGHT DESIGN SYSTEM === */
:root {
  --bg: #0F1C2E;
  --surface: #162136;
  --surface2: #1C2B44;
  --fg: #F4EFE6;
  --fg-muted: rgba(244,239,230,0.55);
  --fg-dim: rgba(244,239,230,0.3);
  --coral: #E05A47;
  --coral-dim: rgba(224,90,71,0.15);
  --sage: #5BAF7C;
  --sage-dim: rgba(91,175,124,0.15);
  --violet: #8B6FE8;
  --violet-dim: rgba(139,111,232,0.15);
  --amber: #E8A847;
  --border: rgba(244,239,230,0.08);
  --border-bright: rgba(244,239,230,0.15);
  --radius: 14px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet); color: var(--fg); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle at center, rgba(139,111,232,0.12) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244,239,230,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,230,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-content { position: relative; z-index: 1; max-width: 820px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 8px var(--sage);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--coral);
}

.hero-lede {
  font-size: clamp(17px, 2.5vw, 21px);
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.5;
  font-weight: 400;
}

/* === CHAT VISUAL === */
.chat-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
  max-width: 640px;
  position: relative;
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble-wrap.person-a { align-items: flex-start; }
.chat-bubble-wrap.person-b { align-items: flex-end; }

.chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--fg);
  max-width: 220px;
  line-height: 1.5;
}

.chat-bubble.person-a { border-bottom-left-radius: 4px; }
.chat-bubble.person-b { border-bottom-right-radius: 4px; background: var(--surface2); }

.chat-connector {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* === ANALYSIS VISUAL === */
.analysis-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* === FEATURE TAGS === */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.ftag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.ftag-red { background: var(--coral-dim); border-color: rgba(224,90,71,0.3); color: var(--coral); }
.ftag-green { background: var(--sage-dim); border-color: rgba(91,175,124,0.3); color: var(--sage); }
.ftag-violet { background: var(--violet-dim); border-color: rgba(139,111,232,0.3); color: var(--violet); }
.ftag-amber { background: rgba(232,168,71,0.1); border-color: rgba(232,168,71,0.3); color: var(--amber); }

/* === SECTIONS === */
section { padding: 100px 24px; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-subtext {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.6;
}

/* === ANALYSIS SECTION === */
.analysis-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.analysis-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.analysis-header {
  text-align: center;
  margin-bottom: 64px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

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

.analysis-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.analysis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
}

.analysis-card.coral::before { background: var(--coral); }
.analysis-card.sage::before { background: var(--sage); }
.analysis-card.violet::before { background: var(--violet); }
.analysis-card.amber::before { background: var(--amber); }

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
}

.card-icon-red { background: var(--coral-dim); }
.card-icon-green { background: var(--sage-dim); }
.card-icon-violet { background: var(--violet-dim); }
.card-icon-amber { background: rgba(232,168,71,0.1); }

.analysis-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.analysis-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* === SAMPLE ANALYSIS === */
.sample-analysis {
  background: var(--bg);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 24px;
}

.sa-header {
  background: var(--surface2);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-muted);
}

.sa-dots { display: flex; gap: 5px; }
.sa-dot { width: 10px; height: 10px; border-radius: 50%; }
.sa-dot:nth-child(1) { background: var(--coral); }
.sa-dot:nth-child(2) { background: var(--amber); }
.sa-dot:nth-child(3) { background: var(--sage); }

.sa-body { padding: 20px; }

.sa-row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

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

.sa-label {
  width: 110px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  padding-top: 2px;
  flex-shrink: 0;
}

.sa-value {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
}

.sa-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.sa-badge-red { background: var(--coral-dim); color: var(--coral); }
.sa-badge-green { background: var(--sage-dim); color: var(--sage); }
.sa-badge-violet { background: var(--violet-dim); color: var(--violet); }

.sa-compat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sa-bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.sa-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sage) 0%, var(--amber) 100%);
  width: 72%;
}

.sa-bar-num { font-size: 12px; font-weight: 700; color: var(--sage); min-width: 32px; }

/* === METRICS STRIP === */
.metrics-strip {
  padding: 60px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metrics-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .metrics-inner { grid-template-columns: repeat(2, 1fr); }
}

.metric-card {
  text-align: center;
  padding: 28px 20px;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.metric-num.coral { color: var(--coral); }
.metric-num.sage { color: var(--sage); }
.metric-num.violet { color: var(--violet); }
.metric-num.amber { color: var(--amber); }

.metric-label {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* === HOW IT WORKS === */
.how-section { max-width: 1100px; margin: 0 auto; }

.how-header { text-align: center; margin-bottom: 64px; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

.step-card {
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.step-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--fg-dim);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.step-icon {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  opacity: 0.2;
}

/* === CLOSING === */
.closing {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 120px 24px;
  position: relative;
  overflow: hidden;
}

.closing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.closing-glow {
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91,175,124,0.08) 0%, transparent 60%);
  border-radius: 50%;
}

.closing-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--coral);
  color: var(--fg);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
}

.cta-btn:hover { opacity: 0.88; }
.cta-btn:active { transform: scale(0.97); }

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.closing h2 em {
  font-style: normal;
  color: var(--sage);
}

.closing p {
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 40px;
  line-height: 1.5;
}

.closing-note {
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

/* === FOOTER === */
footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.footer-brand span { color: var(--coral); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links li a {
  font-size: 12px;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links li a:hover { color: var(--fg-muted); }

@media (max-width: 600px) {
  footer { flex-direction: column; gap: 20px; text-align: center; }
}

/* === ATTACHMENT VISUAL === */
.attach-visual {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  justify-content: center;
}

.attach-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.attach-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.attach-node.secure .attach-circle { border-color: var(--sage); color: var(--sage); background: var(--sage-dim); }
.attach-node.anxious .attach-circle { border-color: var(--coral); color: var(--coral); background: var(--coral-dim); }
.attach-node.avoidant .attach-circle { border-color: var(--violet); color: var(--violet); background: var(--violet-dim); }
.attach-node.disorganized .attach-circle { border-color: var(--amber); color: var(--amber); background: rgba(232,168,71,0.1); }

/* === DECORATIVE SVGs === */

/* Flag indicators */
.flag-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--fg-muted);
}

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

.flag-dot-red { background: var(--coral); box-shadow: 0 0 6px var(--coral); }
.flag-dot-green { background: var(--sage); box-shadow: 0 0 6px var(--sage); }

/* Signal lines (decorative) */
.signal-lines {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
}

/* Compatibility meter */
.compat-visual {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.compat-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--sage);
  border-top-color: var(--surface2);
  position: relative;
  flex-shrink: 0;
}

.compat-ring::after {
  content: '72%';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--sage);
}

/* === ANALYZER PAGE === */
.analyzer-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(15, 28, 46, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.analyzer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.analyzer-header nav { display: flex; gap: 16px; }
.nav-link { font-size: 13px; color: var(--fg-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--fg); }

.analyzer-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.analyzer-hero {
  text-align: center;
  padding: 60px 0 48px;
}

.analyzer-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.analyzer-hero h1 em { font-style: normal; color: var(--coral); }

.analyzer-lede {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Workspace */
.analyzer-workspace { display: flex; flex-direction: column; gap: 24px; }

/* Input Panel */
.input-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}

.panel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.conversation-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  padding: 20px;
  resize: vertical;
  min-height: 200px;
  outline: none;
}

.conversation-textarea::placeholder { color: var(--fg-dim); }

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(15, 28, 46, 0.3);
}

.char-count { font-size: 11px; color: var(--fg-dim); font-weight: 500; }

/* Upload Zone */
.upload-zone {
  position: relative;
  padding: 20px 20px 0;
}

.upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  border: 1.5px dashed var(--border-bright);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.upload-zone-inner:hover,
.upload-zone-inner.drag-over {
  border-color: var(--coral);
  background: rgba(224, 90, 71, 0.04);
}

.upload-label {
  font-size: 13px;
  color: var(--fg-muted);
}

.upload-browse-btn {
  color: var(--coral);
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-hint {
  font-size: 11px;
  color: var(--fg-dim);
}

.upload-input {
  position: absolute;
  inset: 20px 20px auto auto;
  opacity: 0;
  width: calc(100% - 40px);
  height: 56px;
  cursor: pointer;
  z-index: 1;
}

.upload-input:focus + .upload-zone-inner {
  border-color: var(--coral);
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0;
}

.upload-progress.hidden { display: none; }

.ocr-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.ocr-progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.ocr-progress-text {
  font-size: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0;
}

.upload-preview.hidden { display: none; }

#upload-preview-img {
  max-width: 80px;
  max-height: 60px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.upload-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.upload-clear-btn:hover {
  background: var(--coral);
  color: var(--fg);
  border-color: var(--coral);
}

.upload-failure {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  font-size: 12px;
  color: var(--amber);
}

.upload-failure.hidden { display: none; }

.upload-thumb-strip {
  display: flex;
  gap: 8px;
  padding: 10px 0 0;
  flex-wrap: wrap;
}

.upload-thumb-strip.hidden { display: none; }

.upload-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(20, 20, 30, 0.8);
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}

.upload-thumb.processing {
  border-color: var(--coral);
  opacity: 0.7;
}

.upload-thumb.done {
  border-color: var(--sage);
}

.upload-thumb.done .upload-thumb-badge {
  background: var(--sage);
  color: var(--fg);
}

.upload-thumb.failed {
  border-color: var(--coral);
  opacity: 0.5;
}

.analyze-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--coral);
  color: var(--fg);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: var(--font-body);
}

.analyze-btn:hover:not(:disabled) { opacity: 0.88; }
.analyze-btn:active:not(:disabled) { transform: scale(0.97); }
.analyze-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Results Panel */
.results-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.results-panel.hidden { display: none; }
.results-content.hidden { display: none; }
.error-state.hidden { display: none; }

/* Loading */
.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 16px;
}

.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border-bright);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.results-loading p { font-size: 14px; color: var(--fg-muted); }

/* Compatibility Score */
.compat-score-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--border);
}

.compat-ring-large {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 4px solid var(--sage);
  border-top-color: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transform: rotate(-45deg);
}

.compat-ring-large::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--sage);
}

.compat-ring-large span {
  transform: rotate(45deg);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--sage);
}

.compat-meta { flex: 1; }

.compat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

.compat-summary { font-size: 14px; color: var(--fg-muted); line-height: 1.5; }

/* Result Sections */
.result-section { padding: 24px 28px; border-bottom: 1px solid var(--border); }

.result-section:last-of-type { border-bottom: none; }

.result-section .section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.count-badge.red { background: var(--coral-dim); color: var(--coral); }
.count-badge.green { background: var(--sage-dim); color: var(--sage); }

/* Attachment Cards */
.attachment-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.attach-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.attach-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 10px;
}

.attach-style-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.attach-style-badge.violet { background: var(--violet-dim); color: var(--violet); }
.attach-style-badge.coral { background: var(--coral-dim); color: var(--coral); }
.attach-style-badge.sage { background: var(--sage-dim); color: var(--sage); }
.attach-style-badge.amber { background: rgba(232,168,71,0.1); color: var(--amber); }

.attach-desc { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }

/* Flag Lists */
.flag-list { display: flex; flex-direction: column; gap: 10px; }

.flag-item-card {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.flag-dot-sm {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.flag-dot-sm.red { background: var(--coral); box-shadow: 0 0 6px var(--coral); }
.flag-dot-sm.green { background: var(--sage); box-shadow: 0 0 6px var(--sage); }

.flag-content { flex: 1; }

.flag-text { font-size: 13px; color: var(--fg); line-height: 1.4; margin-bottom: 4px; }

.flag-quote {
  font-size: 11px;
  color: var(--fg-dim);
  font-style: italic;
  line-height: 1.4;
}

/* Insights */
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.insight-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.insight-card.full-width { grid-column: 1 / -1; }

.insight-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 8px;
}

.insight-value { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }

/* Reset Button */
.reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 56px);
  margin: 20px 28px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-body);
}

.reset-btn:hover { border-color: var(--border-bright); color: var(--fg); }

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  gap: 12px;
  text-align: center;
}

.error-state p { font-size: 14px; color: var(--fg-muted); }

.retry-btn {
  padding: 8px 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s, color 0.2s;
}

.retry-btn:hover { border-color: var(--border-bright); color: var(--fg); }

/* Mobile */
@media (max-width: 480px) {
  .hero h1 { font-size: 44px; }
  .attach-visual { flex-wrap: wrap; gap: 12px; }
  .attach-circle { width: 56px; height: 56px; font-size: 10px; }
  .analyzer-header { padding: 12px 16px; }
  .attachment-cards { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .compat-ring-large { width: 64px; height: 64px; }
  .compat-ring-large span { font-size: 16px; }
}

/* === PAYWALL === */
.paywall-section {
  margin: 0 28px 28px;
  padding-top: 4px;
}

.paywall-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.paywall-card {
  background: linear-gradient(135deg, #16161F 0%, #1C1B2A 100%);
  border: 1px solid rgba(232,168,71,0.25);
  border-radius: 14px;
  padding: 28px;
}

.paywall-cta {
  text-align: center;
  margin-bottom: 24px;
}

.paywall-headline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.paywall-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--amber);
}

.price-note {
  font-size: 13px;
  color: var(--fg-dim);
}

.paywall-includes { margin-bottom: 24px; }

.includes-label {
  font-size: 12px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.includes-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.includes-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--fg-muted);
}

.paywall-form { display: flex; flex-direction: column; gap: 10px; }

.form-row { display: flex; gap: 8px; }

.paywall-email-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.paywall-email-input::placeholder { color: var(--fg-dim); }
.paywall-email-input:focus { border-color: var(--amber); }

.paywall-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--coral);
  color: var(--fg);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: opacity 0.2s, transform 0.1s;
}

.paywall-checkout-btn:hover:not(:disabled) { opacity: 0.88; }
.paywall-checkout-btn:active:not(:disabled) { transform: scale(0.98); }
.paywall-checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.paywall-error {
  font-size: 12px;
  color: var(--coral);
  text-align: center;
}

.paywall-error.hidden { display: none; }

/* Unlocked page */
.unlocked-hero { text-align: center; padding: 60px 0 40px; }
.unlocked-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sage-dim);
  color: var(--sage);
  border: 1px solid rgba(91,175,124,0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.unlocked-sub { color: var(--fg-muted); font-size: 14px; margin-top: 10px; }

/* Report page */
.unlocked-hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.cta-footer { padding: 20px 28px; border-top: 1px solid var(--border); text-align: center; }

.analyze-another-btn {
  display: inline-block;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.analyze-another-btn:hover { border-color: var(--border-bright); color: var(--fg); }

.paid-exclusive { border-top: 1px dashed var(--border); margin-top: 8px; }
