/* The theme's own styles, for what the design folder does not draw: list, site map, 404, search, and small parts of the real templates.
   Same layer order as style.css, the design's tokens only (--t1 to --t7 for sizes, --zone, --beat, --ctl, --btn-h for room), so that its scale carries them. */

@layer comp {
  /* Without the script the top search is a plain form to the results page. */
  :root:not(.a-js) .a-search-f { display: flex; }

  /* The strip steps back where it would share a tall window with the first button of the old text. See a_strip(). */
  @media (min-height: 820px) { .a-strip--low { display: none; } }

  /* The note beside the number of titles takes a line of its own when the cell cannot hold both: a tablet and a list of hundreds. */
  .a-key-c dd { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .375rem; }
  .a-key-c small { margin-left: 0; }

  /* The sentence that points at the table, moved from the page's text to just above it. */
  .a-lead { margin-block: var(--beat); max-width: 44rem; font-size: var(--t3); line-height: 1.6; }
  .a-lead p { margin: 0; }
  .a-lead p + p { margin-top: .5rem; }
  .a-lead a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

  /* A value in a table never splits. Only a long company name in the first column may break. */
  .atl td { overflow-wrap: normal; }

  /* Parts of a reading page around the old text */
  .a-postmeta { margin-block: -.25rem 1rem; color: var(--ink-2); font-size: var(--t1); }
  .a-postmeta a { color: inherit; }
  .a-factlink { margin-bottom: 1rem; }
  .a-copyable { cursor: pointer; }
  .a-factbox, .a-riskbox { margin-top: var(--zone); }
  .a-factbox > h2, .a-riskbox > h2 { margin-top: 0; }
  .a-stamp.a-dates { display: block; margin-top: var(--zone); padding-top: var(--beat); border-top: 1px solid var(--line); }
  .a-prose .a-stamp a { color: inherit; }

  /* Lists: /magazin/, search results, date archives, 404. The same centred column as a reading page, plain text on the page, hairlines between items. */
  .a-p-list .a-col { width: 100%; max-width: 44rem; margin-inline: auto; }
  .a-list { margin-block: var(--zone) 0; }
  .a-list-i { padding-block: 1.25rem; border-top: 1px solid var(--line); }
  .a-list-t { font-size: var(--t4); line-height: 1.25; font-weight: 600; text-wrap: pretty; }
  .a-list-t a:hover { text-decoration: underline; }
  .a-list-i .a-postmeta { margin-block: .25rem 0; }
  .a-list-x { margin-top: .375rem; color: var(--ink-2); font-size: var(--t2); line-height: 1.5; text-wrap: pretty; }
  .pagination { margin-top: var(--zone); }
  .pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pagination .nav-links { display: flex; flex-wrap: wrap; gap: .375rem; }
  .pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: var(--ctl); min-height: var(--ctl); padding-inline: .75rem; border: 1px solid var(--line); border-radius: var(--r-s); font-size: var(--t2); font-weight: 600; }
  .pagination a.page-numbers:hover { border-color: var(--ink); }
  .pagination .page-numbers.current { background: var(--arm-cur); border-color: var(--arm-cur); color: var(--band-ink); }
  .pagination .page-numbers.dots { border-color: transparent; }

  /* The sections on the error and empty result pages: a list right under its heading. */
  .a-sec--flat > h2 + .a-rels { margin-top: .75rem; }

  /* The plain search of the error and result pages */
  .a-sform { display: flex; gap: .5rem; margin-block: var(--beat) 0; }
  .a-title + .a-sform { margin-top: 1.5rem; }
  .a-sform input { flex: 1; min-width: 0; height: var(--btn-h); padding-inline: 1rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--field); color: var(--field-ink); font-size: var(--t3); appearance: none; }
  .a-sform input::placeholder { color: var(--field-ink-2); opacity: 1; }
  .a-sform input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
  .a-sform .a-btn { flex: none; }

  /* /mapa-webu/: all sections and pages as plain links */
  .a-sitemap:focus { outline: 0; }
  .a-sitemap-t { margin-block: var(--beat); max-width: 44rem; line-height: 1.6; }
  .a-sitemap-t a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
  .a-sitemap .a-sec { margin-block: var(--zone); }
  .a-sitemap .a-sec-h h2 a:hover { text-decoration: underline; }
  .a-smap { columns: 3 17rem; column-gap: 2.5rem; }
  .a-smap-g { break-inside: avoid; margin-bottom: 1.5rem; }
  .a-smap-g h3 { padding-bottom: .375rem; margin-bottom: .25rem; border-bottom: 1px solid var(--line); }
  .a-smap-l { list-style: none; margin: 0; padding: 0; }
  .a-smap-l a { display: block; padding-block: .3rem; font-size: var(--t2); line-height: 1.3; }
  .a-smap-l a:hover { text-decoration: underline; }
  @media (max-width: 759px) { .a-sitemap .a-sec-h { margin-bottom: 1rem; } }
}
