/* J-Matassa — media library theme for Laryvo.
   Design source: design/sites/AJFSR –J-Matassa/index.dc.html. Breakpoint 720px, as in the design. */

/* Fonts: self-hosted latin + latin-ext subsets (SIL OFL, see fonts/OFL.txt). Oswald is variable 400–600. */
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/oswald-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/oswald-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Tokens. --jm-accent is a theme setting: the laryvo-tokens style that follows this file overrides it. */
:root {
    --jm-green: #106609;
    --jm-accent: #F06C13;
    --jm-ink: #1D2E1B;
    --jm-muted: #5E6E5B;
    --jm-faint: #8A9787;
    --jm-bg: #FFF9F3;
    --jm-sand: #F3EBDD;
    --jm-sand-2: #EDE3D0;
    --jm-line: #E6D9B5;
    --jm-line-2: #D6C9A6;
    --jm-green-soft: #A8C3A0;
    --jm-cream: #F8F1E6;
    --jm-night: #131D12;
    --jm-title: 'Oswald', 'Arial Narrow', sans-serif;
    --jm-body: 'Poppins', Helvetica, Arial, sans-serif;
    --jm-ease: cubic-bezier(.2, .7, .2, 1);
    --jm-max: 1480px;
    --jm-pad: clamp(16px, 4vw, 48px);
}

@keyframes jm-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes jm-slide-up { from { transform: translateY(24px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes jm-rise { from { transform: translateY(6px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.jm-lock { overflow: hidden; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--jm-bg); color: var(--jm-ink); font-family: var(--jm-body); font-size: 0.9375rem; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--jm-ink); }
a:hover { color: var(--jm-muted); }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
input::placeholder { color: var(--jm-faint); }
[hidden] { display: none !important; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid var(--jm-green); outline-offset: 2px; }
.jm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.jm-skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--jm-ink); color: #fff; font-weight: 600; text-decoration: none; }
.jm-skip:focus { top: 12px; color: #fff; }
.jm-preview { margin: 0; padding: 8px 16px; background: #F7E9C4; color: #7A5A10; font-size: 0.8125rem; text-align: center; }

.jm-main { flex: 1 0 auto; width: 100%; max-width: var(--jm-max); margin: 0 auto; padding: 0 var(--jm-pad) 64px; outline: none; }

/* Header */
.jm-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 249, 243, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--jm-line); }
.jm-header__bar { max-width: var(--jm-max); margin: 0 auto; padding: 0 var(--jm-pad); display: flex; align-items: center; gap: 28px; min-height: 64px; }
.jm-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; flex-shrink: 0; color: var(--jm-ink); }
/* Two links: the logo to the organisation's site, the name to the library's home. */
.jm-logo-link { display: flex; flex-shrink: 0; border-radius: 4px; }
.jm-lockup__home { display: flex; min-width: 0; color: var(--jm-ink); text-decoration: none; }
.jm-lockup__home:hover { color: var(--jm-ink); }
.jm-lockup__logo { display: block; width: auto; height: 26px; max-width: 140px; object-fit: contain; }
.jm-lockup__sep { width: 1px; height: 22px; background: var(--jm-line-2); flex-shrink: 0; }
.jm-lockup__name { font-family: var(--jm-title); font-weight: 500; font-size: 1.25rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jm-lockup__tagline { font-weight: 400; color: var(--jm-green); }

.jm-tabs { margin-left: auto; height: 64px; display: flex; }
.jm-tabs__list { display: flex; gap: 26px; height: 100%; margin: 0; padding: 0; list-style: none; }
.jm-tabs__item { display: flex; }
.jm-tabs__link { display: flex; align-items: center; padding-top: 2px; border-bottom: 2px solid transparent; color: var(--jm-muted); font-size: 0.90625rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .2s; }
.jm-tabs__link:hover { color: var(--jm-ink); }
.jm-tabs__link.is-active { color: var(--jm-ink); border-bottom-color: var(--jm-accent); }
.jm-tabs__link:focus-visible { outline-offset: -2px; }

.jm-search { position: relative; display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: min(320px, 26vw); }
.jm-lockup + .jm-search { margin-left: auto; }
.jm-search__field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--jm-sand); color: var(--jm-muted); cursor: text; }
.jm-search__field:focus-within { box-shadow: 0 0 0 2px var(--jm-green); }
.jm-search__icon { flex-shrink: 0; }
.jm-search__input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--jm-ink); font-size: 0.875rem; outline: none; -webkit-appearance: none; appearance: none; }
.jm-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.jm-search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 4px; color: var(--jm-muted); }
.jm-search:has(.jm-search__clear) .jm-search__input { padding-right: 40px; }
.jm-search__close, .jm-search-toggle { display: none; }
.jm-a11y-btn { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; margin: 0 -6px 0 -14px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--jm-ink); cursor: pointer; transition: background-color .2s; }
.jm-a11y-btn:hover { background: var(--jm-sand); }
.jm-a11y-btn[hidden] { display: none; }

/* Page titles and sections */
.jm-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 2.5vw, 36px); }
.jm-display { margin: 0; font-family: var(--jm-title); font-weight: 500; font-size: clamp(2.125rem, 4.4vw, 3.75rem); letter-spacing: .01em; line-height: 1.02; text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }
.jm-display__second { font-weight: 400; color: var(--jm-green); }
.jm-intro__facts { margin: 0; color: var(--jm-muted); font-size: 0.84375rem; line-height: 1.6; text-align: right; }

.jm-section { margin-top: 56px; }
.jm-section--first { margin-top: 0; }
.jm-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 8px 0 14px; border-top: 1px solid var(--jm-line); }
.jm-section--docs .jm-section-head { padding-bottom: 6px; }
.jm-eyebrow { margin: 0; color: var(--jm-green); font-size: 0.78125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.jm-more { display: inline-flex; align-items: center; gap: 6px; color: var(--jm-green); font-size: 0.84375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.jm-more:hover { color: var(--jm-green); text-decoration: underline; text-underline-offset: 3px; }

.jm-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: clamp(24px, 3vw, 44px) 0 0; }
.jm-titlebar--albums { padding-bottom: 28px; }
.jm-titlebar__count { color: var(--jm-muted); font-size: 0.8125rem; }
.jm-h1 { margin: 0; font-family: var(--jm-title); font-weight: 500; font-size: min(clamp(1.875rem, 3.4vw, 2.75rem), 8.5vw); letter-spacing: .01em; line-height: 1; text-transform: uppercase; overflow-wrap: break-word; }

.jm-textlink, .jm-clear { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--jm-muted); font-size: 0.84375rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.jm-button { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--jm-green); color: #fff; font-weight: 600; text-decoration: none; }
.jm-button:hover { color: #fff; background: #0d5507; }

.jm-empty, .jm-empty-state { margin: 0; padding: 80px 0; color: var(--jm-muted); font-size: 0.9375rem; text-align: center; }
.jm-empty-state p { margin: 0; }
.jm-empty-state .jm-textlink { margin-top: 14px; color: var(--jm-ink); font-size: 0.875rem; }

/* Toolbar, filter dropdowns and the narrow-screen sheet */
.jm-toolbar { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 0 14px; }
.jm-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.jm-pill { position: relative; }
.jm-pill__button { display: flex; align-items: center; gap: 8px; max-width: 280px; height: 34px; padding: 0 12px 0 14px; border: 1px solid var(--jm-line-2); border-radius: 999px; background: #fff; color: var(--jm-ink); font-size: 0.84375rem; font-weight: 500; cursor: pointer; user-select: none; transition: all .15s; }
.jm-pill__button svg { flex-shrink: 0; transition: transform .15s; }
.jm-pill[open] .jm-pill__button { border-color: var(--jm-green-soft); }
.jm-pill[open] .jm-pill__button svg { transform: rotate(180deg); }
.jm-pill.is-active .jm-pill__button { border-color: var(--jm-green); background: var(--jm-green); color: #fff; }
.jm-pill__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-pill__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; max-width: min(340px, 80vw); max-height: min(380px, 60vh); margin: 0; padding: 6px; overflow-y: auto; list-style: none; background: #fff; border: 1px solid var(--jm-line); border-radius: 10px; box-shadow: 0 14px 40px rgba(29, 46, 27, .10); animation: jm-rise .18s ease; }
.jm-pill__option { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; color: var(--jm-muted); font-size: 0.84375rem; text-decoration: none; }
.jm-pill__option:hover, .jm-pill__option:focus-visible { background: var(--jm-sand); color: var(--jm-ink); }
.jm-pill__option:focus-visible { outline-offset: -2px; }
.jm-pill__option.is-selected { color: var(--jm-ink); font-weight: 600; }
.jm-pill__option.is-empty { opacity: .55; }
.jm-pill__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-pill__count { flex-shrink: 0; color: var(--jm-faint); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.jm-toolbar__count { margin-left: auto; color: var(--jm-muted); font-size: 0.8125rem; }

.jm-sheet { display: none; }
.jm-sheet__button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--jm-line-2); border-radius: 999px; background: #fff; color: var(--jm-ink); font-size: 0.84375rem; font-weight: 500; cursor: pointer; user-select: none; }
.jm-sheet[open] > .jm-sheet__button::before { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(29, 46, 27, .35); cursor: default; animation: jm-fade .2s; }
.jm-sheet__panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 80vh; overflow-y: auto; padding: 14px 20px calc(28px + env(safe-area-inset-bottom)); background: var(--jm-bg); border-radius: 16px 16px 0 0; animation: jm-slide-up .25s var(--jm-ease); }
.jm-sheet__handle { display: block; width: 36px; height: 4px; margin: 0 auto 18px; border-radius: 2px; background: var(--jm-line-2); }
.jm-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.jm-sheet__title { font-size: 1.0625rem; font-weight: 600; }
.jm-sheet__group { padding: 14px 0; border-top: 1px solid var(--jm-line); }
.jm-sheet__label { margin: 0 0 10px; color: var(--jm-muted); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; }
.jm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jm-chips > li { display: flex; min-width: 0; max-width: 100%; }
.jm-chip { display: inline-block; max-width: 100%; height: 40px; line-height: 38px; padding: 0 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--jm-line-2); border-radius: 999px; background: #fff; color: var(--jm-ink); font-size: 0.84375rem; text-decoration: none; }
.jm-chip.is-selected { border-color: var(--jm-green); background: var(--jm-green); color: #fff; }
.jm-sheet__done { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 8px; border-radius: 10px; background: var(--jm-green); color: #fff; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.jm-sheet__done:hover { color: #fff; }

/* The dense grid */
.jm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 8px; }
.jm-w2 { grid-column: span 2; }
.jm-h2 { grid-row: span 2; }

.jm-tile { position: relative; margin: 0; overflow: hidden; border-radius: 3px; background: var(--jm-sand-2); }
.jm-tile__link { position: absolute; inset: 0; display: block; color: inherit; }
.jm-tile__link:focus-visible { outline: 3px solid var(--jm-green); outline-offset: -3px; }
.jm-tile__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--jm-ease); }

.jm-tile__over { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0; padding: 14px; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 48%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility .25s; }
.jm-tile__text { display: flex; flex-direction: column; min-width: 0; font-size: 0.78125rem; line-height: 1.45; }
.jm-tile__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-tile__meta { opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-tile__actions { display: flex; gap: 6px; flex-shrink: 0; pointer-events: auto; }
.jm-tbtn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; cursor: pointer; }
.jm-tbtn:hover { background: rgba(255, 255, 255, .32); color: #fff; }
.jm-tbtn:focus-visible { outline-color: #fff; }
.jm-tile:focus-within .jm-tile__over { opacity: 1; visibility: visible; }
@media (hover: hover) {
    .jm-tile:hover .jm-tile__over { opacity: 1; visibility: visible; }
    .jm-tile:hover .jm-tile__img, .jm-tile:hover .jm-tile__video, .jm-tile:hover .jm-doc__page,
    .jm-album__link:hover .jm-cover { transform: scale(1.035); }
    .jm-tile:hover .jm-tile__vname { opacity: 0; }
}

/* Video tiles: no poster is extracted, so a dark green tile carries the play mark and the media's name. */
.jm-tile__video { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px 14px 14px; background: radial-gradient(120% 90% at 30% 15%, #2C4A28 0%, var(--jm-night) 70%); transition: transform .7s var(--jm-ease); }
.jm-tile__vname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; color: rgba(255, 249, 243, .86); font-size: 0.78125rem; font-weight: 600; line-height: 1.35; overflow-wrap: break-word; transition: opacity .25s; }
.jm-play { position: absolute; top: 50%; left: 50%; z-index: 1; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--jm-ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); transform: translate(-50%, -50%); pointer-events: none; }
.jm-play svg { margin-left: 2px; }
.jm-tile__badge { position: absolute; top: 10px; right: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 4px; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font-size: 0.71875rem; font-weight: 600; letter-spacing: .02em; pointer-events: none; }

/* Document cards: typographic, since Media extracts no preview. */
.jm-fmt { display: inline-block; align-self: flex-start; padding: 3px 7px; border-radius: 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .06em; line-height: 1.3; }
.jm-fmt--pdf { background: #FDE7D6; color: #B34A06; }
.jm-fmt--doc { background: #DDEBD9; color: #106609; }
.jm-fmt--ppt { background: #F7E9C4; color: #7A5A10; }
.jm-fmt--other { background: var(--jm-sand-2); color: var(--jm-muted); }

.jm-tile--document { background: var(--jm-sand); }
.jm-doc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; }
.jm-doc__page { display: flex; flex-direction: column; height: 100%; max-width: 100%; aspect-ratio: 1 / 1.414; overflow: hidden; border-radius: 2px; background: #fff; box-shadow: 0 6px 20px rgba(29, 46, 27, .12); transition: transform .7s var(--jm-ease); }
.jm-doc__cover { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 40%; font-family: var(--jm-title); font-weight: 600; font-size: 1.375rem; letter-spacing: .08em; }
.jm-doc__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; padding: 9px 10px; }
.jm-doc__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--jm-ink); font-family: var(--jm-title); font-weight: 500; font-size: 0.78125rem; line-height: 1.2; text-transform: uppercase; overflow-wrap: break-word; }
.jm-doc__meta { margin-top: auto; color: var(--jm-muted); font-size: 0.625rem; white-space: nowrap; }

/* Document rows */
.jm-doclist { display: flex; flex-direction: column; }
.jm-docrow { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 64px 72px 36px; align-items: center; gap: 16px; padding: 12px 8px; border-bottom: 1px solid var(--jm-line); transition: background .15s; }
.jm-docrow:hover { background: var(--jm-cream); }
.jm-docrow:has(.jm-docrow__title:focus-visible) { outline: 2px solid var(--jm-green); outline-offset: -2px; }
.jm-docrow__thumb { display: flex; flex-direction: column; width: 42px; height: 58px; overflow: hidden; border-radius: 2px; background: #fff; box-shadow: 0 2px 8px rgba(29, 46, 27, .14); }
.jm-docrow__band { display: flex; align-items: center; justify-content: center; height: 45%; font-size: 0.5625rem; font-weight: 600; letter-spacing: .04em; }
.jm-docrow__thumb i { display: block; height: 3px; width: 80%; margin: 4px 4px 0; border-radius: 1px; background: var(--jm-ink); }
.jm-docrow__thumb i + i { height: 2px; width: 60%; background: var(--jm-line-2); }
.jm-docrow__main { min-width: 0; }
.jm-docrow__title { display: block; overflow: hidden; color: var(--jm-ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.35; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.jm-docrow__title:hover { color: var(--jm-ink); }
.jm-docrow__title::after { content: ""; position: absolute; inset: 0; }
.jm-docrow__title:focus-visible { outline: none; }
.jm-docrow__meta { margin: 2px 0 0; overflow: hidden; color: var(--jm-muted); font-size: 0.78125rem; text-overflow: ellipsis; white-space: nowrap; }
.jm-docrow__meta--narrow { display: none; }
.jm-docrow__size { color: var(--jm-muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jm-docrow__dl { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--jm-line-2); border-radius: 50%; background: #fff; color: var(--jm-green); }
.jm-docrow__dl:hover { border-color: var(--jm-green); color: var(--jm-green); }

/* Albums */
.jm-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; padding-bottom: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.jm-strip::-webkit-scrollbar { display: none; }
.jm-strip > * { scroll-snap-align: start; }
.jm-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px 20px; }
.jm-album { min-width: 0; }
.jm-album__link { display: block; color: var(--jm-ink); text-decoration: none; }
.jm-album__link:hover { color: var(--jm-ink); }
.jm-album__link:focus-visible { outline-offset: 4px; border-radius: 3px; }
.jm-album__cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--jm-sand-2); }
.jm-album--large .jm-album__cover { aspect-ratio: 3 / 2; }
.jm-cover { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--jm-ease); }
.jm-cover--empty { display: flex; align-items: center; justify-content: center; color: var(--jm-faint); }
.jm-album__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; }
.jm-album__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.90625rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: break-word; }
.jm-album--large .jm-album__name { font-size: 1.0625rem; }
.jm-album__year { flex-shrink: 0; color: var(--jm-muted); font-size: 0.78125rem; white-space: nowrap; }
.jm-album__count { display: block; margin-top: 3px; color: var(--jm-muted); font-size: 0.78125rem; }

.jm-album-head { padding-top: 20px; }
.jm-back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 8px; color: var(--jm-muted); font-size: 0.84375rem; text-decoration: none; }
.jm-hero { position: relative; height: clamp(220px, 32vw, 420px); overflow: hidden; border-radius: 6px; background: var(--jm-sand-2); }
.jm-hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .05) 55%); }
.jm-hero__text { position: absolute; left: clamp(16px, 3vw, 36px); right: clamp(16px, 3vw, 36px); bottom: clamp(16px, 3vw, 32px); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; color: #fff; }
.jm-hero__titles { min-width: 0; max-width: 100%; }
.jm-hero__kicker { margin: 0 0 8px; font-size: 0.78125rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.jm-hero__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-family: var(--jm-title); font-weight: 500; font-size: clamp(1.875rem, 4vw, 3.375rem); letter-spacing: .01em; line-height: 1; text-transform: uppercase; overflow-wrap: break-word; }
.jm-hero__count { margin: 0; font-size: 0.84375rem; opacity: .9; }
.jm-album-desc { max-width: 70ch; margin: 20px 0 0; font-size: 0.9375rem; line-height: 1.65; white-space: pre-line; }

/* A resource's own page: the file whole (it opens the viewer), then its words. */
.jm-resource { padding-top: 20px; }
.jm-resource__head { margin: 0 0 20px; }
.jm-resource__kicker { margin: 0 0 10px; color: var(--jm-green); font-size: 0.78125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.jm-resource__figure { position: relative; display: flex; justify-content: center; margin: 0; overflow: hidden; border-radius: 6px; background: var(--jm-sand-2); }
.jm-resource__open { display: block; max-width: 100%; color: inherit; }
.jm-resource__img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(75vh, 900px); }
.jm-resource__figure--video .jm-resource__open { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.jm-resource__doc { border-top: 1px solid var(--jm-line); }
.jm-resource__missing { margin: 0; padding: 56px 16px; border-radius: 6px; background: var(--jm-sand); color: var(--jm-muted); text-align: center; }
.jm-resource__tags { margin-top: 20px; }

/* Pagination */
.jm-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.jm-pager__pages { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.jm-pager__page { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px; color: var(--jm-ink); font-size: 0.875rem; font-variant-numeric: tabular-nums; text-decoration: none; }
a.jm-pager__page:hover { background: var(--jm-sand); color: var(--jm-ink); }
.jm-pager__page.is-current { background: var(--jm-green); color: #fff; font-weight: 600; }
.jm-pager__gap { align-self: center; padding: 0 4px; color: var(--jm-faint); }
.jm-pager__step { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--jm-line-2); border-radius: 999px; background: #fff; color: var(--jm-ink); font-size: 0.84375rem; font-weight: 500; text-decoration: none; }
.jm-pager__step:hover { border-color: var(--jm-green); color: var(--jm-ink); }

/* Footer */
.jm-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; max-width: var(--jm-max); margin: 0 auto; padding: 24px var(--jm-pad); border-top: 1px solid var(--jm-line); color: var(--jm-muted); font-size: 0.78125rem; }
.jm-footer__brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.jm-footer__logo { display: block; width: auto; height: 20px; max-width: 120px; object-fit: contain; }
.jm-footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.jm-footer__links a { color: var(--jm-muted); text-decoration: none; }
.jm-footer__links a:hover { color: var(--jm-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Institutional pages and Core's fallback blocks */
.jm-page { max-width: 72ch; padding-top: clamp(24px, 3vw, 44px); }
.jm-page__lead { margin: 16px 0 0; color: var(--jm-muted); font-size: 1.0625rem; line-height: 1.6; }
.jm-prose { margin-top: 28px; font-size: 0.96875rem; line-height: 1.7; overflow-wrap: break-word; }
.jm-prose > :first-child { margin-top: 0; }
.jm-prose h2, .jm-prose h3, .jm-prose h4, .jm-prose .lv-heading { margin: 1.8em 0 .5em; font-family: var(--jm-title); font-weight: 500; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; }
.jm-prose h2 { font-size: 1.625rem; }
.jm-prose h3 { font-size: 1.25rem; }
.jm-prose h4 { font-size: 1.0625rem; }
.jm-prose p, .jm-prose ul, .jm-prose ol { margin: 0 0 1em; }
.jm-prose a { color: var(--jm-green); text-underline-offset: 3px; }
.jm-prose img { display: block; height: auto; border-radius: 3px; }
.jm-prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; display: block; overflow-x: auto; }
.jm-prose th, .jm-prose td { padding: 8px 10px; border-bottom: 1px solid var(--jm-line); text-align: left; }
.jm-prose blockquote, .lv-quote blockquote { margin: 1.5em 0; padding: 0 0 0 18px; border-left: 3px solid var(--jm-green); color: var(--jm-muted); }
.lv-block { margin: 1.5em 0; }
.lv-image, .lv-quote { margin-left: 0; margin-right: 0; }
.lv-image figcaption, .lv-gallery figcaption, .lv-quote figcaption { margin-top: 6px; color: var(--jm-muted); font-size: 0.8125rem; }
.lv-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.lv-gallery--2 .lv-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lv-gallery--4 .lv-gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lv-gallery figure { margin: 0; }
.lv-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.lv-columns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 24px; }
.lv-columns--gap-small { gap: 12px; }
.lv-columns--gap-large { gap: 40px; }
.lv-columns--align-center { align-items: center; }
.lv-columns--align-bottom { align-items: end; }
.lv-image-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.lv-image-text--right .lv-image-text__image { order: 2; }
.lv-cta, .lv-hero { padding: 28px; border-radius: 6px; background: var(--jm-sand); }
.lv-cta h2, .lv-hero h2 { margin-top: 0; }
.lv-eyebrow { margin: 0 0 8px; color: var(--jm-green); font-size: 0.78125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lv-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.lv-buttons--center { justify-content: center; }
.lv-button { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border: 1px solid var(--jm-green); border-radius: 999px; background: var(--jm-green); color: #fff !important; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.lv-button--secondary { background: #fff; color: var(--jm-green) !important; }
.lv-divider { height: 0; border: 0; border-top: 1px solid var(--jm-line); }
.lv-download { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px; border: 1px solid var(--jm-line); border-radius: 6px; background: #fff; }
.lv-download__link { font-weight: 600; }
.lv-download__meta { color: var(--jm-muted); font-size: 0.8125rem; }
.lv-download__text { flex-basis: 100%; margin: 0; color: var(--jm-muted); font-size: 0.875rem; }
.lv-video__link { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: var(--jm-night); color: #fff; text-decoration: none; }
.lv-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-video__play { position: relative; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--jm-ink); font-size: 0.875rem; font-weight: 600; }
.lv-video__frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }

.jm-list { margin: 28px 0 0; padding: 0; list-style: none; }
.jm-list__item { padding: 16px 0; border-bottom: 1px solid var(--jm-line); }
.jm-list__link { font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
.jm-list__date { display: block; margin-top: 2px; color: var(--jm-muted); font-size: 0.8125rem; }
.jm-list__excerpt { margin: 6px 0 0; color: var(--jm-muted); }

.jm-notfound { max-width: 60ch; padding: clamp(48px, 8vw, 120px) 0; }
.jm-notfound__code { margin: 0 0 8px; color: var(--jm-green); font-family: var(--jm-title); font-weight: 600; font-size: clamp(4.5rem, 12vw, 10rem); line-height: .9; }
.jm-notfound__lead { margin: 16px 0 28px; color: var(--jm-muted); font-size: 1rem; }
.jm-notfound__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }

/* Viewer (a modal <dialog>, filled by app.js) */
.jm-viewer { --v-bg: var(--jm-night); --v-fg: var(--jm-bg); --v-line: rgba(255, 255, 255, .12); --v-arrow: rgba(255, 255, 255, .08); --v-active: rgba(255, 255, 255, .14); position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--v-bg); color: var(--v-fg); }
.jm-viewer--neutral { --v-bg: var(--jm-bg); --v-fg: var(--jm-ink); --v-line: rgba(0, 0, 0, .1); --v-arrow: rgba(0, 0, 0, .06); --v-active: rgba(0, 0, 0, .08); }
.jm-viewer[open] { display: flex; flex-direction: column; animation: jm-fade .25s ease; }
.jm-viewer::backdrop { background: var(--jm-night); }
.jm-viewer :focus-visible { outline-color: var(--jm-accent); }
.jm-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; height: 60px; padding: 0 clamp(12px, 2vw, 24px); }
.jm-viewer__head { min-width: 0; margin: 0; overflow: hidden; font-size: 0.84375rem; text-overflow: ellipsis; white-space: nowrap; }
.jm-viewer__title { font-weight: 600; }
.jm-viewer__meta { opacity: .6; }
.jm-viewer__tools { display: flex; gap: 4px; flex-shrink: 0; }
.jm-vbtn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.jm-vbtn:hover { background: rgba(128, 128, 128, .25); color: inherit; }
.jm-vbtn[aria-pressed="true"] { background: var(--v-active); }
.jm-vbtn--close { margin-left: 6px; }
.jm-viewer__body { position: relative; display: flex; flex: 1; min-height: 0; }
.jm-viewer__stage { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; min-width: 0; padding: 0 80px 24px; touch-action: pan-y pinch-zoom; }
.jm-viewer.is-info .jm-viewer__stage { padding: 0 40px 24px 80px; }
.jm-viewer__media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; }
.jm-viewer__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; animation: jm-fade .3s; }
.jm-viewer__video { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 1280px; max-height: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #000; }
.jm-viewer__video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.jm-bigplay { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; padding: 0 0 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--jm-ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); transform: translate(-50%, -50%); cursor: pointer; }
.jm-vbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); color: #fff; }
.jm-vbar__seek { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 14px; margin: -5px 0; border-radius: 2px; background: linear-gradient(#fff, #fff) 0 50% / var(--jm-progress, 0%) 4px no-repeat, linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .28)) 0 50% / 100% 4px no-repeat; cursor: pointer; }
.jm-vbar__seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.jm-vbar__seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.jm-vbar__seek::-moz-range-track { background: transparent; }
.jm-vbar__seek:hover::-webkit-slider-thumb, .jm-vbar__seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.jm-vbar__seek:hover::-moz-range-thumb, .jm-vbar__seek:focus-visible::-moz-range-thumb { opacity: 1; }
.jm-vbar__row { display: flex; align-items: center; gap: 14px; min-width: 0; font-size: 0.78125rem; font-variant-numeric: tabular-nums; }
.jm-vbar__play { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; margin: -7px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.jm-vbar__time { flex-shrink: 0; }
.jm-vbar__meta { margin-left: auto; min-width: 0; overflow: hidden; opacity: .75; text-overflow: ellipsis; white-space: nowrap; }
.jm-vdoc { display: flex; flex-direction: column; height: 100%; max-width: 100%; aspect-ratio: 1 / 1.414; overflow: hidden; border-radius: 2px; background: #fff; color: var(--jm-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: jm-fade .3s; }
.jm-vdoc__cover { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 42%; font-family: var(--jm-title); font-weight: 600; font-size: clamp(2.25rem, 5vw, 4.5rem); letter-spacing: .08em; }
.jm-vdoc__body { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; padding: 7% 8% 6%; }
.jm-vdoc__title { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-family: var(--jm-title); font-weight: 500; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.08; text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }
.jm-vdoc__org { color: var(--jm-muted); font-size: 0.8125rem; }
.jm-vdoc__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--jm-line); }
.jm-vdoc__meta { color: var(--jm-muted); font-size: 0.78125rem; }
.jm-vdoc__open { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--jm-green); color: #fff; font-size: 0.84375rem; font-weight: 600; text-decoration: none; }
.jm-vdoc__open:hover { color: #fff; background: #0d5507; }
.jm-varrow { position: absolute; top: 50%; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--v-arrow); color: inherit; transform: translateY(-50%); cursor: pointer; }
.jm-varrow:hover:not(:disabled) { background: rgba(128, 128, 128, .3); }
.jm-varrow:disabled { opacity: .25; cursor: default; }
.jm-varrow--prev { left: 18px; }
.jm-varrow--next { right: 18px; }
.jm-viewer.is-single .jm-varrow { display: none; }
.jm-viewer__foot { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 44px; font-size: 0.78125rem; font-variant-numeric: tabular-nums; }
.jm-viewer__foot .jm-varrow { display: none; }
.jm-viewer__counter { opacity: .6; }
.jm-viewer__scrim { display: none; }
.jm-viewer__info { flex-shrink: 0; width: 320px; padding: 8px 28px 28px; overflow-y: auto; border-left: 1px solid var(--v-line); animation: jm-fade .2s; }
.jm-viewer__handle { display: none; }
.jm-viewer__info-title { margin: 0 0 18px; font-size: 0.75rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
.jm-viewer__rows { margin: 0; }
.jm-vrow { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--v-line); font-size: 0.84375rem; }
.jm-vrow dt { flex-shrink: 0; opacity: .55; }
/* Info values hold file names and sizes: they alone may break anywhere. */
.jm-vrow dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; }

.jm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; background: var(--jm-ink); color: #fff; font-size: 0.84375rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); translate: -50% 0; opacity: 0; visibility: hidden; pointer-events: none; }
.jm-toast.is-visible { opacity: 1; visibility: visible; animation: jm-rise .2s ease; }
.jm-viewer--dark .jm-toast { background: var(--jm-bg); color: var(--jm-ink); }

/* Medium screens: the tabs, the lockup and the search no longer fit on one line; the tabs take a second row. */
@media (min-width: 720px) and (max-width: 1099.98px) {
    .jm-header__bar { flex-wrap: wrap; gap: 0 20px; }
    .jm-lockup { min-height: 64px; }
    .jm-search { margin-left: auto; }
    .jm-tabs { order: 3; flex: 0 0 calc(100% + 2 * var(--jm-pad)); height: 44px; margin: 0 calc(-1 * var(--jm-pad)); padding: 0 var(--jm-pad); overflow-x: auto; border-top: 1px solid var(--jm-sand); scrollbar-width: none; }
    .jm-tabs::-webkit-scrollbar { display: none; }
}

/* Narrow screens (< 720px, as in the design) */
@media (max-width: 719.98px) {
    :root { --jm-pad: 16px; }

    .jm-header__bar { flex-wrap: wrap; gap: 0 12px; }
    .jm-lockup { flex: 1 1 0%; min-height: 64px; }
    .jm-lockup__name { font-size: 1.125rem; }
    .jm-tabs { order: 3; flex: 0 0 calc(100% + 32px); height: 44px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; border-top: 1px solid var(--jm-sand); scrollbar-width: none; }
    .jm-tabs::-webkit-scrollbar { display: none; }
    .jm-tabs__list { gap: 22px; }
    .jm-tabs__link { font-size: 0.875rem; }
    .jm-search { display: none; flex: 1; width: auto; min-height: 64px; gap: 0; }
    .jm-search:target, .jm-header.is-searching .jm-search { display: flex; }
    .jm-header:has(.jm-search:target) .jm-lockup, .jm-header:has(.jm-search:target) .jm-search-toggle,
    .jm-header.is-searching .jm-lockup, .jm-header.is-searching .jm-search-toggle { display: none; }
    .jm-search__field { height: 40px; animation: jm-fade .2s; }
    .jm-search__input { font-size: 1rem; }
    .jm-search__clear { display: none; }
    .jm-search__close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; margin-right: -8px; color: var(--jm-ink); }
    .jm-search-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 -8px 0 0; color: var(--jm-ink); }
    .jm-a11y-btn { margin: 0 0 0 auto; }
    .jm-header:has(.jm-search:target) .jm-a11y-btn, .jm-header.is-searching .jm-a11y-btn { display: none; }

    .jm-intro__facts { text-align: left; }

    .jm-pills { display: none; }
    .jm-sheet { display: block; }
    .jm-clear { min-height: 40px; }

    .jm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max(120px, calc((100vw - 38px) / 2)); gap: 6px; }
    .jm-tile__over { display: none; }
    .jm-doc { padding: 10px; }
    .jm-doc__cover { height: 32%; font-size: 1.125rem; }
    .jm-doc__title { -webkit-line-clamp: 2; font-size: 0.71875rem; }

    .jm-docrow { grid-template-columns: 42px minmax(0, 1fr) 40px; }
    .jm-docrow__fmt, .jm-docrow__size { display: none; }
    .jm-docrow__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: break-word; }
    .jm-docrow__meta--wide { display: none; }
    .jm-docrow__meta--narrow { display: block; }
    .jm-docrow__dl { width: 40px; height: 40px; }

    .jm-strip { grid-auto-columns: 72vw; gap: 12px; }
    .jm-albums { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .jm-back { min-height: 40px; }
    .jm-pager__step { padding: 0 12px; }

    .jm-footer__links a { display: inline-block; padding: 10px 0; }

    .lv-columns, .lv-image-text { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
    .lv-gallery--3 .lv-gallery__grid, .lv-gallery--4 .lv-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .jm-viewer__stage, .jm-viewer.is-info .jm-viewer__stage { padding: 0 12px 12px; }
    .jm-viewer__stage .jm-varrow { display: none; }
    .jm-viewer__foot { justify-content: space-between; gap: 12px; height: auto; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); }
    .jm-viewer__foot .jm-varrow { position: static; display: flex; transform: none; }
    .jm-viewer.is-single .jm-viewer__foot { justify-content: center; }
    .jm-viewer__counter { font-size: 0.8125rem; opacity: .7; }
    .jm-vdoc { width: 100%; height: auto; max-height: 100%; }
    .jm-viewer__scrim:not([hidden]) { position: fixed; inset: 0; z-index: 2; display: block; background: rgba(0, 0, 0, .3); }
    .jm-viewer__info { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; width: auto; max-height: 75vh; padding: 14px 20px calc(28px + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--v-line); border-radius: 16px 16px 0 0; background: var(--v-bg); animation: jm-slide-up .25s var(--jm-ease); }
    .jm-viewer__handle { display: block; width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: rgba(128, 128, 128, .5); }
    .jm-viewer__info-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .jm-vrow { padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .jm-tile:hover .jm-tile__img, .jm-tile:hover .jm-tile__video, .jm-tile:hover .jm-doc__page, .jm-album__link:hover .jm-cover { transform: none !important; }
}

/* Enlarged text on wide screens: the header takes the medium layout (tabs on a second row)
   rather than pushing its last button off the screen. */
@media (min-width: 1100px) {
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-header__bar { flex-wrap: wrap; gap: 0 20px; }
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-lockup { min-height: 64px; }
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-search { margin-left: auto; }
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-tabs { order: 3; flex: 0 0 calc(100% + 2 * var(--jm-pad)); height: 44px; margin: 0 calc(-1 * var(--jm-pad)); padding: 0 var(--jm-pad); overflow-x: auto; border-top: 1px solid var(--jm-sand); scrollbar-width: none; }
}

/* Small phones: the logo, the name and the two header buttons share one line; the name stays whole. */
@media (max-width: 399.98px) {
    .jm-header__bar { gap: 0 8px; }
    .jm-lockup { gap: 10px; }
    .jm-lockup__logo { height: 22px; max-width: 96px; }
    .jm-lockup__name { font-size: 1rem; letter-spacing: .02em; }
    .jm-a11y-btn, .jm-search-toggle { width: 36px; }
}
/* Narrowest phones: the name takes two lines (name, then tagline) rather than being cut, and a
   document row gives its title the room a long word needs. */
@media (max-width: 339.98px) {
    .jm-docrow { grid-template-columns: 32px minmax(0, 1fr) 36px; }
    .jm-docrow__title { font-size: 0.875rem; }
    .jm-docrow__dl { width: 36px; height: 36px; }
    .jm-h1 { font-size: min(1.875rem, 7.5vw); }
    /* Enlarged text: the decorative thumbnail gives way (the format is in the line below the title). */
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-docrow { grid-template-columns: minmax(0, 1fr) 36px; }
    html:is(.a11y-font-scaled, .a11y-low-vision, .a11y-senior, .a11y-dyslexia, .a11y-letter-spacing) .jm-docrow__thumb { display: none; }
    .jm-lockup__name { white-space: normal; line-height: 1.1; }
    .jm-lockup__tagline { display: block; }
}

/* ---------- Accessibility module (assets/a11y, @intside/accessibility) ----------
 * The module's files stay untouched; here only its tokens take the J-Matassa palette and
 * fonts. Its classes on <html> (a11y-font-scaled, a11y-senior…) scale the root font size,
 * and every font size of this file is in rem, so the text grows and the layout reflows. */
:root {
  --a11y-accent: #106609; --a11y-accent-soft: rgba(16, 102, 9, .1); --a11y-navy: #1D2E1B;
  --a11y-surface-2: #FFF9F3; --a11y-line: #E6D9B5; --a11y-line-strong: #D6C9A6;
  --a11y-text: #1D2E1B; --a11y-muted: #5E6E5B; --a11y-muted-2: #5E6E5B;
}
.acsblta11y { font-family: var(--jm-body); }
.acsblta11y-overlay { z-index: 1100; }
/* No contact e-mail set: « Signaler un problème » would point at the module's example address. */
.acsblta11y a[href="mailto:accessibilite@example.org"] { display: none; }
/* Narrow phones: enlarged text grows only as far as whole words still fit the screen. */
@media (max-width: 360px) {
  html.a11y-font-scaled, html.a11y-low-vision { font-size: min(calc(1rem * var(--a11y-font-scale)), 6.4vw) !important; }
  html.a11y-senior { font-size: min(calc(1.1rem * var(--a11y-font-scale)), 6.4vw) !important; }
  html:is(.a11y-dyslexia, .a11y-letter-spacing) { font-size: min(calc(1rem * var(--a11y-font-scale)), 5.6vw) !important; }
  .acsblta11y-overlay { padding: 8px; }
  .acsblta11y-head { padding: 14px 14px 12px; }
  .acsblta11y-body { padding: 16px 14px; }
  .acsblta11y-foot { padding: 12px 14px; }
}
