@font-face {
    font-family: Montserrat; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(/fonts/montserrat-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Montserrat; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(/fonts/montserrat-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Montserrat; font-style: italic; font-weight: 400 700; font-display: swap;
    src: url(/fonts/montserrat-italic-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Montserrat; font-style: italic; font-weight: 400 700; font-display: swap;
    src: url(/fonts/montserrat-italic-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #6f0d34;
    --bar: #4a001f;
    --line: #6f0d34;
    --text: #fff;
    --accent: #fff;
    --sig: #540023;
    --foot: #a8627f;
    --foot-text: #000;
    --body-icon: none;
    --image: none;
}

/* Themes: colours of the swatches come from images/icon-grey.svg */
:root[data-theme="contrast"] {
    --bg: #000; --bar: #000; --line: #fff; --text: #fff; --accent: #fff;
    --sig: #555; --foot: #000; --foot-text: #fff;
}
:root[data-theme="gray-light"] {
    --bg: #8c8e91; --bar: #232021; --line: #535355; --text: #000; --accent: #000;
    --sig: #6d6f72; --foot: #b4b5b7; --foot-text: #000;
    --body-icon: brightness(0); --image: grayscale(1);
}
:root[data-theme="gray-mid"] {
    --bg: #535355; --bar: #232021; --line: #535355; --text: #fff; --accent: #fff;
    --sig: #3d3d3f; --foot: #8c8e91; --foot-text: #000;
    --image: grayscale(1);
}
:root[data-theme="gray-dark"] {
    --bg: #232021; --bar: #000; --line: #535355; --text: #fff; --accent: #fff;
    --sig: #3a3738; --foot: #8c8e91; --foot-text: #000;
    --image: grayscale(1);
}

:root[data-font="-3"] { font-size: 70%; }
:root[data-font="-2"] { font-size: 80%; }
:root[data-font="-1"] { font-size: 90%; }
:root[data-font="1"] { font-size: 120%; }
:root[data-font="2"] { font-size: 140%; }
:root[data-font="3"] { font-size: 170%; }
:root[data-font="4"] { font-size: 200%; }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Montserrat, "Segoe UI", Verdana, sans-serif;
    font-size: 1.3125rem;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.wrap { width: 100%; max-width: 50rem; margin-inline: auto; padding-inline: 1.25rem; }
main:focus { outline: none; }

h1 { font-size: 2rem; font-weight: 700; line-height: 1.25; text-align: center; margin: 2.5rem 0; }
h1 em { font-style: normal; }
b, strong { font-weight: 700; }
u { text-underline-offset: .15em; }
sup, sub { font-size: .7em; line-height: 0; }
.panel-title { text-transform: uppercase; }
.notice { text-align: center; }
p { margin: 0 0 1.25rem; }
.lead { font-weight: 700; }

a { color: inherit; }

:focus-visible { outline: .25rem solid var(--accent); outline-offset: .2rem; }
.topbar :focus-visible { outline-color: #fff; }
:root[data-theme="contrast"] .topbar :focus-visible { outline-color: #fff; }

.skip {
    position: absolute; left: .5rem; top: -10rem; z-index: 20;
    padding: .75rem 1.25rem; background: #fff; color: #000; font-weight: 700;
}
.skip:focus { top: .5rem; }

/* Header */
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: stretch; justify-content: space-between; gap: .5rem;
    min-height: 72px; padding-inline: 1rem;
    background: var(--bar); color: #fff;
}
:root[data-theme="contrast"] .topbar { border-bottom: 2px solid #fff; color: #fff; }

.brand { display: flex; align-items: center; }
.brand img { display: block; height: 44px; width: auto; }

.tools { display: flex; align-items: stretch; }
.tool {
    display: flex; align-items: center; justify-content: center;
    min-width: 72px; padding: 0 .75rem;
    border: 0; background: none; color: inherit; font: inherit; font-size: 32px; line-height: 1;
    text-decoration: none; cursor: pointer;
}
.tool:hover, .tool[aria-expanded="true"] { background: var(--line); }
:root[data-theme="contrast"] .tool:hover, :root[data-theme="contrast"] .tool[aria-expanded="true"] { background: #333; }
.tool svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 4; }
.tool img { width: 52px; height: auto; display: block; }

.panel {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - 72px); overflow-y: auto;
    background: var(--bar); color: #fff;
    margin-inline: auto; max-width: 50rem;
    box-shadow: 0 .5rem 1rem rgb(0 0 0 / .4);
}
.panel[hidden] { display: none; }
:root[data-theme="contrast"] .panel { color: #fff; border: 2px solid #fff; }

#menu-panel ul { list-style: none; margin: 0; padding: .5rem 1rem; }
#menu-panel li + li { border-top: 3px solid var(--line); }
#menu-panel a { display: block; padding: .7rem .5rem; text-align: center; text-decoration: none; text-transform: uppercase; line-height: 1.25; }
#menu-panel a:hover { text-decoration: underline; }
#menu-panel a[aria-current] { font-weight: 700; text-decoration: underline; }

.a11y {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    width: 100%; padding: 1rem;
    border: 0; border-bottom: 3px solid var(--line); background: none; color: inherit;
    font: inherit; text-transform: uppercase; cursor: pointer;
}
.a11y:hover { text-decoration: underline; }
.a11y img { height: 4.5rem; width: auto; }
.a11y[aria-pressed="true"] { text-decoration: underline; font-weight: 700; }
.a11y.reset { border-bottom: 0; border-top: 3px solid var(--line); font-size: 1.125rem; }

.grays { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem; text-transform: uppercase; }
.swatches { display: flex; gap: .75rem; }
.swatch { width: 4rem; height: 4rem; padding: 0; border: 2px solid #fff; cursor: pointer; }
.swatch.light { background: #8c8e91; }
.swatch.mid { background: #535355; }
.swatch.dark { background: #232021; }
.swatch[aria-pressed="true"] { outline: .3rem solid #fff; outline-offset: .15rem; }

/* Figures */
figure { margin: 2.5rem auto; max-width: 36rem; }
figure > img { display: block; width: 100%; height: auto; filter: var(--image); }
figcaption { margin-top: .75rem; font-size: 1.125rem; line-height: 1.4; }
figcaption span { display: block; }

.home-portrait figure { max-width: 26rem; margin-top: 3rem; margin-bottom: 0; }

/* Audio player */
.player { margin-top: 1rem; }
.player audio { width: 100%; }
.player.enhanced audio { display: none; }
/* One player per page, right under the page title */
.page-player { max-width: 36rem; margin: -1rem auto 2.5rem; }
.home-portrait + .page-player { max-width: 26rem; margin: 1rem auto 0; }
.player-ui {
    display: flex; align-items: center; gap: .75rem;
    padding: .4rem .9rem; border: 3px solid var(--accent); border-radius: 1rem;
    color: var(--accent);
}
.player-btn {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 3.25rem; height: 3.25rem; padding: 0;
    border: 0; background: none; color: inherit; cursor: pointer;
}
.player-btn svg { width: 2.5rem; height: 2.5rem; fill: currentColor; }
.player-seek { flex: 1; min-width: 3rem; height: 2.5rem; margin: 0; accent-color: var(--accent); cursor: pointer; }
.player-time { flex: none; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Pager, signature, logos */
.pager { display: flex; justify-content: center; gap: 3rem; margin: 3rem 0 2rem; }
.pager a { display: block; padding: .25rem; }
.pager img { display: block; width: clamp(5rem, 22vw, 7rem); height: auto; filter: var(--body-icon); }
:root[data-theme="contrast"] .pager a { border: 2px solid transparent; }

.signature {
    aspect-ratio: 4380 / 822; margin: 1rem 0 2rem;
    background: var(--sig);
    -webkit-mask: url(/images/Dobrila-potpis.svg) center / contain no-repeat;
    mask: url(/images/Dobrila-potpis.svg) center / contain no-repeat;
}

/* One row on a computer, two rows of three on a phone */
.logos {
    list-style: none; margin: 2rem 0 3rem; padding: 0;
    display: flex; align-items: center; justify-content: center; gap: 1.5rem;
}
.logos li { flex: 0 1 auto; min-width: 0; }
.logos img { display: block; height: 4.25rem; width: auto; max-width: 100%; object-fit: contain; filter: var(--body-icon); }

/* Sources and literature (home page, above the impressum) */
.sources { border-top: 1px solid var(--text); padding: 1.5rem 0 2rem; font-size: 1.1875rem; font-weight: 400; line-height: 1.35; }
.sources h2, .sources h3 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 700; }
.sources h3 { margin-top: 2rem; }
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li { margin-bottom: 1rem; }

.impressum { background: var(--foot); color: var(--foot-text); padding: 1.5rem 0; font-size: 1rem; }
.impressum h2 { margin: 0 0 .75rem; font-size: 1.25rem; }
.impressum ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.impressum li { margin-bottom: .25rem; }
:root[data-theme="contrast"] .impressum { border-top: 2px solid #fff; }

@media (max-width: 40rem) {
    body { font-size: 1.1875rem; }
    h1 { font-size: 1.625rem; }
    .topbar { padding-inline: .5rem; min-height: 60px; }
    .brand img { height: 34px; }
    .tool { min-width: 52px; padding: 0 .4rem; font-size: 26px; }
    .tool svg { width: 34px; height: 34px; }
    .tool img { width: 40px; }
    .panel { max-height: calc(100vh - 60px); }
    .pager { gap: 2rem; }
    .player-ui { flex-wrap: wrap; }
    .sources { font-size: 1.0625rem; }
    .sources h2, .sources h3 { font-size: 1.125rem; }
    .logos { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 1.5rem 1rem; }
    .logos img { height: 3.75rem; }
}

@media print {
    .topbar, .pager, .player, .signature { display: none; }
    .sources { border-top-color: #000; }
    body { background: #fff; color: #000; }
}
