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

:root {
  --bg:    #f5f2eb;
  --ink:   #1a1a18;
  --muted: #6b6860;
  --faint: #b0ada6;
  --rule:  #dedad2;
  --font:  'IBM Plex Mono', 'Courier New', monospace;
}

html { font-size: 15px; background: var(--bg); color: var(--ink); }

body {
  font-family: var(--font);
  padding: 5rem 2rem 4rem;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

main {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

a { color: inherit; text-decoration: none; }

/* ——— Header ——— */

header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.breadcrumb {
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}

.breadcrumb a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.breadcrumb .sep { color: var(--faint); }

.desc {
  font-size: .775rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.8;
  max-width: 52ch;
}

/* ——— Label ——— */

.label {
  font-size: .7rem;
  color: var(--faint);
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

/* ——— Notes list ——— */

.note {
  display: grid;
  grid-template-columns: 90px 1fr 1rem;
  align-items: baseline;
  gap: .5rem 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity .18s;
}

.note:first-of-type { border-top: 1px solid var(--rule); }
.note:hover { opacity: .5; }

.note__date {
  font-size: .7rem;
  color: var(--faint);
  white-space: nowrap;
}

.note__title {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink);
}

.note__arrow {
  font-size: .75rem;
  color: var(--faint);
  text-align: right;
}

/* ——— Single note ——— */

.back {
  font-size: .775rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
  display: inline-block;
}

.back:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.note-header {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.note-date {
  font-size: .7rem;
  color: var(--faint);
}

.note-title {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
}

/* ——— Prose ——— */

.prose {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.prose p { max-width: 58ch; }

.prose strong { color: var(--ink); font-weight: 500; }

.prose em { font-style: italic; }

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color .15s;
}

.prose a:hover { border-bottom-color: var(--ink); }

.prose h2 {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: .5rem;
}

.prose pre,
.prose code {
  font-family: var(--font);
  font-size: .775rem;
  background: #ede9e0;
  color: var(--ink);
  border-radius: 3px;
}

.prose code { padding: .1em .35em; }

.prose pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 4px;
  line-height: 1.7;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--muted);
}

/* ——— Responsive ——— */

@media (max-width: 480px) {
  body { padding: 3rem 1.25rem; }
  .note { grid-template-columns: 1fr 1rem; }
  .note__date { display: none; }
}
