/* The research library's paper card, one design everywhere: /forskning, the Team index and the research tabs of the
   home page and /artikler. The public catalogue renderer and scientific reader share the card markup.
   "#main" keeps these rules above the site's general heading and text rules
   (type.css) on the marketing pages. Colours and font are the library's palette (serving/web/style.css :root). */
#main .document-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; list-style: none; margin: 24px 0 0; padding: 0; }
@media (min-width: 720px) { #main .document-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { #main .document-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#main .document-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: #faf6f5; border: 1px solid #e5b2a1; border-radius: 15px; color: #332926; font: var(--weight-regular) 17px/1.3 var(--font-sans); }
#main .document-card-art { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, #faf6f5, #f2d7ce); }
#main .document-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
#main .document-card-content { flex: 1; display: flex; flex-direction: column; padding: 24px; }
@media (max-width: 600px) { #main .document-card-content { padding: 20px; } }
#main .document-card h2 { font: var(--weight-semibold) 18px/1.35 var(--font-sans); margin: 0; overflow-wrap: anywhere; }
#main .document-card h2 a { color: #332926; text-decoration: none; }
#main .document-card h2 a:hover { color: #663d29; text-decoration: none; }
/* The title link covers the whole card, so the picture opens the paper too; still one link per card. */
#main .document-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 15px; }
#main .document-card:has(h2 a:focus-visible) { outline: 2px solid #46698c; outline-offset: 2px; }
#main .document-card h2 a:focus-visible { outline: none; }
/* Card sections are separated by one empty line: summary, authors (brown, smaller, two lines), "journal · year" in black, language line.
   Cards in a row share one height: the language line sits at the foot. */
#main .document-card p { font-size: 15px; line-height: 1.45; margin: 12px 0 0; }
#main .document-card .document-excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; line-clamp: 4; overflow: hidden; }
#main .document-card .citation { margin-top: 22px; font-size: 13px; color: #663d29; overflow-wrap: anywhere; }
#main .document-card .citation-authors { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
#main .document-card .citation-journal { margin-top: 22px; color: #332926; }
#main .document-card .document-meta { margin-top: auto; padding-top: 22px; font-size: 13px; color: #663d29; }
/* The picture fades in once loaded (/fade-in.js). */
html.js #main .document-card-art img:not(.is-loaded) { opacity: 0; }
html.js #main .document-card-art img.is-fading { animation: img-fade .35s ease-out; }
@media (prefers-reduced-motion: reduce) { html.js #main .document-card-art img.is-fading { animation: none; } }
