/* research.mettler.xyz -- what the site adds to a tex2html article page:
   "All articles" in the section menu, the row of PDF/DOI/arXiv links
   under the abstract, figures, and the installed app's safe areas. The page's
   own look is html-notes-CSS/article.css, inlined by tex2html. */

/* The installed app draws under the status bar and, in landscape, beside the
   rounded corners; the page's own gutters (article.css) stay as they are and
   the insets are added outside them. */
html {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* "All articles", first in tex2html's section menu, styled like the section
   entries its script adds below it and set off from them by a rule. */
#t2h-menu li.rp-home {
    margin: 0 0 0.3rem;
    padding: 0 0 0.3rem;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
}
/* alone in the menu (a stub page): nothing below to set it off from */
#t2h-menu li.rp-home:last-child { margin: 0; padding: 0; border-bottom: 0; }
#t2h-menu li.rp-home a {
    display: block;
    font-size: 0.95rem; line-height: 1.3; font-weight: 600;
    color: var(--link);
    text-decoration: none;
    border-radius: 0.35rem;
    padding: 0.4rem 0.6rem;
}
#t2h-menu li.rp-home a:hover {
    background: color-mix(in srgb, var(--text) 8%, var(--background));
}
/* A stub page has no sections: its nav floats at the top of the page itself. */
body > #t2h-nav { margin-top: 0.6rem; }

ul.rp-links {
    display: flex; flex-wrap: wrap; gap: 0.8rem clamp(1rem, 5vw, 2rem); justify-content: center;
    list-style: none; margin: 1.6rem 0 0; padding: 0;
}
ul.rp-links li { margin: 0; padding: 0; }
ul.rp-links li::before { content: none; }
ul.rp-links a { display: block; border-radius: 50%; padding: 2px; }
/* 80px on a tablet or desktop, scaling down on a phone (48px at 320px wide) */
ul.rp-links img { display: block; width: clamp(48px, 15vw, 80px); height: clamp(48px, 15vw, 80px); }
@media (prefers-color-scheme: dark) {
    ul.rp-links img { filter: invert(1) brightness(0.843); }
}
.rp-note { font-style: italic; opacity: 0.75; }

/* Figures: never wider than the column. Line drawings are black on white and
   are inverted in dark mode; the rendered surfaces keep their colours and get
   a light card instead. */
img.fig { display: block; max-width: 100%; height: auto; margin: 1rem auto; }
img.fig.photo { max-width: min(100%, 34rem); border-radius: 0.4rem; }
img.fig.line-art { max-width: min(100%, 30rem); }
@media (prefers-color-scheme: dark) {
    img.fig.line-art { filter: invert(1) hue-rotate(180deg) brightness(0.85); }
    img.fig.photo { background: #f4f4f4; padding: 0.5rem; }
}

/* Each author's address, from \\address, under the name: amsart prints these at
   the end of the paper, which a paged HTML article would bury in its last
   section. */
#title-block-header p.author { margin-bottom: 0; }
#title-block-header p.affil {
    margin: 0.1rem auto 0.9rem;
    max-width: 28rem;
    font-size: 0.8rem;
    line-height: 1.35;
    opacity: 0.72;
    text-align: center;
}
