:root {
  --bg: #f6f1e8;
  --paper: #fffdf8;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e0d4;
  --accent: #9a3412;
  --link: #9a3412;
  --ok: #166534;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-anchor: none;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", serif;
}

.top {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.track-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  gap: 2px;
}

.track-switch a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.track-switch a:hover {
  color: var(--ink);
}

.track-switch a.active {
  color: #fff;
  background: var(--accent);
}

.sort-bar {
  display: flex;
  justify-content: flex-start;
  margin: 4px 0 0;
}

.sort-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  gap: 2px;
}

.sort-switch button {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.sort-switch button:hover {
  color: var(--ink);
}

.sort-switch button.active {
  color: #fff;
  background: var(--accent);
}

.sort-bar + .month-block > .month {
  margin-top: 16px;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#app {
  max-width: 860px;
  margin: 0 auto 64px;
  padding: 12px 20px 48px;
}

.loading, .empty {
  color: var(--muted);
}

.month-block {
  margin: 0;
}

.month {
  margin: 28px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.month::-webkit-details-marker,
.month::marker {
  display: none;
  content: "";
}

.month:hover {
  color: var(--ink);
}

.month-caret {
  display: inline-block;
  width: 0.85em;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

.month-caret::before {
  content: "▾";
}

.month-block[open] > .month .month-caret {
  transform: rotate(0deg);
}

.month-count {
  margin-left: auto;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plist li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.star-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.star-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink);
  background: #f3eee4;
  border: 1px solid var(--line);
  text-decoration: none;
}

a.star-pill:hover {
  background: #ece4d6;
}

.star-pill.missing {
  color: var(--muted);
}

.plist .card-main > a {
  display: block;
  padding: 13px 16px;
  color: var(--ink);
  text-decoration: none;
}

.plist .tex-title {
  font-weight: 700;
}

.plist .title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.7em;
}

.plist .arxiv-date {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.plist .blurb {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e7e0d4;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}

.plist .blurb strong {
  font-weight: 700;
  color: var(--ink);
}

.plist .blurb em { font-style: italic; }

.plist .blurb code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.84em;
  background: #f3eee4;
  padding: 1px 5px;
  border-radius: 4px;
}

.plist .blurb .katex {
  font-size: 1.05em;
  font-weight: 400;
}

.pdf-link {
  display: inline-block;
  padding: 3px 9px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ok);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  text-decoration: none;
}

a.pdf-link:hover {
  background: #dcfce7;
}

.plist .card-main > a:hover { background: #faf6ee; }

.plist a.ready { box-shadow: inset 3px 0 0 var(--ok); }
.plist a.pending { color: var(--muted); }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.btn {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.88rem;
}

.btn.ghost {
  background: transparent;
  color: var(--link) !important;
  border: 1px solid var(--line);
}

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

.report {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px 40px;
  overflow-x: auto;
}

.report h1 { font-size: 1.55rem; line-height: 1.35; margin: 0 0 16px; }
.report h2 { font-size: 1.22rem; margin: 32px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.report h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.report a { color: var(--link); }
.report blockquote {
  margin: 12px 0;
  padding: 2px 14px;
  border-left: 3px solid var(--accent);
  color: #44403c;
  background: #faf6ee;
}
.report table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  margin: 12px 0 18px;
}
.report th, .report td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.report thead th { background: #f3eee4; }
.report pre, .report code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
}
.report pre {
  background: #faf6ee;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
}
.report :not(pre) > code {
  background: #f3eee4;
  padding: 1px 5px;
  border-radius: 4px;
}

.attn-wrap {
  margin: 16px 0 18px;
}

.attn-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 36px 64px;
  padding: 22px 24px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

.attn-board {
  margin: 0;
}

.attn-board figcaption {
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 4px;
  color: var(--ink);
}

.attn-axis {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 10px;
}

.attn-grid {
  display: grid;
  gap: 14px 18px;
  align-items: center;
  justify-items: center;
}

.attn-corner { width: 36px; height: 28px; }

.attn-lab {
  font-size: 0.84rem;
  min-width: 36px;
  text-align: center;
  line-height: 1.15;
}

.attn-lab.v { color: #3d6f8f; }
.attn-lab.a { color: #9a7a12; }
.attn-lab.t { color: #2f6b4f; }
.attn-lab.o { color: #57534e; }
.attn-lab .katex { font-size: 0.95em; }

.attn-lab-col {
  align-self: end;
  max-width: 100%;
  padding: 0 4px 8px;
  overflow: visible;
  white-space: nowrap;
}

.attn-lab-col.attn-lab-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  font-size: 0.72rem;
  min-height: 2.6em;
}

.attn-lab-row {
  justify-self: end;
  text-align: right;
  padding-right: 6px;
  white-space: nowrap;
}

.attn-lab-row.attn-lab-text {
  max-width: 7.5rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.72rem;
  line-height: 1.2;
}

.attn-lab-text {
  text-align: inherit;
}

.attn-cell {
  width: var(--attn-cell, 42px);
  height: var(--attn-cell, 42px);
  border-radius: 8px;
  border: 1.5px solid #c8c8c8;
  background: #fff;
  box-sizing: border-box;
}

.attn-cell.v {
  background: #b7d4ea;
  border-color: #8fb4ce;
}

.attn-cell.a {
  background: #f2d56b;
  border-color: #d4b44a;
}

.attn-cell.t {
  background: #cfe8d8;
  border-color: #9cc9ae;
}

.attn-cell.o {
  background: #e8e0d4;
  border-color: #cfc4b4;
}

.attn-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.84rem;
  color: #57534e;
}

.attn-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid #c8c8c8;
  vertical-align: -2px;
  margin-right: 6px;
  background: #fff;
}

.attn-swatch.v { background: #b7d4ea; border-color: #8fb4ce; }
.attn-swatch.a { background: #f2d56b; border-color: #d4b44a; }
.attn-swatch.t { background: #cfe8d8; border-color: #9cc9ae; }
.attn-swatch.o { background: #e8e0d4; border-color: #cfc4b4; }
.report hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.report .katex-display { margin: 1.1em 0; overflow-x: auto; overflow-y: hidden; }
.report img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .report { padding: 18px 14px 28px; }
}
