
:root {
  --ink: #17211f;
  --muted: #60706c;
  --paper: #fbfaf6;
  --line: #d8ddd3;
  --panel: #ffffff;
  --green: #1f5b4f;
  --wine: #7b2636;
  --blue: #315f86;
  --gold: #a77924;
  --shadow: 0 10px 30px rgba(23, 33, 31, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #eef1ed url("card-texture.png");
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 10px 16px;
  background: rgba(251, 250, 246, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.topbar a:hover, .topbar a.active { background: #e3ebe4; color: var(--green); }
.topbar .brand {
  font-weight: 750;
  margin-right: 8px;
  color: var(--wine);
}
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
.hero {
  min-height: 260px;
  display: grid;
  align-content: end;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(23,33,31,.78), rgba(31,91,79,.62)),
    url("shelf-texture.png");
  background-size: cover;
  color: white;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 58px); line-height: 1; letter-spacing: 0; }
.hero p { margin: 0; max-width: 760px; color: #eff6f1; font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 28px; }
.stat, .panel {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 28px; color: var(--green); }
.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  margin: 18px 0;
  align-items: center;
}
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}
.count { color: var(--muted); font-size: 14px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.card {
  display: grid;
  gap: 7px;
  min-height: 138px;
  padding: 11px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-2px); border-left-color: var(--wine); }
.kicker { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.card h2 { margin: 0; font-size: 16px; line-height: 1.2; letter-spacing: 0; }
.card p {
  margin: 0;
  color: #2c3734;
  font-size: 13px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scholar-card {
  min-height: 150px;
  align-content: start;
}
.scholar-card .card-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.scholar-card .card-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.scholar-card .card-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.25;
}
.scholar-card .card-summary {
  -webkit-line-clamp: 2;
}
.meta { color: var(--muted); font-size: 12px; }
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}
.article {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.article h1 { margin-top: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: 0; }
.article h2 { margin-top: 28px; }
.essay {
  font-size: 18px;
  line-height: 1.72;
}
.essay p { margin: 0 0 18px; }
.field { border-top: 1px solid var(--line); padding: 14px 0; }
.field strong { display: block; margin-bottom: 6px; color: var(--green); }
.longtext {
  white-space: pre-wrap;
  background: #f4f7f2;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  max-height: 520px;
  overflow: auto;
}
.side {
  display: grid;
  gap: 12px;
  align-content: start;
}
.side a, .button {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}
.side a:hover, .button:hover { border-color: var(--green); color: var(--green); }
.breadcrumbs { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
@media (max-width: 820px) {
  main { padding: 16px; }
  .toolbar { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .hero { min-height: 220px; padding: 20px; }
}
