/* A note, as its own page.
   This file was modal.css: a terminal window floating over a dimmed page, with
   three window dots, a fake file path and its own scroll container. The note is
   a page now, so what is left is a reading column — plus the styles for
   everything the markdown renderer puts inside it (prose, code, tables live in
   notes.css, demos below). */

.notepage {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - 156px);
  padding: 104px clamp(20px, 6vw, 72px) 40px;
  /* The measure is the point of a reading page: ~72ch of prose, centred, with
     nothing competing for the eye on either side. */
  max-width: 820px;
  margin-inline: auto;
}

.notepage__body { font-family: var(--sans); }

.notepage__body h2 {
  font-size: clamp(28px, 4.4vw, 38px);
  color: var(--ink);
  margin-bottom: .5em;
}
.notepage__body h3 { font-size: 19px; margin-top: 2em; color: var(--ink); }
.notepage__body h4 {
  font-family: var(--mono);
  font-size: 12.5px;
  margin-top: 1.8em;
  color: var(--muted);
  letter-spacing: .06em;
  font-weight: 500;
}
.notepage__body p, .notepage__body li { color: var(--ink-dim); font-size: 16.5px; }
.notepage__body ul, .notepage__body ol { padding-left: 22px; }
.notepage__body li { margin-bottom: .3em; }
.notepage__body strong { color: var(--ink); font-weight: 600; }
.notepage__body a { color: var(--accent); text-underline-offset: 3px; }
.notepage__body hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.2em 0; }
.notepage__body blockquote {
  margin: 1.6em 0;
  padding: 4px 18px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

/* The topic strip above the title does the job the coloured modal border used
   to do: it says which part of the garden you are standing in. */
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.post__meta b { color: var(--accent-topic, var(--ink)); font-weight: 500; }

pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-dim);
}
code { font-family: var(--mono); font-size: .9em; }
p code, li code {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink);
}

/* --- interactive demos --- */
.demo {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  font-family: var(--mono);
}
.demo__title {
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.demo label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.demo input[type="text"] {
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}
.demo input[type="text"]:focus { outline: none; border-color: var(--accent); }
.demo input[type="range"] { width: 100%; accent-color: var(--accent); margin-bottom: 12px; }
.demo .chip {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
}
.demo__out {
  font-size: 13px;
  color: var(--ink-dim);
  word-break: break-all;
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 42px;
}
.demo__bars { display: grid; gap: 8px; }
.demo__bar { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.demo__bar span:first-child { width: 62px; flex: none; }
.demo__bar i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  opacity: .8;
  transition: width .2s ease-out;
}

/* Tags in the meta bar are links into the search page. Marked with a leading
   # so they read as tags rather than as more metadata. */
.post__tag {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .18s, border-color .18s;
}
.post__tag::before { content: "#"; opacity: .6; }
.post__tag:hover { color: var(--ink); border-bottom-color: var(--muted); }
