:root {
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #212529;
  --text-muted: #6c757d;
  --primary: #0d6efd;
  --border: #dee2e6;
  --tag-bg: #e9ecef;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  margin-bottom: 32px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  background: var(--tag-bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.tag.continuity {
  background: #fff3e0;
  color: #FF8C00;
}

.tag.tracked-topic {
  background: #f3e8ff;
  color: #7B2FF7;
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  font-size: 0.875rem;
  margin-top: 8px;
  color: var(--text);
}

.card-footer {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-footer a {
  color: var(--primary);
  text-decoration: none;
}

.card-footer a:hover {
  text-decoration: underline;
}

.digest-list {
  list-style: none;
}

.digest-list li {
  margin-bottom: 8px;
}

.digest-list a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1rem;
}

.digest-list a:hover {
  text-decoration: underline;
}

.digest-list .item-count {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-left: 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.back-link:hover {
  text-decoration: underline;
}

.deep-analysis-btn {
  background: #1a1a2e;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 8px;
}

.deep-analysis-btn:hover {
  background: #2d2d4e;
}

.deep-analysis-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.deep-analysis-result {
  margin-top: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.insight-box {
  background: linear-gradient(135deg, #fff5f0, #fff0e6);
  border-left: 4px solid #FF6B35;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.insight-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #FF6B35;
}

.insight-box p {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

.so-what {
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
  margin: 0.3rem 0 0;
  padding-left: 0.5rem;
  border-left: 2px solid #ddd;
}

footer {
  margin-top: 48px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
