:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #656d76;
  --border: #e5e7eb;
  --border-strong: #d0d7de;
  --link: #0969da;
  --better: #1a7f37;
  --pill-bg: #f3f4f6;
  --pill-active-bg: #1f2328;
  --pill-active-fg: #ffffff;
  --code-bg: #f6f8fa;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Index Page (Flat 3-Column Artifacts Table) ---------- */
.index-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 28px 72px;
}

.index-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-input {
  width: 240px;
  padding: 6px 10px;
  font-size: 14px;
  font-family: var(--sans);
  border: 1px solid #8c959f;
  border-radius: 4px;
  outline: none;
}

.filter-input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.15);
}

.item-count {
  font-size: 13.5px;
  color: var(--muted);
  margin-right: 6px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border: 1px solid var(--border-strong);
  background: var(--pill-bg);
  color: var(--fg);
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, color 0.12s;
}

.pill:hover {
  border-color: #8c959f;
}

.pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-fg);
  border-color: var(--pill-active-bg);
}

.index-table-wrap {
  border: 1px solid #f0f1f3;
  border-radius: 4px;
  overflow-x: auto;
}

.index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.index-table th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  white-space: nowrap;
}

.index-table th.col-date {
  text-align: right;
  width: 175px;
}

.sort-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.index-table td {
  padding: 8.5px 14px;
  border-bottom: 1px solid #f2f3f5;
  vertical-align: baseline;
}

.index-table tr:last-child td {
  border-bottom: none;
}

.index-table tr:hover td {
  background: #fafbfc;
}

.col-name {
  white-space: nowrap;
  width: 26%;
}

.col-name a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.row-overview .col-name a {
  font-weight: 600;
}

.col-summary {
  color: #374151;
}

.col-date {
  text-align: right;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.draft-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-family: var(--mono);
  color: #9a6700;
  background: #fff8c5;
  border: 1px solid #d4a72c;
  border-radius: 3px;
}

/* ---------- Experiment & Overview Page ---------- */
.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px 88px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--link);
}

.page-content h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.28;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}

.page-meta {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 18px;
}

.page-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 10px;
  letter-spacing: -0.01em;
}

.page-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.page-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 6px;
}

.page-content p {
  margin: 0 0 14px;
}

.page-content blockquote {
  margin: 0 0 16px;
  padding: 2px 14px;
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.page-content ul, .page-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.page-content li {
  margin-bottom: 5px;
}

.page-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 1.5px 5px;
  border-radius: 3px;
}

.page-content pre {
  background: var(--code-bg);
  padding: 12px 14px;
  border-radius: 5px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.page-content pre code {
  background: none;
  padding: 0;
}

/* Quantitative Tables (Minimalist Report Style) */
.table-scroll {
  overflow-x: auto;
  margin: 14px 0 16px;
}

.data-table, .page-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.data-table th, .page-content table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 12.5px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  white-space: nowrap;
}

.data-table th.num {
  text-align: right;
}

.data-table td, .page-content table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f3f5;
}

.data-table td.num {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
}

.data-table td.better {
  color: var(--better);
  font-weight: 600;
}

/* Video & Image Figures */
.video-block, .image-block {
  margin: 12px 0 24px;
}

.video-block video {
  display: block;
  width: 100%;
  max-width: 100%;
  background: #000;
  border-radius: 2px;
}

.image-block img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.video-block figcaption, .image-block figcaption {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

@media (max-width: 680px) {
  .index-wrap, .page-wrap {
    padding: 22px 16px 56px;
  }
  .col-name {
    width: auto;
  }
}
