/* sections.css: the styles of xslt/sections.xslt. */

div.section h2 { font-size: 1.2em; font-weight: normal; margin: 1.2em 0 0.2em; }
div.section h2 a { color: var(--fg-strong); text-decoration: none; }
div.section h2 a:hover { text-decoration: underline; }
div.section p.count { color: var(--fg-4); margin: 0 0 1em; font-size: 0.9em; }
div.section h3 { font-size: 1.05em; font-weight: normal; margin: 1.6em 0 0.4em; }
div.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16em, 1fr)); gap: 16px; margin: 1em 0 2em; }
div.cards > section { border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px 12px; min-width: 0; }
div.cards h3 { margin: 0; font-size: 1.05em; }
div.cards h3 a { color: var(--fg-strong); text-decoration: none; }
div.cards h3 a:hover { text-decoration: underline; }
div.cards p { margin: 0.4em 0 0; font-size: 0.9em; color: var(--fg-4); }
div.cards p.subregions a { color: var(--fg-2); text-decoration: none; }
div.cards p.subregions a:hover { color: var(--fg-strong); text-decoration: underline; }
/* the two short articles above the teasers of the home page (blog.xslt, #65) */
div.home-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(18em, 1fr)); gap: 16px 32px; margin: 1em 0 1.5em; }
div.home-posts article { min-width: 0; }
div.home-posts h2 { font-size: 1.35em; line-height: 1.25; margin: 0.4em 0 0.4em; color: var(--fg-strong); }
div.home-posts h3 { font-size: 1em; margin: 1em 0 0.2em; }
div.home-posts p, div.home-posts ul { line-height: 1.6; color: var(--fg-2); margin: 0 0 0.6em; }
div.home-posts ul { padding-left: 1.2em; }
div.rows { margin: 0 0 2em; }
div.rows > section { display: grid; grid-template-columns: 14em minmax(0, 1fr) auto; column-gap: 24px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--border); }
div.rows > section > h3 { grid-area: 1 / 1; margin: 0; font-size: 1.05em; }
div.rows > section > p { grid-area: 2 / 1; margin: 0.4em 0 0; font-size: 0.9em; color: var(--fg-4); }
div.rows > section > nav.letters, div.rows > section > ul.entries { grid-area: 1 / 2 / 3 / 3; margin: 0; }
div.rows > section > a.more { grid-area: 1 / 3; margin: 0; }
div.rows h3 a { color: var(--fg-strong); text-decoration: none; }
div.rows h3 a:hover { text-decoration: underline; }
div.rows ul.entries { display: flex; flex-wrap: wrap; gap: 4px 24px; }
@media (max-width: 40em) { div.rows > section { grid-template-columns: minmax(0, 1fr) auto; } div.rows > section > h3 { grid-area: 1 / 1; } div.rows > section > p { grid-area: 2 / 1 / 3 / 3; } div.rows > section > nav.letters, div.rows > section > ul.entries { grid-area: 3 / 1 / 4 / 3; margin-top: 0.8em; } div.rows > section > a.more { grid-area: 1 / 2; } }
span.count { color: var(--fg-4); font-size: 0.85em; font-weight: normal; margin-left: 0.4em; }
ul.entries { list-style: none; margin: 0.5em 0 0; padding: 0; }
ul.entries li { padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.entries a { color: var(--fg); text-decoration: none; }
ul.entries a:hover { text-decoration: underline; }
a.more { display: inline-block; margin-top: 0.4em; font-size: 0.85em; }
ul.companies { list-style: none; margin: 1em 0 2em; padding: 0; columns: 24em; column-gap: 32px; }
ul.companies li { padding: 3px 0; break-inside: avoid; }
ul.companies li > a { color: var(--fg); text-decoration: none; }
ul.companies li > a:hover { text-decoration: underline; }
ul.companies span.years { margin-left: 0.4em; font-size: 0.8em; font-variant-numeric: tabular-nums; }
/* inline-block: the years have no space between them, so a long name
   with many years would not wrap but widen the page on a phone */
ul.companies span.years a { display: inline-block; color: var(--fg-4); margin-left: 0.3em; }
ul.companies li.none { color: var(--fg-5); }
/* the country code after a company in the lists of companies and sectors (#69) */
ul.companies span.country, ul.entries span.country { color: var(--fg-4); font-size: 0.85em; }
/* "(from PDF)" after a company whose report is its tables from PDF (cubes/companies.xml) */
ul.companies span.source, ul.entries span.source { color: var(--fg-4); font-size: 0.85em; white-space: nowrap; }
nav.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 1em 0 0; }
div.top > nav.letters { margin: 0; padding: 8px 0; }
nav.letters a, nav.letters span { min-width: 1.4em; padding: 2px 6px; border: 1px solid var(--border-2); border-radius: 4px; text-align: center; color: var(--fg); text-decoration: none; }
nav.letters a:hover { background: var(--hover); }
nav.letters a[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
nav.letters span { color: var(--fg-faint); border-color: var(--border-faint); }
nav.subregions { display: flex; flex-wrap: wrap; gap: 4px; margin: 0.4em 0 0; font-size: 0.9em; }
nav.subregions a { padding: 2px 10px; border: 1px solid var(--border-2); border-radius: 4px; color: var(--fg); text-decoration: none; }
nav.subregions a:hover { background: var(--hover); }
/* the region of a sector, the sector of a region: a fly-over box under the
   button; a click outside lands on the clear layer of the open summary and
   closes it (no script), as details.langs */
details.filter { position: relative; width: fit-content; margin: 0.4em 0 0.8em; font-size: 0.9em; }
details.filter > summary { list-style: none; padding: 2px 10px; border: 1px solid var(--border-2); border-radius: 4px; color: var(--fg); cursor: pointer; }
details.filter > summary::-webkit-details-marker { display: none; }
details.filter > summary::after { content: " ▾"; color: var(--fg-4); }
details.filter > summary:hover { background: var(--hover); }
details.filter[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 1; cursor: default; }
nav.filter { position: absolute; z-index: 2; top: 100%; left: 0; box-sizing: border-box; min-width: 100%; max-width: calc(100vw - 32px); max-height: 60vh; overflow-y: auto; margin-top: 0.3em; padding: 4px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); box-shadow: 0 8px 32px var(--shadow); }
nav.filter ul { list-style: none; margin: 0; padding: 0; }
nav.filter ul ul { padding-left: 1em; }
nav.filter a { display: flex; justify-content: space-between; gap: 1.5em; padding: 2px 8px; border-radius: 4px; color: var(--fg); text-decoration: none; white-space: nowrap; }
nav.filter a:hover { background: var(--surface-hover); }
nav.filter a[aria-current] { background: var(--fg); color: var(--bg); }
nav.filter a[aria-current] span.count { color: inherit; }
form.search { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0; }
form.search input[type=search] { font: inherit; background: var(--bg); color: var(--fg); padding: 4px 8px; border: 1px solid var(--border-3); border-radius: 4px; width: min(24em, 100%); }
form.search button { font: inherit; padding: 4px 14px; border: 1px solid var(--border-4); border-radius: 4px; background: var(--surface); color: var(--fg); cursor: pointer; }
