/* ============================================================
   Moyne Ross — Technical Library
   ------------------------------------------------------------
   The hub is set in the Insights hub's design (css/insights.css,
   body.page-insights); library pages in the papers' article system
   (css/insights-article.css, body.cmp-journal). This file carries
   only what the library adds to each. Class prefix .tl-*
   ============================================================ */

/* ============================================================
   Hub (Nov 2026)
   ============================================================ */

/* Search the library: the Insights search, as set in insights.html. */
.research-search { position: relative; max-width: 640px; margin: 36px 0 0; }
.research-search-label { display: block; margin: 0 0 6px; font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: 1.7px; text-transform: uppercase; color: var(--text-muted); }
.research-search-field { position: relative; display: flex; align-items: center; border-bottom: 1px solid rgba(232, 230, 225, .28); transition: border-color .2s; }
.research-search-field:focus-within { border-bottom-color: var(--teal); }
.research-search-field svg { position: absolute; left: 0; color: rgba(232, 230, 225, .5); pointer-events: none; transition: color .2s; }
.research-search-field:focus-within svg { color: var(--teal); }
.research-search-field input { width: 100%; padding: 12px 4px 12px 30px; border: 0; border-radius: 0; background: transparent; color: #e8e6e1; font-family: var(--font-reading); font-optical-sizing: auto; font-size: clamp(18px, 1.35vw, 21px); font-weight: 300; line-height: 1.4; outline: none; -webkit-appearance: none; appearance: none; }
.research-search-field input::placeholder { color: rgba(232, 230, 225, .42); font-style: italic; }
.research-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.research-results { list-style: none; margin: 0; padding: 4px 0; border-bottom: 1px solid rgba(232, 230, 225, .14); }
.research-results li + li { border-top: 1px solid rgba(232, 230, 225, .08); }
.research-results li a { display: grid; gap: 4px; padding: 14px 4px 14px 30px; text-decoration: none; outline: none; transition: background .15s; }
.research-results li a:hover, .research-results li a:focus { background: rgba(74, 155, 155, .07); }
.research-results .rr-kind { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); }
.research-results .rr-title { font-family: var(--font-reading); font-size: 19px; line-height: 1.3; color: #efede8; }
.research-results .rr-blurb { font-family: var(--font-sans); font-size: 13px; line-height: 1.5; color: rgba(232, 230, 225, .6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.research-results .rr-empty { padding: 14px 4px 14px 30px; font-family: var(--font-reading); font-size: 16px; font-style: italic; color: rgba(232, 230, 225, .6); }

/* Four groups instead of seven parts, as jump links at the head of the library */
.tl-hub .tl-doors-index { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 26px; }

/* Show pages for a kind of building */
.tl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.tl-filter button {
  padding: 7px 14px; border: 1px solid rgba(232, 230, 225, .18); border-radius: 999px; background: transparent;
  font-family: var(--font-sans); font-size: 12px; letter-spacing: .3px; color: var(--text-muted); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.tl-filter button:hover { color: var(--text-primary); border-color: rgba(232, 230, 225, .4); }
.tl-filter button.is-active { color: var(--dark, #1a2530); background: var(--teal); border-color: var(--teal); }

/* The framework section within each group */
.tl-section-group { scroll-margin-top: calc(var(--nav-height, 68px) + 16px); }
.tl-section-group + .tl-section-group { margin-top: 18px; }
.tl-section-label {
  margin: 0; padding: 18px 0 10px;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--teal);
}
.tl-door { scroll-margin-top: calc(var(--nav-height, 68px) + 16px); }

/* A reference list of 103 pages: the Insights rows, set a little tighter. */
.tl-door .archive-row { padding: clamp(18px, 1.7vw, 26px) 0; }
.tl-door .archive-num { font-size: clamp(24px, 2vw, 34px); }
.tl-door .archive-copy h3 { font-size: clamp(22px, 1.7vw, 28px); }
.tl-door .archive-copy p { margin-top: 6px; }

/* How findings are graded */
.tl-grading-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin: 28px 0 0; border-top: 1px solid rgba(143,163,176,.16); }
.tl-grading-list div { padding: 16px 18px 18px 0; border-bottom: 1px solid rgba(143,163,176,.16); }
.tl-grading-list dt { margin: 0 0 6px; font-family: var(--font-serif); font-size: 21px; color: var(--text-primary); }
.tl-grading-list dd { margin: 0; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }

/* Common questions */
.tl-faq { margin-top: 20px; border-top: 1px solid rgba(143,163,176,.16); }
.tl-faq details { border-bottom: 1px solid rgba(143,163,176,.16); }
.tl-faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative;
  font-family: var(--font-reading); font-size: clamp(18px, 1.4vw, 21px); color: var(--text-primary);
}
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-family: var(--font-sans); font-size: 20px; color: var(--teal); }
.tl-faq details[open] summary::after { content: '–'; }
.tl-faq p { margin: 0 0 20px; max-width: 760px; font-family: var(--font-sans); font-size: 15px; line-height: 1.65; color: var(--text-secondary, rgba(232,230,225,.78)); }

@media (max-width: 900px) {
  .tl-hub .tl-doors-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tl-hub .tl-doors-index { grid-template-columns: 1fr; }
}

/* ============================================================
   Library pages in the Capital Made Physical article system
   (Nov 2026). The page itself is set by insights-article.css
   (cmp-journal); these rules cover only what the library adds:
   a cover without a photograph, the contents list, element and
   space links, caution callouts and diagnostic tables.
   ============================================================ */

/* The cover carries no photograph, so it is not held to a full screen. */
.tl-article-page .tl-cover { min-height: 0; justify-content: flex-start; padding-bottom: 0; }
.tl-article-page .tl-cover .article-cover-main { margin: 0 auto; }
.tl-article-page .tl-cover .article-header h1 { max-width: 18ch; }
.tl-article-page .tl-cover .research-basis { margin-top: clamp(34px, 4vw, 56px); margin-bottom: clamp(28px, 3vw, 44px); }
.tl-article-page .tl-cover .research-basis-item strong { font-size: 14px; line-height: 1.4; }

/* Anchored sections land below the fixed navigation. */
.tl-article-page .cmp-chapter,
.tl-article-page .cmp-thesis { scroll-margin-top: calc(var(--nav-height, 68px) + 12px); }

/* Sub-headings inside a chapter */
.tl-article-page .article-body .cmp-chapter-copy h3 { margin: 40px 0 14px; font-size: 16px; letter-spacing: .01em; }
.tl-article-page .article-body .cmp-chapter-copy h3:first-child { margin-top: 0; }
.tl-article-page .article-body .cmp-chapter-copy > p:first-child + h3 { margin-top: 32px; }

/* Diagnostic tables: the first column names the sign or the matter. */
.tl-article-page .cmp-table tbody th { font-weight: 500; }
.tl-article-page .cmp-table strong { color: var(--text-primary); }

/* Callouts: notes in teal, cautions in amber. */
.tl-article-page .article-body .tl-signal { margin: 36px 0; }
.tl-article-page .article-body .tl-signal--warn { border-left-color: var(--impact-amber, #e0a33a); }
.tl-article-page .article-body .tl-signal--warn span { color: var(--impact-amber, #e0a33a); }

/* On this page */
.tl-article-page .tl-contents { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgba(143,163,176,.16); font-family: var(--font-sans); }
.tl-article-page .tl-contents > span { display: block; margin-bottom: 12px; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); }
.tl-article-page .article-body .tl-contents ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; counter-reset: tl-contents; font-family: var(--font-sans); font-size: 14px; line-height: 1.4; }
.tl-article-page .article-body .tl-contents li { break-inside: avoid; margin: 0; padding: 5px 0; counter-increment: tl-contents; }
.tl-article-page .article-body .tl-contents li::before { content: counter(tl-contents, decimal-leading-zero); display: inline-block; width: 26px; font-size: 10px; letter-spacing: 1px; color: var(--teal); }
.tl-article-page .article-body .tl-contents a { color: var(--text-secondary); border-bottom: 0; }
.tl-article-page .article-body .tl-contents a:hover { color: var(--teal); }

/* Elements in a space, or the spaces an element sits in */
.tl-article-page .tl-links { margin: 28px 0 0; font-family: var(--font-sans); }
.tl-article-page .tl-links-label { display: block; margin-bottom: 10px; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-dim); }
.tl-article-page .article-body .tl-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-article-page .article-body .tl-links li { margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 1; }
.tl-article-page .article-body .tl-links li a { display: inline-block; padding: 7px 12px; border: 1px solid rgba(143,163,176,.24); border-radius: 999px; color: var(--text-secondary); }
.tl-article-page .article-body .tl-links li a:hover { color: var(--teal); border-color: var(--teal); }
.tl-article-page .tl-links li .tl-pending { color: var(--text-dim); }

/* Method note under the sources */
.tl-article-page .article-body .tl-method-note { margin-top: 28px; font-family: var(--font-sans); font-size: 14px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 1000px) {
  .tl-article-page .tl-cover .research-basis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-article-page .tl-cover .research-basis-item:nth-child(3) { border-left: 0; }
}
@media (max-width: 640px) {
  .tl-article-page .article-body .tl-contents ol { columns: 1; }
}
