/* ═══════════════════════════════════════════════════════════
   research-style.css — the writing index (writing/index.html).

   Loaded *after* shared/plain.css, and deliberately thin: the page
   is a plain.css page (body.plain, .note-index lists, the bracket
   header, the same tokens), so this file only adds the three
   things a notes index has no use for — a search field, the
   filter row, and the per-entry date/tag line.

   Every colour here is a plain.css token, so dark mode needs no
   rules of its own.
   ═══════════════════════════════════════════════════════════ */

/* ── Brand mark, above the bracket nav ──────────────────── */

body.plain .brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.plain .brand-mark:hover {
    opacity: 1;
    transform: translateY(-1px);
    text-decoration: none;
}

body.plain .brand-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: block;
    background: var(--wash);
    border: 1px solid var(--rule);
}

body.plain .brand-wordmark {
    height: 22px;
    width: auto;
    display: block;
}

/* The index header centres — chapter pages keep the left rail. */
body.plain .site-header.index-header {
    text-align: center;
    margin-bottom: 44px;
}

/* ── Search and filters ─────────────────────────────────── */

/* One quiet rule under the field. No box, no icon, no shadow —
   the same "text and a hairline" vocabulary as the rest, and
   flush left with the heading, lede and entry lists above it. */
body.plain .index-search {
    margin: 0 0 14px;
}

body.plain .search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.92rem;
    color: var(--body);
    text-align: left;
    transition: border-color 0.2s ease;
}

body.plain .search-input:focus {
    outline: none;
    border-bottom-color: var(--link);
}

body.plain .search-input::placeholder {
    color: var(--faint);
}

/* Filters read as a row of words, separated the way the glosses
   and tags are — a middot, not a button. */
body.plain .filter-bar {
    text-align: left;
    font-size: 0.82rem;
    color: var(--faint);
    margin-bottom: 8px;
}

body.plain .filter-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--muted);
    cursor: pointer;
}

body.plain .filter-btn:hover {
    color: var(--link);
}

body.plain .filter-btn.active {
    color: var(--ink);
    font-weight: 600;
}

body.plain .filter-btn + .filter-btn::before {
    content: '·';
    color: var(--faint);
    font-weight: 400;
    margin: 0 8px;
}

body.plain #noResults {
    display: none;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 32px;
}

/* ── Index entries ──────────────────────────────────────── */

/* An entry is a list item like any other in a note index; the
   only addition is the date/tag line beneath the gloss. */
body.plain .note-index li.article-item {
    margin: 0 0 18px;
}

body.plain .note-index .article-title {
    font-weight: 400;
}

body.plain .note-index .article-excerpt {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 2px 0 0;
}

body.plain .note-index .entry-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--faint);
    margin-top: 3px;
}

body.plain .note-index .tag {
    cursor: pointer;
    color: var(--faint);
    transition: color 0.15s ease;
}

body.plain .note-index .tag:hover {
    color: var(--link);
}

body.plain .note-index .entry-meta > * + *::before,
body.plain .note-index .tag + .tag::before {
    content: '·';
    margin: 0 6px;
    color: var(--faint);
}

body.plain .note-index .lock {
    color: var(--faint);
}

/* ── The lecture-notes disclosure ───────────────────────── */

/* Quiet on purpose — findable if you read to the bottom, or
   search for something inside it. Styled as a section heading
   that happens to open, so it sits level with "Writing" and
   "Reading list" rather than floating between them. */
body.plain .notes-vault {
    margin-top: 40px;
}

body.plain .notes-vault > summary {
    list-style: none;
    cursor: pointer;
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0;
    transition: color 0.25s ease;
    user-select: none;
}

body.plain .notes-vault > summary::-webkit-details-marker {
    display: none;
}

body.plain .notes-vault > summary::after {
    content: '+';
    margin-left: 8px;
    font-weight: 400;
    color: var(--muted);
}

body.plain .notes-vault[open] > summary::after {
    content: '–';
}

body.plain .notes-vault > summary:hover,
body.plain .notes-vault > summary:focus-visible {
    color: var(--ink);
    outline: none;
}

body.plain .notes-vault[open] > summary {
    color: var(--ink);
}

body.plain .section-note {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 8px 0 14px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
    body.plain .filter-bar {
        line-height: 2;
    }
}
