@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local("Inter"), local("Inter Regular");
}
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --add: #16a34a;
  --improve: #0ea5e9;
  --fix: #ef4444;
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html, body {
  padding: 0;
  margin: 0;
  background: #f7f8fa;
  background: var(--bg);
  color: #1f2937;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a {
  color: var(--primary);
  text-decoration: none;
}
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  box-shadow: var(--shadow);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
}
.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}
.nav a {
  color: #1f2937;
  color: var(--text);
  font-size: 14px;
}
.container {
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 20px 40px;
}
.hero {
  background: #ffffff;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  box-shadow: var(--shadow);
  padding: 28px 28px;
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0.3px;
}
.hero p {
  margin: 0;
  color: #6b7280;
  color: var(--muted);
  font-size: 14px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.toolbar .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.search {
  position: relative;
  flex: 1;
}
.search input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 12px 0 36px;
  font-size: 14px;
  outline: none;
}
.search .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.6;
}
.filters {
  display: flex;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  border: 1px solid var(--border);
  background: #fff;
  color: #1f2937;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.chip:disabled,
.chip.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chip.active {
  border-color: #2563eb;
  border-color: var(--primary);
  color: #2563eb;
  color: var(--primary);
  background: #eef2ff;
}
.stats {
  margin-left: auto;
  color: #6b7280;
  color: var(--muted);
  font-size: 12px;
  padding-top: 4px;
}
.card {
  background: #ffffff;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 16px;
}
.timeline {
  position: relative;
  padding-left: 0;
  margin-top: 12px;
}
.timeline::before {
  content: none;
}
.group {
  position: relative;
  margin: 20px 0;
}
.node {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2563eb;
  background: var(--primary);
  box-shadow: 0 0 0 4px #eef2ff;
}
.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-left: 28px;
}
.group-header .toggle {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
  color: var(--muted);
  cursor: pointer;
}
.group.collapsed .group-body {
  display: none;
}
.group.collapsed .toggle {
  color: #2563eb;
  color: var(--primary);
}
.date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  color: var(--primary);
  border: 1px solid #e6eaff;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
}
.group-title {
  color: #1f2937;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.group-body {
  margin-left: 0;
}
.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.log-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 6px;
  border-bottom: 1px dashed #e5e7eb;
  border-bottom: 1px dashed var(--border);
  border-radius: 10px;
  transition: background 180ms ease, box-shadow 180ms ease;
}
.log-item:last-child {
  border-bottom: none;
}
.log-item:hover {
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 70%);
}
.index {
  color: #6b7280;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.content {
  font-size: 15px;
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  align-items: flex-start;
}
.content .type {
  white-space: nowrap;
}
.content .text {
  white-space: pre-line;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}
.badge.add {
  background: #16a34a;
  background: var(--add);
}
.badge.improve {
  background: #0ea5e9;
  background: var(--improve);
}
.badge.fix {
  background: #ef4444;
  background: var(--fix);
}
.empty {
  text-align: center;
  color: #6b7280;
  color: var(--muted);
  padding: 24px 0;
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent;
  color: #22c55e;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  z-index: 50;
  border: none;
  outline: none;
  appearance: none;
}
.back-to-top svg {
  width: 36px;
  height: 36px;
}
.back-to-top.show {
  display: flex;
}
/* no hover effects */
.footer {
  text-align: center;
  color: #6b7280;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0 40px;
}
@media (max-width: 768px) {
  .nav {
    padding: 12px 16px;
  }
  .brand {
    font-size: 16px;
  }
  .container {
    margin: 16px auto;
    padding: 0 16px 28px;
  }
  .hero {
    padding: 20px;
  }
  .toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .search {
    width: 100%;
  }
  .filters {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .chip {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .search input {
    height: 44px;
    font-size: 15px;
  }
  .toolbar .right {
    margin-left: 0;
    width: 100%;
    align-items: center;
  }
  .stats {
    margin-right: 6px;
    padding-top: 4px;
  }
  .timeline {
    padding-left: 0;
  }
  .node {
    left: 0;
    width: 14px;
    height: 14px;
  }
  .group-header {
    gap: 8px;
    padding-left: 24px;
  }
  .badge {
    margin-top: 8px;
    justify-self: start;
  }
  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}
