/* TML Article List 1.31 — one look for every list of articles. Same look as the search results it replaces.
   Everything is scoped to .tml-al, so the theme's other styles are not touched. */

.tml-al { max-width: 100%; box-sizing: border-box; overflow-wrap: break-word; }
.tml-al *, .tml-al *::before, .tml-al *::after { box-sizing: inherit; }

/* heading line: "Results (11 articles found)" on the left, "Sort by: Relevance | Date" on the right */
.tml-al .tml-al-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 18px 0 8px; }
.tml-al .tml-al-heading { margin: 0 !important; }
.tml-al .tml-al-count { font: inherit; color: #666; margin-left: 4px; }
.tml-al .tml-al-sort { font-size: 90%; color: #666; line-height: 1.6; white-space: nowrap; }
.tml-al .tml-al-sort-by { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.tml-al .tml-al-sort-by:not(.is-on) { color: #1a5f9e; }
.tml-al .tml-al-sort-by.is-on { font-weight: bold; color: #333; text-decoration: none; cursor: default; }

.tml-al .tml-al-notice { border-left: 4px solid #ec8867; background: #fff; padding: 8px 12px; font-weight: 600; margin: 0 0 10px; }
.tml-al .tml-al-empty { color: #666; }

/* one article */
.tml-al .tml-al-item { padding: 8px 0; border-top: 1px solid #bbb; }
.tml-al .tml-al-items > .tml-al-item:first-child { border-top: 0; }   /* 1.19: no line above the first entry (the archive keeps its own) */
.tml-al .tml-al-meta { margin: 0 0 2px; font-size: calc(90% - 2px); color: #666; }
.tml-al .tml-al-title { display: inline; font-size: calc(1em + 1px); font-weight: 600 !important; text-decoration: none; }
.tml-al .tml-al-title:hover { text-decoration: underline; }
/* 1.14 - grey, commented out (it read as "disabled" and was faint: 3.5:1 contrast)
.tml-al .tml-al-title:visited { color: #888 !important; }   /* already-opened articles turn grey, as in the site search *\/
*/
/* 1.15 - dusty slate blue, commented out (darker than the link blue, so visited titles stood out more)
.tml-al .tml-al-title:visited { color: #5b6f96 !important; }
*/
.tml-al .tml-al-title:visited { color: #7a8cae !important; }   /* already-opened articles: light slate blue, lighter than the link blue (1.15) */
.tml-al .tml-al-excerpt { margin: 4px 0 0; font-size: 100%; color: #444; }
.tml-al .tml-al-excerpt b { font-weight: bold; }

/* "Free" marker, the site search's button at 90% size */
.tml-al .tml-al-free { display: inline-block; margin-left: 20px; padding: 1px 7px; font-size: 90%; font-weight: normal !important; line-height: 1.4;
  color: #333 !important; background: #fff; border: 1px solid #ccc; border-radius: 3px; text-decoration: none !important; vertical-align: 1px; }
.tml-al .tml-al-free:hover { background: #e6e6e6; border-color: #adadad; }
.tml-al button.tml-al-free { font-family: inherit; cursor: pointer; }               /* Add to Cart, same look as Free */
.tml-al .tml-al-meta a.tml-al-issue:link, .tml-al .tml-al-meta a.tml-al-issue:visited { color: #1D75BC !important; text-decoration: none; }   /* always blue (1.3) */
.tml-al .tml-al-meta .tml-al-issue:hover { text-decoration: underline; }

/* numbered lists (Most Read): 1, 2, 3 … in orange squares beside each article (1.6) */
.tml-al.tml-al-numbered .tml-al-item { display: flex; align-items: flex-start; gap: 12px; }
.tml-al.tml-al-numbered .tml-al-item[hidden] { display: none !important; }
.tml-al .tml-al-num { flex: none; width: 30px; height: 30px; margin-top: 2px; background: #d84010; color: #fff; font-size: 20px; font-weight: bold;
  line-height: 30px; text-align: center; }
.tml-al .tml-al-body { flex: 1; min-width: 0; }

/* the archive (class tml-al-archive): the line under each issue heading, 1px black (1.11) */
.tml-al.tml-al-archive .tml-al-items > .tml-al-item:first-child { border-top: 1px solid #000; }
/* 1.24: the archive has no lines between articles; each title has an orange-red triangle in front, with wrapped lines
   of the title lining up after it (the line under each issue heading, above, stays) */
/* 1.28 - 1.26 line, commented out (now indented 10px, with less space between articles):
.tml-al.tml-al-archive .tml-al-item { border-top: 0; padding-left: 15px; text-indent: -15px; }   (1.26: was 22px (title closer to the triangle))
*/
.tml-al.tml-al-archive .tml-al-item { border-top: 0; padding: 3px 0 3px 25px; text-indent: -15px; }   /* 1.28: triangles 10px in; 3px above and below each article (was 8px) */
.tml-al.tml-al-archive .tml-al-items > .tml-al-item:first-child { padding-top: 6px; }                   /* 1.28: a little room under the issue line */
.tml-al.tml-al-archive { margin-bottom: 8px; }                                                          /* 1.29: more space before the next issue's date */
@media (min-width: 601px) {
  .tml-al.tml-al-archive .tml-al-free { padding-top: 0; padding-bottom: 0; line-height: 1.25; }        /* 1.29: Free no taller than the title line, so rows stay evenly spaced */
  .tml-al.tml-al-archive .tml-al-free { margin-left: 8px; }                                             /* 1.30: Free closer to the title (was 20px) */
}
.tml-al.tml-al-archive .tml-al-item > * { text-indent: 0; }
.tml-al.tml-al-archive .tml-al-title::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: 6px; margin-bottom: 3px; vertical-align: middle;
  border-left: 9px solid #d84010; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }   /* 1.26: 20% smaller, closer (was 11px / 7px, 11px gap); 1.27: 3px under it */

/* the page's own note under the title, e.g. "Superseded by …" (1.8) */
.tml-al .tml-al-note { margin: 3px 0 0; font-size: calc(90% - 1px); }

/* citation line with "Show Introduction" */
.tml-al .tml-al-cite { margin: 5px 0 0; font-size: calc(90% - 2px); color: #666; }
.tml-al .tml-al-cite-text { white-space: pre-wrap; overflow-wrap: anywhere; }   /* long DOIs wrap instead of widening the page */
.tml-al .tml-al-intro-toggle { margin: 0 0 0 15px; padding: 0; background: none; border: 0; font: inherit; color: #1a5f9e; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.tml-al .tml-al-intro-toggle:first-child { margin-left: 0; }   /* 1.23: no citation before it (the archive), so no gap on the left */
.tml-al .tml-al-intro-inline { font-size: calc(90% - 2px); }   /* 1.25: at the end of the title line (the archive), same size as on the citation line */
.tml-al .tml-al-intro-toggle:focus-visible, .tml-al .tml-al-sort-by:focus-visible, .tml-al .tml-al-pager a:focus-visible { outline: 2px solid #1a5f9e; outline-offset: 2px; }

/* the drop-open introduction box */
.tml-al .tml-al-intro { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
/* 1.20 - white box with a 1px orange border, commented out (desktop now matches the phone: grey, orange bar on the left)
.tml-al .tml-al-intro-in { margin: 8px 0 4px; padding: 10px 12px; background: #fff !important; border: 1px solid #ec8867; border-radius: 2px;
  font-size: calc(90% - 1px); line-height: 1.5; color: #333; }
*/
.tml-al .tml-al-intro-in { margin: 8px 0 4px; padding: 10px 12px; background: #d6d6d6 !important; border: 0; border-left: 5px solid #d84010; border-radius: 0;
  font-size: calc(90% - 1px); line-height: 1.5; color: #333; }
@media (prefers-reduced-motion: reduce) { .tml-al .tml-al-intro { transition: none; } }

/* "Pages: previous 1 2 3 … next" */
.tml-al .tml-al-pager { border-top: 1px solid #bbb; padding: 14px 0 6px; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 38px; }
.tml-al .tml-al-pager-label { margin-right: 14px; color: #333; }
.tml-al .tml-al-pager a { font-weight: normal !important; text-decoration: none; }
.tml-al .tml-al-pager a:hover { text-decoration: underline; }
.tml-al .tml-al-page-on { color: #333; }

/* ---------------------------------------------------------------- phones (iPhone and similar, up to 600px wide) */
@media (max-width: 600px) {
  .tml-al .tml-al-head { flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 14px; }   /* sort control under the heading */
  .tml-al .tml-al-item { padding: 12px 0; }
  /* 1.16 - 1.5 line, commented out: the title is inline, so the item's own (wider) line spacing still set the gaps
  .tml-al .tml-al-title { line-height: 1.3; }
  */
  .tml-al .tml-al-item { line-height: 1.15; }                                   /* 1.16: tighter title lines (the title takes the item's spacing) */
  .tml-al .tml-al-title { line-height: 1.15; }
  .tml-al .tml-al-excerpt, .tml-al .tml-al-note { line-height: 1.4; }           /* 1.16: the text under the title keeps its spacing */
  .tml-al .tml-al-free { margin-left: 10px; padding: 3px 9px; }                    /* a little bigger to tap */
  .tml-al .tml-al-cite { font-size: 75%; line-height: 1.3; }
  /* 1.17: the introduction box in the site's mobile style (like the subscriber notice on article pages): grey, orange bar on the left */
  .tml-al .tml-al-intro-in { background: #d6d6d6 !important; border: 0; border-left: 5px solid #d84010; border-radius: 0; color: #333; }                     /* citation smaller and tighter (1.5) */
  /* 1.18 - text-link toggle, commented out (now a pill button, below)
  .tml-al .tml-al-intro-toggle { display: inline-block; margin: 2px 0 0 0; padding: 8px 0; }   (its own line, finger-sized)
  .tml-al .tml-al-cite-text + .tml-al-intro-toggle { display: block; }
  */
  /* 1.18: Show / Hide Introduction as a pill button: the site's link blue with white letters, a shade darker when open,
     a small arrow showing which way it goes; 32px tall, on its own line */
  .tml-al .tml-al-intro-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 0; padding: 5px 14px; min-height: 32px;
    border: 1px solid #1D75BC; border-radius: 999px; background: #1D75BC; color: #fff; text-decoration: none; line-height: 1; }
  .tml-al .tml-al-cite-text + .tml-al-intro-toggle { display: flex; width: max-content; }
  .tml-al .tml-al-intro-toggle[aria-expanded="true"] { background: #155a91; border-color: #155a91; }
  .tml-al .tml-al-intro-toggle::after { content: "\25BC"; font-size: 0.65em; }
  .tml-al .tml-al-intro-toggle[aria-expanded="true"]::after { content: "\25B2"; }
  .tml-al .tml-al-sort-by { padding: 6px 2px; }
  /* 1.28 - 1.26 line, commented out:
  .tml-al.tml-al-archive .tml-al-item { padding-left: 18px; text-indent: -18px; }    (1.24: a larger triangle for the larger type; 1.26: was 26px)
  */
  .tml-al.tml-al-archive .tml-al-item { padding: 6px 0 6px 28px; text-indent: -18px; }   /* 1.28: triangles 10px in; 6px above and below (was 12px) */
  .tml-al.tml-al-archive .tml-al-items > .tml-al-item:first-child { padding-top: 10px; }
  .tml-al.tml-al-archive .tml-al-title::before { margin-right: 7px; border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }   /* 1.26: was 12px gap, 14px / 9px */
  .tml-al .tml-al-intro-inline { display: flex; width: max-content; margin: 8px 0 0 0; font-size: 75%; }   /* 1.25: the archive: on phones the pill goes on its own line under the title */
  .tml-al .tml-al-pager { gap: 4px 4px; }
  .tml-al .tml-al-pager-label { width: 100%; margin: 0 0 2px; }
  .tml-al .tml-al-pager a, .tml-al .tml-al-page-on { display: inline-block; min-width: 40px; padding: 10px 8px; text-align: center; }   /* 40px+ tap targets */
}

.tml-al [hidden] { display: none !important; }   /* pages not shown; some themes override the browser's own rule */
