/* Articles on the public tree (B394, S6): a magazine page in the archive look – the cover across the column, a serif title,
   the lede, the writer and the reading time; the text in a column one can read for a long time, pictures in the margin,
   the persons alongside. The list itself is in articles.css (B398). No inline styles (the CSP). */

/* The list */
.articles-hero { background: var(--navy); color: var(--on-navy); padding: 56px 0 40px; }
.articles-hero .eyebrow { color: var(--leaf); }
.articles-hero h1 { margin: 8px 0 10px; font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; font-weight: 600; }
.articles-hero .lead { margin: 0; max-width: 40rem; font-size: 1.15rem; color: var(--on-navy-muted); }
/* Categories (B395): the list's main sections, above the topics – larger, a line under the chosen. */

.articles { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 40px; }
.empty { font-size: 1.1rem; color: var(--muted); }


.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.cards a { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); color: inherit; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cards .cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.cards .text { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }
.cards .title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; font-weight: 600; color: var(--heading); }
.cards .lede { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover.none { display: block; background: linear-gradient(135deg, var(--brass-soft), var(--chip)); min-height: 120px; }
.meta { font-size: 0.9rem; color: var(--muted); }

.coming ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.coming a { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: var(--brass-soft); color: inherit; text-decoration: none; border: 1px dashed var(--brass); }
.coming img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.coming .text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.coming strong { font-family: var(--serif); font-size: 1.15rem; color: var(--heading); }
.coming .teaser { color: var(--muted); font-size: 0.95rem; }
.coming .when { font-size: 0.875rem; font-weight: 700; color: var(--brass); }

/* The article: a reading room (B397, sketch B) – the title beside the cover on a tinted band, then three columns: the
   contents (left, following the reader), the text, and who and what it is about (right). One column on a phone. */
.art { background: var(--paper); }
.art-hero { background: var(--card); border-bottom: 1px solid var(--rule); }
.art-hero-in { max-width: 1280px; margin: 0 auto; padding: 56px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.art-hero-in:not(:has(.art-cover)) { grid-template-columns: minmax(0, 46rem); }
.art-cover img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.art-intro { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.art-intro .eyebrow a { color: inherit; text-decoration: none; }
.art-intro .eyebrow a:hover { text-decoration: underline; }
.art-intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.1; font-weight: 600; color: var(--heading); text-wrap: balance; }
.art-lede { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.55; color: var(--muted); }
.art-meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: 0.95rem; }
.art-meta .writer { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.art-meta .writer img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
a.writer:hover span { text-decoration: underline; }

.art-room { max-width: 1280px; margin: 0 auto; padding: 56px 40px 80px; display: grid; grid-template-columns: minmax(0, 44rem) 260px; gap: 56px; justify-content: center; }
.art-room.with-toc { grid-template-columns: 220px minmax(0, 44rem) 260px; }
.art-toc, .art-side { align-self: start; position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; }
.art-toc summary { cursor: default; list-style: none; margin-bottom: 10px; }
.art-toc summary::-webkit-details-marker { display: none; }
.art-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.art-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--rule); color: var(--muted); text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.art-toc .level-3 a { padding-left: 24px; font-size: 0.88rem; }
.art-toc a:hover { color: var(--ink); border-left-color: var(--muted); }
.art-toc a[aria-current='true'] { color: var(--heading); font-weight: 700; border-left-color: var(--link); }
.art-body { font-family: var(--serif); font-size: 1.2rem; line-height: 1.75; color: var(--ink); }
.art-body :where(p) { margin: 0; } /* before the spacing below, which then wins for paragraphs too */
.art-body > * + * { margin-top: 1.1em; }
.art-body > p:first-child::first-letter { float: left; margin: 0.08em 0.12em 0 0; font-size: 3.6em; line-height: 0.82; font-weight: 600; color: var(--brass); }
.art-body h2, .art-body h3 { font-family: var(--serif); color: var(--heading); line-height: 1.25; margin: 1.8em 0 0.4em; clear: both; text-wrap: balance; }
.art-body h2 { font-size: 1.7rem; }
.art-body h3 { font-size: 1.35rem; }
.art-body .look-ruled { display: flex; align-items: center; gap: 16px; text-align: center; }
.art-body .look-ruled::before, .art-body .look-ruled::after { content: ''; flex: 1; border-top: 1px solid var(--rule); }
.art-body .look-ornament { text-align: center; font-style: italic; font-weight: 400; }
.art-body .look-ornament::after { content: '❦'; display: block; font-style: normal; font-size: 0.8em; color: var(--brass); }
.art-body blockquote { margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--brass); font-style: italic; color: var(--muted); }
.art-body ul, .art-body ol { padding-left: 1.4em; }
.art-body li > p { margin: 0; }
.art-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; clear: both; }
.art-body a { text-underline-offset: 0.15em; }
.art-body a.person { color: var(--link); text-decoration-style: dotted; text-decoration-thickness: 1px; }
.art-body .note-ref a { font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 0.7em; font-weight: 700; text-decoration: none; padding: 0 0.1em; }

.art-body figure { margin: 1.6em 0; }
.art-body figcaption { margin-top: 8px; font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 0.9rem; line-height: 1.45; color: var(--muted); }
.art-body figcaption .credit { display: block; font-size: 0.8rem; }
.art-picture img { display: block; width: 100%; border-radius: 6px; }
.art-picture.layout-full { margin-left: -8%; margin-right: -8%; }
.art-picture.layout-left, .art-picture.layout-right { width: 42%; margin-top: 0.3em; margin-bottom: 0.8em; }
.art-picture.layout-left { float: left; margin-right: 1.6rem; }
.art-picture.layout-right { float: right; margin-left: 1.6rem; }
.art-picture.layout-left + .art-picture.layout-left { clear: left; }
.art-picture.layout-right + .art-picture.layout-right { clear: right; }
.art-gallery { clear: both; }
.art-gallery .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.art-gallery .tiles img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.art-gallery.look-mosaic .tiles { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
.art-gallery.look-mosaic .tiles img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
.cols { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); clear: both; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col > * + * { margin-top: 1em; }
.art-table { clear: both; }
.art-table .scroll { overflow-x: auto; }
.art-table table { border-collapse: collapse; width: 100%; font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.art-table th, .art-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.art-table th { color: var(--heading); border-bottom-width: 2px; }

.art-cards { clear: both; list-style: none; margin: 1.6em 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 0.95rem; }
.art-cards a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: inherit; text-decoration: none; line-height: 1.3; }
.art-cards .face { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 4px solid var(--card); box-shadow: 0 0 0 1px var(--rule), var(--shadow); }
.art-cards .face.none { display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); font-family: var(--serif); font-size: 2.2rem; }
.art-cards .name { font-weight: 700; color: var(--link); }
.art-cards a:hover .name { text-decoration: underline; }
.art-cards .years { color: var(--muted); font-size: 0.875rem; }
.art-cards .role { font-style: italic; }
.art-cards.look-list { grid-template-columns: 1fr; gap: 10px; }
.art-cards.look-list a { flex-direction: row; text-align: left; gap: 12px; }
.art-cards.look-list .face { width: 44px; height: 44px; margin: 0; border-width: 2px; font-size: 1.1rem; }

.art-relationship, .art-place, .art-lineage { clear: both; display: flex; gap: 14px; align-items: baseline; padding: 16px 20px; border-radius: 12px; font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 1rem; }
.art-relationship { background: var(--ok-soft); }
.art-place { background: var(--brass-soft); }
.art-lineage { background: var(--card); border: 1px solid var(--rule); color: inherit; text-decoration: none; }
.art-lineage:hover { border-color: var(--link); }
.art-lineage strong, .art-place strong { display: block; color: var(--heading); }
.art-lineage .line, .art-place .line { display: block; color: var(--muted); font-size: 0.9rem; }
.art-relationship .mark, .art-place .mark, .art-lineage .mark { font-weight: 700; color: var(--link); font-size: 1.2rem; }

.art-notes { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--rule); font-family: 'Ubuntu Sans', system-ui, sans-serif; font-size: 0.95rem; line-height: 1.5; color: var(--muted); clear: both; }
.art-notes h2 { margin: 0 0 0.6em; font-family: var(--serif); font-size: 1.2rem; color: var(--heading); }
.art-notes a { text-decoration: none; }

.art-side { display: flex; flex-direction: column; gap: 32px; font-size: 0.95rem; }
.art-side .eyebrow { margin: 0 0 12px; }
.art-side .persons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.art-side .persons a { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: inherit; text-decoration: none; }
.art-side .persons a:hover { border-color: var(--link); }
.art-side img, .art-side .face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.art-side .face { display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); font-family: var(--serif); font-size: 1.1rem; }
.art-side strong { display: block; color: var(--link); line-height: 1.25; }
.art-side .muted { font-size: 0.85rem; }
.about { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.about div { display: flex; justify-content: space-between; gap: 12px; }
.about dt { color: var(--muted); }
.about dd { margin: 0; text-align: right; font-weight: 600; }
.ai-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--brass-soft); line-height: 1.5; }
.ai-note strong { display: block; color: var(--ink); }
.ai-note.generated { border: 1px solid var(--brass); }
.ai-note.none { background: var(--ok-soft); }
.topics-small { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.topics-small a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.topics-small a:hover { text-decoration: underline; }

/* While reading (B397): a slim line on top – the picture, the title, how far one has come. */
.art-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--rule); box-shadow: 0 2px 10px rgb(0 0 0 / 0.08); transform: translateY(-110%); transition: transform 0.2s ease; }
.art-bar.on { transform: none; }
.art-bar-in { max-width: 1280px; margin: 0 auto; padding: 8px 40px; display: flex; align-items: center; gap: 12px; }
.art-bar img { width: 44px; height: 30px; object-fit: cover; border-radius: 3px; flex: none; }
.art-bar .title { font-family: var(--serif); font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-bar progress { display: block; width: 100%; height: 3px; border: 0; appearance: none; background: transparent; }
.art-bar progress::-webkit-progress-bar { background: transparent; }
.art-bar progress::-webkit-progress-value { background: var(--link); }
.art-bar progress::-moz-progress-bar { background: var(--link); }

/* Still to come: the teaser and the countdown. */
.art-coming { max-width: 46rem; margin: 32px auto 0; padding: 0 40px 96px; display: flex; flex-direction: column; gap: 18px; }
.art-coming .teaser { margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.6; color: var(--muted); }
.clock { display: flex; flex-wrap: wrap; gap: 14px; }
.clock span { display: flex; flex-direction: column; align-items: center; min-width: 96px; padding: 16px 12px; border-radius: 14px; background: var(--navy); color: var(--on-navy-muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.clock b { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--on-navy); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.clock.ready { display: block; font-weight: 700; color: var(--ok); }

.art-more { background: var(--card); border-top: 1px solid var(--rule); padding: 56px 0 72px; }
.art-more h2 { margin: 0 0 24px; font-family: var(--serif); font-size: 1.8rem; color: var(--heading); }
.art-more p { margin: 32px 0 0; }

@media (max-width: 1180px) {
  .art-room.with-toc { grid-template-columns: minmax(0, 44rem) 240px; }
  .art-room.with-toc .art-toc { grid-column: 1 / -1; position: static; max-height: none; }
  .art-toc details:not([open]) summary, .art-toc summary { cursor: pointer; }
}
@media (max-width: 960px) {
  .art-hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 24px; }
  .art-cover { order: -1; }
  .art-room, .art-room.with-toc { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 24px 64px; }
  .art-toc, .art-side { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .art-hero-in, .art-room, .art-coming { padding-left: 16px; padding-right: 16px; }
  .art-bar-in { padding: 8px 16px; }
  .art-body { font-size: 1.1rem; }
  .art-picture.layout-left, .art-picture.layout-right { float: none; width: auto; margin-left: 0; margin-right: 0; }
  .art-picture.layout-full { margin-left: 0; margin-right: 0; }
  .cols, .cols-3 { grid-template-columns: 1fr; }
  .clock span { min-width: 72px; }
}
@media (prefers-reduced-motion: reduce) { .cards a, .art-bar { transition: none; } .cards a:hover { transform: none; } }

/* AI marking (B395): clear wherever the article is read – a note above the text when AI had a hand in it, a mark on the cards. */
.ai-mark { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--brass-soft); color: var(--ink); font-weight: 700; font-size: 0.85em; text-decoration: none; }
a.ai-mark:hover { text-decoration: underline; }
.ai-mark.generated { background: var(--brass); color: var(--paper); }
.ai-mark.none { background: var(--ok-soft); }
