:root {
  --bg: #0d1117;
  --bg-elevated: #151b23;
  --bg-hover: #1c242e;
  --border: #2a323c;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #4aa8ff;
  --accent-dim: rgba(74, 168, 255, 0.14);
  --danger: #ff6b6b;
  --success: #3fb950;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.product-name {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.layout {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.sidebar-count {
  font-size: 12px;
  color: var(--text-muted);
}

.report-list {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-item:last-child {
  border-bottom: 0;
}

.report-item:hover {
  background: var(--bg-hover);
}

.report-item.selected {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}

.report-date {
  font-weight: 550;
  font-size: 14px;
}

.report-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.count-badge {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.report-item.selected .count-badge {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.detail {
  min-width: 0;
}

.detail-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.detail-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.detail-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.article-item:last-child {
  border-bottom: 0;
}

.article-title {
  color: var(--accent);
  text-decoration: none;
  font-weight: 550;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-title:hover {
  text-decoration: underline;
}

.article-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.feed-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.checklist-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checklist-item label {
  cursor: pointer;
}

.checklist-item.done label {
  color: var(--text-muted);
  text-decoration: line-through;
}

.state-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
}

.state-box.error {
  border-color: var(--danger);
}

.state-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.state-box.error .state-title {
  color: var(--danger);
}

.state-message {
  margin: 0 0 16px;
  font-size: 14px;
}

.retry-button {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.retry-button:hover {
  background: var(--accent);
  color: var(--bg);
}

.skeleton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line {
    animation: none;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .report-list {
    max-height: 280px;
  }

  .article-item {
    flex-direction: column;
    gap: 6px;
  }

  .detail-card {
    padding: 16px;
  }
}
