:root { color-scheme: light dark; --fg:#18181b; --bg:#fff; --muted:#71717a; --line:#e4e4e7; --accent:#2563eb; }
@media (prefers-color-scheme: dark) {
  :root { --fg:#fafafa; --bg:#09090b; --muted:#a1a1aa; --line:#27272a; --accent:#60a5fa; }
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.65 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; }
a { color:var(--accent); }
header.site { display:flex; justify-content:space-between; align-items:center; gap:1rem;
  padding:1rem 1.25rem; border-bottom:1px solid var(--line); }
.brand { font-weight:600; text-decoration:none; color:var(--fg); }
header.site nav { display:flex; gap:1rem; align-items:center; }
main { max-width:44rem; margin:0 auto; padding:2rem 1.25rem 4rem; }
.inline { display:inline; }
.linkish { background:none; border:0; padding:0; color:var(--accent); cursor:pointer; font:inherit; }
.empty { text-align:center; padding:4rem 0; color:var(--muted); }
input[type=text], input[type=password], textarea {
  width:100%; padding:.6rem .7rem; border:1px solid var(--line); border-radius:6px;
  background:var(--bg); color:var(--fg); font:inherit; }
textarea { min-height:60vh; resize:vertical; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.9rem; }
button.primary { padding:.55rem 1rem; border:0; border-radius:6px; background:var(--accent); color:#fff; font:inherit; cursor:pointer; }
label { display:block; margin:1rem 0 .35rem; font-size:.875rem; color:var(--muted); }
.error { color:#dc2626; margin:.75rem 0; }
.note-list { list-style:none; padding:0; }
.note-list li { padding:.85rem 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:1rem; }
.badge { font-size:.75rem; color:var(--muted); border:1px solid var(--line); border-radius:99px; padding:.1rem .5rem; }
.prose h1,.prose h2,.prose h3 { line-height:1.25; }
.prose pre { background:rgba(127,127,127,.12); padding:1rem; border-radius:8px; overflow-x:auto; }
.prose code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.9em; }
.prose img { max-width:100%; height:auto; }
.meta { color:var(--muted); font-size:.875rem; }
.savestate { font-size:.8rem; color:var(--muted); min-height:1.2em; }
