/* research.mettler.xyz -- the index page. The look of the Research tab on
   www.mettler.xyz (css/style.css there), narrowed to what this page uses and
   made to fit an installed app: safe-area insets, real buttons for the
   accordion, and room for a finger on the link icons. */

:root {
    --body-bg-color: white;
    --text-color: black;
    --muted: #707B7C;
    --hover-color: #333333;
    --rule: currentColor;
}

@media (prefers-color-scheme: dark) {
    :root {
        --body-bg-color: #282828;
        --text-color: #d7d7d7;
        --muted: #9aa3a4;
        --hover-color: #81D4FA;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--body-bg-color);
    margin: 0;
    padding: max(2vw, env(safe-area-inset-top)) max(4vw, env(safe-area-inset-right))
             env(safe-area-inset-bottom) max(4vw, env(safe-area-inset-left));
}

a, a:visited { color: inherit; text-decoration: none; }

#navbar, #content, #footer {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

#navbar { padding: 16px 0 36px; }

h1 {
    font-weight: 900;
    font-size: clamp(32px, 4vw + 18px, 54px);
    margin: 0 18px 0 0;
    display: inline;
}

#sidegig {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-weight: 900;
    font-size: clamp(34px, 4vw + 18px, 48px);
    display: inline-block;
    background-image: linear-gradient(to right, #58D68D, #68C4EC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding-right: 0.15em;          /* the italic overhang is clipped without it */
}

h2 {
    font-size: 30px;
    font-weight: 900;
    margin: 0 0 18px;
}

#content { font-size: 21px; }
#content .post { margin: 0 0 50px; }

/* --- accordion ---------------------------------------------------------- */

.accordionmain {
    display: flex;
    gap: 0.4em;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.accordionmain .num { flex: none; min-width: 1.6em; }
.accordionmain .ttl { font-weight: 600; }
.accordionmain .venue { color: var(--muted); }
.accordionmain:hover .ttl,
.accordionmain[aria-expanded="true"] .ttl { text-decoration: underline; }

.panelmain {
    display: none;
    margin: 0 0 24px;
    padding: 12px 0 0;
    font-size: 19px;
    line-height: 1.35;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    border-top: 2px solid var(--rule);
    border-bottom: 2px solid var(--rule);
}
.panelmain.show { display: block; }

.abstract {
    font-family: 'Source Serif 4', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 21px;
    display: inline;
}
.abstract-body, .abstract-body p { display: inline; margin: 0; }

/* --- link icons ---------------------------------------------------------- */

ul { list-style: none; margin: 0; padding: 0; }

.footerlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 14px 0 10px;
}
.footerlinks a { display: block; padding: 2px; border-radius: 50%; }
.footerlinks img { display: block; width: 45px; height: 45px; }
.footerlinks a:hover, .footerlinks a:focus-visible { background: color-mix(in srgb, var(--text-color) 10%, transparent); }

@media (prefers-color-scheme: dark) {
    .footerlinks img { filter: invert(1) brightness(0.843); }
}

.updated { font-size: 16px; color: var(--muted); }

#footer {
    margin-top: 40px;
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
}
#footer a:hover { color: var(--text-color); }

mjx-container { font-size: 1em !important; }
.panelmain mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }

@media (max-width: 599px) {
    #content { font-size: 19px; }
    .panelmain { font-size: 17px; text-align: left; }
    h2 { font-size: 26px; }
}
