/*
  纸面取自 Kami 公开的 design.md：羊皮纸 #f5f4ed、唯一强调色墨蓝 #1B365D、暖灰、衬线层级。
  没有引用 Kami 的模板或字体文件。仓耳今楷只写在字体栈里，本仓库不附带这个字体。
*/
:root {
  --paper: #f5f4ed;
  --ink: #141413;
  --muted: #6b6a64;
  --line: #e8e6dc;
  --rule: #e5e3d8;
  --accent: #1b365d;
  --selection: #e8e6dc;
  --serif: Charter, "TsangerJinKai02", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, Palatino, "Times New Roman", "WenQuanYi Micro Hei", "Droid Sans Fallback", serif;
  --sans: Charter, "TsangerJinKai02", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, Palatino, "Times New Roman", "WenQuanYi Micro Hei", "Droid Sans Fallback", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
}

strong { font-weight: 500; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(36rem, calc(100% - 2.75rem));
  margin: 0 auto;
  padding: 2.75rem 0 4.5rem;
}

.mast {
  margin: 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.mast-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.mark::before {
  content: "";
  width: 0.7rem;
  height: 2px;
  background: var(--accent);
}

nav {
  display: flex;
  gap: 1.05rem;
}

nav a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  text-decoration: none;
}

nav a[aria-current="page"] { color: var(--ink); }

h1 {
  margin: 0.7rem 0 0;
  font-size: 1.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  text-wrap: pretty;
}

.subhead {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.4;
}

.filters {
  margin: 1.15rem 0 0.2rem;
  padding-top: 0;
  border-top: 0;
}

.filters-label {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: end;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1 1 8.5rem;
  min-width: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
}

.filters label.grow { flex-basis: 14rem; }

input, select, button { font: inherit; color: inherit; }

input, select {
  width: 100%;
  margin: 0;
  padding: 0.28rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
}

button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
  color: #3d3d3a;
  font-family: var(--sans);
  font-size: 0.75rem;
  padding: 0.42rem 0.9rem;
}

article {
  padding: 1.45rem 0 0.2rem;
  border-top: 1px solid var(--rule);
}

article:first-of-type {
  border-top: 0;
  padding-top: 1.15rem;
}

h2 {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.meta {
  margin: 0.35rem 0 0.7rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.4;
}

.summary p {
  margin: 0 0 0.7rem;
  color: var(--ink);
}

.read {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  margin: 0.05rem 0 0.7rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none;
}

.read span { font-size: 0.68rem; }

.more { margin: 1.4rem 0 0; }

.more a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  text-decoration: none;
}

.history {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.history a {
  display: inline-block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}

.empty {
  margin: 1.2rem 0 0;
  color: var(--muted);
}

footer {
  margin-top: 2.6rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

@media (max-width: 420px) {
  .wrap { width: min(36rem, calc(100% - 2rem)); padding: 1.6rem 0 3.2rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .filters label,
  .filters label.grow { flex-basis: 100%; }
}
