/* notes.css — supplemental styles for notes.sindri.sh.
   Loadedr alongside the main /static/style.css. Anything notes-specific
   (TOC, tag chips, "last updated" line) lives here so the main stylesheet
   never has to know about notes-side concerns. */

/* ---- Table of Contents -------------------------------------------------- */
.toc {
    margin: 1.4em 0 1.6em;
    padding: 0.8em 1em;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-left: 3px solid #88c0ff;
    font-size: 0.93em;
}

.toc-title {
    margin: 0 0 0.4em;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #88c0ff;
}

/* pandoc emits the TOC as a nested <ul id="TOC"> */
.toc ul {
    list-style: none;
    padding-left: 1em;
    margin: 0.3em 0;
}

.toc > ul {
    padding-left: 0;
}

.toc li {
    margin: 0.15em 0;
    line-height: 1.4;
}

.toc a {
    color: #ccc;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}

.toc a:hover {
    color: #88c0ff;
    border-bottom-color: #88c0ff;
}

/* Optional: collapse TOC on narrow screens via <details>. The current pandoc
   output uses plain <ul>, so this is a no-op until/unless we switch to one
   with a wrapper. Left here as a hook. */
@media (max-width: 600px) {
    .toc { font-size: 0.88em; padding: 0.6em 0.8em; }
}

/* ---- tag chips on notes ------------------------------------------------- */
.post-tags {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.82em;
    margin: 0.3em 0 0;
}

.post-tags .tag {
    display: inline-block;
    margin-right: 0.4em;
    padding: 1px 6px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #aaa;
}

/* ---- anchor links on headings (pandoc auto-id's them) ------------------ */
.post-body h2,
.post-body h3,
.post-body h4 {
    scroll-margin-top: 1em;   /* so jump-to-anchor doesn't hide under any fixed bar */
}

/* a subtle "#" appears on hover, linking to the heading's own anchor.
   Pandoc emits id="heading-slug" on each heading; we synthesize the link with CSS only. */
.post-body h2:hover::before,
.post-body h3:hover::before,
.post-body h4:hover::before {
    content: "# ";
    color: #555;
    font-weight: normal;
    margin-left: -1em;
    padding-right: 0.2em;
}
