* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", "URW Palladio L", P052, serif;
  background: #fefefe;
  color: #1a1a1a;
  max-width: 40em;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  line-height: 1.6;
  font-size: 17px;
  text-align: left;
}

.header {
  text-align: left;
  margin-bottom: 3em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1em;
}

.header h1 {
  font-size: 1.8em;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.header h1 a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header h1 a:hover {
  color: #666;
}

.header p {
  margin: 0.5em 0 0 0;
  font-size: 0.95em;
  font-style: italic;
  color: #666;
}

.header .entrance {
  font-size: 0.85em;
  margin-top: 0.75em;
}

.header .entrance a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.header .entrance a:hover {
  border-bottom-color: #1a1a1a;
  color: #1a1a1a;
}

.header .filter {
  margin-top: 0.75em;
  font-size: 0.85em;
  color: #444;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.note-item {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid #eee;
}

.note-item:last-child {
  border-bottom: none;
}

.note-link {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  display: block;
  margin-bottom: 0.5em;
}

.note-link:hover {
  color: #0066cc;
}

.keywords {
  font-size: 0.85em;
  margin-top: 0.5em;
  display: block;
  color: #888;
}

.keyword {
  margin-right: 0.5em;
  padding: 0.2em 0.5em;
  background: #f5f5f5;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.9em;
  text-decoration: none;
  color: #444;
  transition: background 0.2s ease, color 0.2s ease;
}

.keyword:hover {
  background: #e3e3e3;
}

.keyword.active {
  background: #1a1a1a;
  color: #fff;
}

.keyword::before {
  content: '';
}

.nav {
  margin-bottom: 2em;
  border-bottom: 1pt solid #000;
  padding-bottom: 0.5em;
  text-align: left;
}

.back-link {
  color: #000;
  text-decoration: none;
  font-size: 0.9em;
}

.back-link:hover {
  background: #000;
  color: #fff;
}

.meta {
  margin-top: 0.5em;
  font-size: 0.85em;
  color: #666;
}

.meta .status {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta .timestamp {
  font-style: italic;
}

.note-content {
  margin-top: 2em;
  line-height: 1.7;
  color: #333;
}

.note-content h1 {
  font-size: 1.8em;
  margin: 2em 0 0.75em 0;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.note-content h2 {
  font-size: 1.4em;
  margin: 1.75em 0 0.75em 0;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.note-content h3 {
  font-size: 1.2em;
  margin: 1.5em 0 0.5em 0;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a1a;
}

.note-content p {
  margin: 1em 0;
}

.note-content p:first-child,
.note-content h1 + p,
.note-content h2 + p,
.note-content h3 + p {
  margin-top: 0;
}

.note-content strong {
  font-weight: 600;
  color: #1a1a1a;
}

.note-content em {
  font-style: italic;
  color: #444;
}

.note-content ul {
  margin: 0.75em 0;
  padding-left: 2em;
  text-align: left;
}

.note-content li {
  margin: 0.5em 0;
  text-indent: 0;
}

.note-content code {
  font-family: monospace;
  font-size: 0.9em;
  background: #f5f5f5;
  padding: 0.1em 0.3em;
  border: 0.5pt solid #ccc;
}

.note-content pre {
  font-family: monospace;
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 1em;
  border: 0.5pt solid #000;
  margin: 1em 0;
  overflow-x: auto;
  text-align: left;
}

.note-content blockquote {
  margin: 1em 2em;
  padding-left: 1em;
  border-left: 2pt solid #000;
  font-style: italic;
}

.denote-link {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid #cce0ff;
  transition: all 0.2s ease;
}

.denote-link:hover {
  color: #0052a3;
  border-bottom-color: #0052a3;
}

.broken-link {
  color: #666;
  text-decoration: line-through;
}

.backlinks {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1pt solid #000;
  text-align: left;
}

.backlinks h3 {
  font-size: 0.9em;
  font-weight: normal;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  margin-bottom: 0.75em;
}

.backlinks ul {
  list-style: none;
  padding: 0;
}

.backlinks li {
  margin: 0.5em 0;
}

.backlink {
  color: #000;
  text-decoration: none;
  font-size: 0.9em;
}

.backlink:hover {
  background: #000;
  color: #fff;
}

.backlink::before {
  content: '← ';
}

@media print {
  body {
    padding: 0;
  }
  .nav, .header .entrance {
    display: none;
  }
}
