/*
 * Content styles for the smaller UPM journals (components/upm_journal_header.php).
 * Hand-written; colours come from the --uj-* tokens in upm-journal-modern.css, so each journal's theme applies.
 */

.uj-modern .journal-hero h1 .uj-short {
    display: block;
    margin-top: 8px;
    color: var(--uj-muted);
    font-size: .42em;
    font-weight: 700;
    letter-spacing: .08em;
}

.uj-modern .uj-monogram {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 4;
    background: linear-gradient(160deg, var(--uj-primary) 0%, var(--uj-deeper) 100%);
}

.uj-modern .uj-monogram span {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .06em;
}

.uj-page {
    width: min(1180px, calc(100% - 40px));
    margin: 28px auto 0;
}

.uj-page .content {
    max-width: none;
    margin: 0;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid var(--uj-line);
    border-radius: var(--uj-radius);
    background: #fff;
    box-shadow: var(--uj-shadow);
    color: var(--uj-text);
    line-height: 1.7;
}

:where(.uj-page .content) h2 {
    margin: 36px 0 10px;
    color: var(--uj-deep);
    font-size: 24px;
    letter-spacing: -.01em;
    scroll-margin-top: 90px;
}

:where(.uj-page .content) > h2:first-child { margin-top: 0; }

/* A rule between top-level sections only, not above headings inside page components. */
:where(.uj-page .content) > h2:not(:first-child),
:where(.uj-page .content) > div[id] > h2:first-child {
    padding-top: 22px;
    border-top: 1px solid var(--uj-line);
}

:where(.uj-page .content) h3 {
    margin: 22px 0 8px;
    color: var(--uj-ink);
    font-size: 18px;
}

:where(.uj-page .content) p { margin: 0 0 12px; }

:where(.uj-page .content) ul,
:where(.uj-page .content) ol {
    margin: 8px 0 18px 22px;
    padding: 0;
}

:where(.uj-page .content) li { margin: 4px 0; }
:where(.uj-page .content) li::marker { color: var(--uj-primary); }

:where(.uj-page .content) a { color: var(--uj-primary); font-weight: 700; }
:where(.uj-page .content) a:hover { color: var(--uj-deeper); }

.uj-page [id] { scroll-margin-top: 90px; }

.uj-callout {
    margin: 16px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--uj-primary);
    border-radius: var(--uj-radius-sm);
    background: var(--uj-mist);
}

.uj-poster {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 16px;
    border: 1px solid var(--uj-line);
    border-radius: var(--uj-radius-sm);
    background: #fff;
}

.uj-poster img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.uj-page table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
}

.uj-page table th,
.uj-page table td {
    padding: 10px 12px;
    border: 1px solid var(--uj-line);
    text-align: left;
    vertical-align: top;
}

.uj-page table th {
    background: var(--uj-mist);
    color: var(--uj-deep);
}

@media (max-width: 560px) {
    .uj-page { width: calc(100% - 32px); margin-top: 20px; }
    :where(.uj-page .content) h2 { font-size: 21px; }
}

/* RGB form of the theme's primary colour, for rgba() in page-specific CSS. */
.uj-modern { --uj-primary-rgb: var(--ujc-c4-rgb); }
