.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.note-back {
  align-self: flex-start;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--t2);
  font-size: 12px;
  cursor: pointer;
}

.note-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.2;
}

.note-archived-banner {
  padding: 8px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--r-sm);
  font-size: 13px;
}

.note-props {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: var(--sp-sm);
  background: var(--bg);
  border-radius: var(--r-sm);
}

.note-prop {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 2px 6px;
}
.note-prop-key { color: var(--t2); text-transform: capitalize; }
.note-prop-val { color: var(--t1); font-weight: 500; }

/* Body prose */
.note-body { line-height: 1.55; color: var(--t1); font-size: 15px; }
.note-body h1, .note-body h2, .note-body h3, .note-body h4 {
  margin: var(--sp-md) 0 var(--sp-sm);
  font-weight: 700;
  line-height: 1.3;
}
.note-body h1 { font-size: 22px; }
.note-body h2 { font-size: 18px; color: var(--t1); }
.note-body h3 { font-size: 15px; color: var(--t2); text-transform: uppercase; letter-spacing: .04em; }
.note-body p { margin: var(--sp-sm) 0; }
.note-body ul, .note-body ol { margin: var(--sp-sm) 0 var(--sp-sm) var(--sp-lg); }
.note-body li { margin: 2px 0; }
.note-body code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 1px 5px;
  background: var(--bg);
  border-radius: 4px;
}
.note-body pre {
  padding: var(--sp-md);
  background: var(--bg);
  border-radius: var(--r-sm);
  overflow-x: auto;
  margin: var(--sp-sm) 0;
}
.note-body pre code { padding: 0; background: transparent; }
.note-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px var(--sp-md);
  color: var(--t2);
  font-style: italic;
  margin: var(--sp-sm) 0;
}
.note-body hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-md) 0; }
.note-body img { max-width: 100%; border-radius: var(--r-sm); }
.note-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
}
.note-body a:hover { border-bottom-color: var(--accent); }

/* Wikilink chips */
.wikilink-chip {
  display: inline-block;
  padding: 2px 10px;
  margin: 0 2px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--dur) var(--ease);
}
button.wikilink-chip { font-family: inherit; }
.wikilink-chip:hover {
  background: var(--accent);
  color: white;
}

/* Sparkline embed */
.md-chart {
  display: inline-block;
  vertical-align: middle;
  margin: 0 6px;
}

/* Notification score banner (shown when PWA opens with ?notif=<id>) */
.notif-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: 10px var(--sp-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-md);
}
.notif-score-banner.done {
  background: var(--surface);
  border-color: var(--border);
}
.notif-score-label { font-size: 13px; color: var(--accent); font-weight: 500; }
.notif-score-banner.done .notif-score-label { color: var(--t2); }
.notif-score-buttons { display: flex; gap: var(--sp-xs); }
.notif-score-btn {
  width: 36px;
  height: 36px;
  font-size: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: var(--dur) var(--ease);
}
.notif-score-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--raised);
}
.notif-score-btn:disabled { cursor: default; opacity: 0.5; }

/* Backlinks */
.note-backlinks {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.note-backlinks h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--t2);
  font-weight: 600;
}
.note-backlink-snippet {
  font-size: 12px;
  color: var(--t3);
  margin-left: var(--sp-md);
  margin-bottom: 4px;
}
