/* 读书笔记归档 — 简洁可读 */
:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --text: #1c1b19;
  --muted: #5e5a52;
  --border: #e4e0d6;
  --accent: #2c5f4e;
  --accent-soft: #e8f0ec;
  --tag: #6b4c2a;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0.35rem 1.25rem 2.5rem; }
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  margin-bottom: 0;
}
header.site .wrap {
  padding-top: 0; padding-bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
header.site h1 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.brand {
  color: inherit; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand-logo { display: block; border-radius: 6px; flex-shrink: 0; }

.brand:hover { text-decoration: none; }
.brand:hover h1 { color: var(--accent); }
.site-sub { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.search-wrap { display: flex; align-items: center; flex: 1 1 200px; min-width: 160px; max-width: 280px; }
.site-search {
  font: inherit;
  width: 100%;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  outline: none;
}
.site-search::placeholder { color: var(--muted); }
.site-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 95, 78, 0.15);
  background: var(--card);
}

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin: 0.35rem 0 0.45rem;
}
.filters select {
  font: inherit; padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); color: var(--text);
}
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
table.notes {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
}
table.notes th, table.notes td {
  padding: 0.7rem 0.9rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
table.notes th {
  background: var(--accent-soft); color: var(--muted);
  font-weight: 600; font-size: 0.82rem;
}
table.notes tr:last-child td { border-bottom: none; }
table.notes tr.hidden { display: none; }
.chip {
  display: inline-block; padding: 0.1rem 0.45rem;
  border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: 0.8rem;
}
.tag {
  display: inline-block; padding: 0.1rem 0.45rem;
  border-radius: 4px; background: #f0ebe3; color: var(--tag); font-size: 0.8rem;
}
.empty-hint { display: none; color: var(--muted); margin-top: 1rem; }
.empty-hint.show { display: block; }

/* article page */
article.note {
  margin-top: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem 2rem;
}
article.note h1 { margin-top: 0; font-size: 1.55rem; line-height: 1.35; }
article.note h2 {
  margin-top: 1.75rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.2rem;
}
article.note h3 { font-size: 1.05rem; margin-top: 1.25rem; }
article.note p { margin: 0.75rem 0; }
article.note ul, article.note ol { padding-left: 1.4rem; }
article.note li { margin: 0.35rem 0; }
article.note strong { font-weight: 650; }
article.note hr {
  border: none; border-top: 1px solid var(--border); margin: 1.5rem 0;
}
.meta {
  color: var(--muted); font-size: 0.9rem;
  margin: 0.25rem 0 1.25rem;
}
.nav-back { font-size: 0.9rem; margin: 0.15rem 0 0.35rem; display: inline-block; }
.list-page ul { list-style: none; padding: 0; }
.list-page li {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem; margin: 0.5rem 0;
}
footer.site {
  margin-top: 2rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.82rem;
}
@media (max-width: 600px) {
  article.note { padding: 1rem 1.1rem 1.5rem; }
  table.notes th:nth-child(3), table.notes td:nth-child(3) { display: none; }
  .search-wrap { flex: 1 1 100%; max-width: none; }
  .site-sub { display: none; }
  header.site h1 { font-size: 1.15rem; }
}

/* brand row fix v3 */
.brand {
  color: inherit; text-decoration: none !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
}
.brand-logo {
  display: block !important;
  width: 32px !important; height: 32px !important;
  border-radius: 6px; flex: 0 0 32px !important;
}
.brand h1 {
  margin: 0 !important;
  font-size: 1.3rem !important;
  font-weight: 700;
  line-height: 1.2 !important;
  display: inline !important;
}
header.site { margin-bottom: 0 !important; padding: 0.4rem 0 !important; }
.filters { margin: 0.25rem 0 0.35rem !important; }
.wrap { padding-top: 0.25rem !important; }
.nav-back { margin: 0.1rem 0 0.3rem !important; }

/* plain book/topic cells — no pill bg */
.chip, .tag {
  display: inline !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
}
