/* ==========================================================================
   SciDirect – main stylesheet (public site + admin)
   ========================================================================== */
:root {
    --text: #1f1f1f;
    --muted: #4c4c4c;
    --line: #dcdcdc;
    --soft: #f5f5f5;
    --blue: #0272b1;
    --blue-dark: #015a8e;
    --orange: #e9711c;
    --hl: #e8f2f9;
    --ok: #2e7d32;
    --bad: #c62828;
    --warn: #b26a00;
    --radius: 0;
    --font: "Segoe UI", "Helvetica Neue", Arial, Helvetica, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: #fff; font: 400 16px/24px var(--font); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 400; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
body.admin h1, body.admin h2, body.admin h3 { font-weight: 600; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
small { font-size: .85em; }
code, .mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }
code { background: var(--soft); padding: 1px 5px; border-radius: 3px; font-size: .9em; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
/* the home page keeps its content in a 1216px column with 112px gutters on wide screens (as ScienceDirect does) */
@media (min-width: 1121px) { body.home .wrap { max-width: 1440px; padding: 0 112px; } }
.narrow { max-width: 820px; }
main { min-height: 60vh; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--blue); border-radius: var(--radius); min-height: 40px; padding: 6px 16px; font: inherit; font-weight: 400; line-height: 24px; cursor: pointer; text-align: center; text-decoration: none; background: #fff; color: var(--blue); }
.btn:hover { text-decoration: none; background: var(--hl); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); min-width: 96px; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-dark { background: transparent; color: var(--text); border-color: var(--text); padding-right: 12px; }
.btn-dark:hover { background: #f0f0f0; }
.btn-small { min-height: 0; padding: 3px 10px; font-size: .85rem; border-width: 1px; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
form.inline { display: inline; margin: 0; }

label { display: block; margin-bottom: 14px; }
label > span { display: block; font-weight: 400; margin-bottom: 2px; font-size: 14px; line-height: 22px; }
input, select, textarea { width: 100%; font: inherit; color: inherit; padding: 7px 15px 6px; min-height: 40px; border: 1px solid var(--text); border-radius: var(--radius); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; }
body.admin input, body.admin select, body.admin textarea { border-color: #8a8f98; padding: 8px 10px; min-height: 0; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--blue); }
input[type=file] { border: 0; padding: 4px 0; min-height: 0; }
input[type=color] { width: 70px; height: 38px; padding: 2px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; font-size: .95rem; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-bottom: 8px; }
.check input { margin-top: .35em; flex: none; }
.check > span { display: inline; font-weight: 400; margin: 0; font-size: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.nowrap { white-space: nowrap; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- flash messages ---------- */
.flashes { padding-top: 14px; }
.flash { border-left: 4px solid; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; background: var(--hl); border-color: var(--blue); }
.flash-success { background: #e8f5e9; border-color: var(--ok); color: #1b4d20; }
.flash-error { background: #fdecea; border-color: var(--bad); color: #7f1d1d; }
.flash-warn { background: #fff4de; border-color: #e9a000; color: #5a4300; }
.flash-info { background: var(--hl); border-color: var(--blue); }
.notice-bar { background: #fff4de; border-bottom: 1px solid #f0d9a2; padding: 8px 0; font-size: .95rem; }

/* ---------- header ---------- */
.site-header { background: #fff; position: relative; z-index: 30; }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px; color: var(--orange); font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo-text { color: var(--orange); }
.logo-text span { color: var(--orange); }
.logo-mark { display: inline-block; width: 24px; height: 24px; background: var(--orange); border-radius: 4px 14px 4px 14px; position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; background: #fff; border-radius: 2px 7px 2px 7px; opacity: .92; }
.hdr-nav { display: flex; align-items: center; gap: 12px; }
.hdr-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); padding: 0 8px; height: 40px; font-size: 16px; }
.hdr-link:hover { color: var(--blue); text-decoration: none; }
.hdr-link .icon { width: 16px; height: 16px; }
.hdr-link + .hdr-link, .hdr-link + .hdr-help { margin-left: 56px; }
/* Help / My account / Sign in: an icon with its label on wide screens, icon only at 1120px and below (as on ScienceDirect) */
.hdr-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-left: 32px; padding: 0 4px; border: 0; background: none; color: var(--text); font-size: 16px; line-height: 24px; cursor: pointer; list-style: none; }
.hdr-btn:hover { color: var(--blue); text-decoration: none; }
.hdr-btn::-webkit-details-marker { display: none; }
.hdr-nav .icon-btn { margin-left: 12px; }
@media (min-width: 1121px) { .hdr { padding: 0 32px; } }
@media (max-width: 1120px) {
    .hdr-btn { width: 40px; margin-left: 12px; padding: 0; justify-content: center; }
    .hdr-btn:hover { background: #f2f2f2; }
    .hdr-btn .lbl { display: none; }
    .hdr-link + .hdr-link { margin-left: 35px; }
    .hdr-link + .hdr-help { margin-left: 46px; }
}
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; list-style: none; }
.icon-btn:hover { color: var(--blue); background: #f2f2f2; text-decoration: none; }
.icon-btn::-webkit-details-marker { display: none; }
.hdr-menu { position: relative; }
.hdr-burger { display: none; }
html.mm-open { overflow: hidden; }
.hdr-menu > ul { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 200px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border: 1px solid #c9c9c9; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.hdr-menu li { padding: 0; }
.hdr-menu li a, .hdr-menu li button { display: block; width: 100%; padding: 8px 16px; text-align: left; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.hdr-menu li a:hover, .hdr-menu li button:hover { background: #f2f2f2; color: var(--blue); text-decoration: none; }
.hdr-menu li .who { padding: 6px 16px 8px; font-size: 14px; color: var(--muted); border-bottom: 1px solid #e3e3e3; margin-bottom: 4px; }
.hdr-menu li.on a { font-weight: 600; }

/* phone / small tablet menu: hamburger button + right-hand drawer over a pale overlay (modelled on ScienceDirect's) */
.hdr-burger-btn { display: flex; align-items: center; justify-content: center; width: 52px; height: 44px; margin-right: -8px; color: var(--text); cursor: pointer; list-style: none; position: relative; }
.hdr-burger-btn::-webkit-details-marker { display: none; }
.hdr-burger-btn .icon { width: 24px; height: 24px; stroke-width: 2; }
.hdr-burger-btn:hover { color: var(--blue); }
.hdr-burger[open] > .hdr-burger-btn::before { content: ""; position: fixed; inset: 0; z-index: 1; background: rgba(235, 235, 235, .85); cursor: default; }
.mm { position: fixed; top: 0; right: 0; bottom: 0; z-index: 2; width: min(380px, calc(100% - 48px)); background: #fff; overflow-y: auto; padding: 16px 12px 24px; text-align: left; font-size: 16px; line-height: 24px; animation: mm-in .22s ease-out; }
@keyframes mm-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mm { animation: none; } }
.mm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 25px; }
.mm-row { display: inline-flex; align-items: center; gap: 6px; color: var(--text); min-width: 0; }
.mm-row:hover, .mm-link:hover, .mm-sub:hover { color: var(--blue); text-decoration: none; }
.mm-row .icon { width: 20px; height: 20px; }
.mm-row span { overflow-wrap: anywhere; }
.mm-close { flex: none; width: 24px; height: 24px; padding: 6px; margin: 0; border: 0; background: none; color: var(--blue); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mm-close .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.mm-line { border: 0; border-top: 2px solid #dcdcdc; margin: 24px -12px; }
.mm-inst { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--blue); font-size: 14px; line-height: 20px; }
.mm-inst .icon { width: 16px; height: 16px; flex: none; }
.mm-label { margin: 0 0 12px; color: #707070; }
.mm-link { display: block; margin: 0 0 12px; color: #4c4c4c; overflow-wrap: anywhere; }
.mm-link.on { font-weight: 700; color: var(--text); }
.mm-sub { display: block; margin: 12px 0 0 26px; color: var(--text); font-size: 16px; }
.mm form.mm-sub { display: block; margin: 12px 0 0 26px; }
form.mm-sub button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
form.mm-sub button:hover { color: var(--blue); }
.header-search { padding: 8px 24px 12px; }
.mini-search { max-width: 540px; margin: 0 auto; }
.mini-search .ms-label { display: block; font-size: 14px; line-height: 22px; margin: 0 0 4px; }
.mini-search .ms-row { display: flex; }
.mini-search input { flex: 1; width: auto; }
.mini-search .ms-btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; background: var(--blue); border: 2px solid var(--blue); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mini-search .ms-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.mini-search .ms-adv { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--blue); font-size: 14px; }
.mini-search .ms-adv .icon { width: 16px; height: 16px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 32px; padding: 32px; font-size: 14px; line-height: 22px; border-top: 1px solid #eb6500; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 32px; }
.footer-bar .logo-mark { margin-top: 2px; }
.footer-bar a { color: var(--text); }
.footer-bar a:hover { color: var(--blue); }
.footer-bar .logo-mark-link { display: inline-block; width: 58px; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 32px; align-items: center; }
.footer-links strong { color: var(--orange); font-weight: 400; }
.footer-note { margin: 12px 0 0 90px; color: var(--muted); font-size: 12px; line-height: 18px; max-width: 800px; }
.footer-note .demo-note { display: block; margin-top: 4px; }

/* ---------- home ---------- */
.search-band { padding: 16px 0 0; }
.search-band h2 { font-size: 20px; line-height: 28px; padding: 8px 0; margin: 0; }
.home-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; margin: 0 -4px; }
.home-search label { margin: 0; padding: 4px; }
.home-search-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 34px 4px 24px; }
.home-search-actions > a { color: var(--text); }
.home-search-actions > a:hover { color: var(--blue); }

/* banner / carousel */
.banner { position: relative; height: 400px; overflow: hidden; background: #0e2b3d; color: #fff; }
.slide { position: absolute; inset: 0; display: none; }
.slide.on { display: block; }
.slide-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide-title { position: absolute; left: 24px; top: 36px; margin: 0; max-width: 400px; color: #fff; font: 400 40px/46px var(--serif); letter-spacing: -.01em; }
.slide-title em { font-style: italic; }
.slide-sub { position: absolute; left: 24px; top: 40px; margin: 0; }
.slide-tag { position: absolute; left: 24px; bottom: 76px; margin: 0; color: #fff; font-size: 18px; line-height: 24px; }
.slide-tag strong { font-weight: 700; }
.slide-box { position: absolute; top: 0; bottom: 52px; right: 40px; width: 330px; background: #fff; color: var(--text); padding: 24px 32px; }
.slide-box p { margin: 0; }
.slide-box .btn { margin-top: 24px; }
.banner-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: rgba(238,238,238,.9); display: flex; justify-content: center; gap: 8px; }
.banner-tab { background: none; border: 0; padding: 6px 16px 0; font: inherit; font-size: 14px; color: var(--blue); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.banner-tab::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #444; background: transparent; }
.banner-tab[aria-selected="true"]::before { background: #444; }
.banner-tab[aria-selected="true"] span { text-decoration: underline; text-underline-offset: 3px; }

/* explore */
.explore h1 { font-size: 32px; line-height: 40px; padding: 32px 0 16px; margin: 0; }
.domain-tabs { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 0 32px; background: #fff; border-bottom: 1px solid #d6d6d6; }
.domain-tabs a { color: var(--text); font-size: 20px; line-height: 28px; padding: 10px 0 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.domain-tabs a:hover { text-decoration: none; color: var(--blue); }
.domain-tabs a.on { border-bottom-color: var(--orange); }
.domain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0; padding: 32px 0 8px; scroll-margin-top: 48px; }
.domain + .domain { border-top: 1px solid #e3e3e3; }
.domain h2 { font-size: 24px; line-height: 32px; margin: 0 0 16px; }
.domain-side { padding-right: 16px; }
.domain-side p { margin: 0; padding: 8px 0; }
.subject-links { list-style: none; padding: 0; margin: 0 0 8px; }
.subject-links li { margin-bottom: 8px; }
.domain-main { grid-column: 2 / 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.domain-desc { grid-column: 1 / -1; margin: 0; }
.domain-col { padding-right: 24px; }
.domain-col h3 { font-size: 20px; line-height: 28px; padding: 16px 0; margin: 0; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { margin-bottom: 20px; }
.mini-list a { display: block; font-family: var(--serif); line-height: 26px; }
.mini-list small { display: block; line-height: 24px; color: var(--text); }
.reco { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 24px 0 24px; color: var(--text); }
.reco:hover { text-decoration: none; color: var(--blue); }
.reco .chev { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; background: var(--blue); color: #fff; }
.reco .chev .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.az { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; padding: 24px 0 32px; border-top: 1px solid #e3e3e3; }
.az > span { width: 200px; flex: none; }
.az-strip { display: flex; flex-wrap: wrap; gap: 0 20px; flex: 1; min-width: 0; }
.az-strip a { font-size: 20px; line-height: 28px; min-width: 14px; }
.az-strip a.on { color: var(--text); font-weight: 700; }
.latest { padding-top: 30px; }
.oa-panel { background: var(--soft); margin-top: 8px; padding: 40px 24px 32px; text-align: center; }
.oa-panel .oa-in { max-width: 678px; margin: 0 auto; }
.oa-panel h2 { font-size: 24px; line-height: 32px; margin: 0; }
.oa-panel p { margin: 16px 0 0; }
.oa-panel .oa-links { margin-top: 12px; display: grid; gap: 8px; }
.link-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 24px 0 8px; font-size: 14px; line-height: 22px; }
.link-cols h2 { font-size: 14px; line-height: 22px; font-weight: 400; margin: 0 0 12px; color: var(--text); }
.link-cols ul { list-style: none; padding: 0; margin: 0; }
.link-cols li { margin-bottom: 8px; }

/* ---------- result lists ---------- */
.results { list-style: none; padding: 0; margin: 0; }
.result { padding: 8px 0 20px; }
.result-meta { font-size: 14px; line-height: 22px; color: var(--muted); margin-bottom: 2px; }
.atype { color: var(--muted); }
.badge-oa { color: var(--orange); margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; }
.badge-lock { color: var(--muted); font-size: 14px; margin-left: 8px; }
.result-title { font: 400 16px/24px var(--serif); margin: 0 0 2px; }
.result-title a { color: var(--text); }
.result-title a:hover { color: var(--blue); text-decoration: underline; }
.result-source { font-size: 14px; line-height: 22px; color: var(--muted); }
.result-source a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.result-authors { font-size: 14px; line-height: 22px; color: var(--muted); margin-top: 2px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: flex-start; margin-top: 6px; font-size: 14px; }
.pdf-link { font-weight: 400; }
details.abs summary { cursor: pointer; color: var(--blue); }
details.abs p { margin: 6px 0 0; max-width: 760px; color: #444; }
.signin-promo { list-style: none; background: var(--hl); padding: 16px 24px; margin: 8px 0 20px; }
.signin-promo p { margin: 4px 0 12px; }
.empty { padding: 28px 0; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 4px; margin: 26px 0 8px; }
.pg { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-size: .92rem; }
a.pg:hover { background: var(--hl); text-decoration: none; }
.pg-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pg-gap { border-color: transparent; }

/* ---------- search page ---------- */
.search-top { padding-top: 8px; }
.search-top .mini-search { max-width: 640px; }
details.adv { margin: 0; }
details.adv > summary { cursor: pointer; list-style: none; width: max-content; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv[open] > summary .icon { transform: rotate(180deg); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; margin-top: 10px; }
.adv-grid label { margin-bottom: 8px; }
.search-layout, .browse-layout { display: grid; grid-template-columns: 206px minmax(0, 1fr); gap: 38px; padding-top: 16px; align-items: start; }
.refine { color: var(--muted); }
.refine h2 { font-size: 20px; line-height: 28px; margin: 40px 0 8px; color: var(--muted); }
.refine .count { font-size: 24px; line-height: 32px; font-weight: 400; margin: 0; color: var(--muted); }
.refine fieldset { border: 0; border-radius: 0; padding: 12px 0 2px; margin: 0; }
.refine legend { padding: 0; font-size: 16px; line-height: 24px; font-weight: 400; }
.years { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.years input { padding: 6px 8px; }
.facet-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: 14px; line-height: 22px; }
.facet-list li { margin-bottom: 4px; }
.facet-list a.active { font-weight: 700; color: var(--text); }
.refine .check { font-size: 14px; line-height: 22px; }
.refine .check > span { font-size: 14px; }
.n { color: var(--muted); font-size: .9em; }
.facet-block { padding-top: 12px; margin-top: 4px; }
.facet-block h3 { font-size: 16px; line-height: 24px; }
.reset { margin-left: 10px; font-size: .9rem; }
.results-head { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.results-title { font-size: 1.2rem; margin: 0; }
.sorter { font-size: 14px; color: var(--muted); }
.sorter a, .sorter strong { margin: 0 3px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 0; }
.chips a { display: inline-block; background: var(--hl); border-radius: 999px; padding: 3px 12px; color: var(--text); font-size: 14px; }
.chips a.clear { background: none; padding-left: 4px; }
.save-search { margin: 12px 0 0; font-size: 14px; }

/* ---------- browse + publication pages ---------- */
.browse-main h1 { font-size: 1.5rem; }
.title-filter { display: flex; gap: 8px; margin: 0 0 12px; max-width: 640px; flex-wrap: wrap; }
.title-filter label { flex: 1 1 260px; margin: 0; }
.title-filter input[type=search], .title-filter select { flex: 1 1 240px; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.letter-head { font-size: 1.6rem; font-weight: 700; margin: 22px 0 6px; color: var(--text); }
.pub-item { padding: 8px 0; }
.pub-title { font-size: 1.05rem; font-weight: 600; }
.pub-sub { font-size: .9rem; color: #444; }
.pub-meta { font-size: .85rem; color: var(--muted); }
.oa-text { color: var(--orange); font-weight: 600; }
.pub-hero { --pub-color: var(--orange); background: linear-gradient(100deg, color-mix(in srgb, var(--pub-color) 14%, #fff), #fff 70%); border-bottom: 1px solid var(--line); padding: 28px 0; }
.pub-hero-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 28px; align-items: center; }
.pub-cover { width: 130px; height: 170px; background: var(--pub-color); border-radius: 3px 8px 8px 3px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3.4rem; font-weight: 700; box-shadow: 4px 4px 0 rgba(0,0,0,.12); }
.pub-hero h1 { margin-bottom: 4px; }
.pub-subtitle { font-size: 1.1rem; color: #444; margin-bottom: 6px; }
.pub-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .92rem; color: var(--muted); }
.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.pub-search { display: inline-flex; gap: 6px; }
.pub-search input { width: 230px; }
.pub-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 32px; padding-top: 26px; align-items: start; }
.issue-nav h2, .pub-side h2 { font-size: 1.05rem; }
.issue-nav details { border-top: 1px solid var(--line); padding: 8px 0; }
.issue-nav summary { cursor: pointer; font-weight: 600; }
.issue-nav ul { list-style: none; padding: 6px 0 0 8px; margin: 0; font-size: .92rem; }
.issue-nav li { margin-bottom: 4px; }
.issue-nav a.active { font-weight: 700; color: var(--text); }
.pub-main h2 { font-size: 1.3rem; }
.popular { padding-left: 1.2em; font-size: .93rem; }
.popular li { margin-bottom: 8px; }

/* ---------- article page ---------- */
.article-wrap { padding-top: 22px; }
.article-source { font-size: .95rem; color: var(--muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.jlink { font-weight: 400; color: var(--text); font-size: 20px; line-height: 28px; }
.article-labels { font-size: 14px; line-height: 22px; color: var(--muted); margin-bottom: 8px; }
.article-title { font: 400 24px/34px var(--serif); margin-bottom: 14px; max-width: 1000px; }
.authors { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 4px; padding: 0; margin: 0 0 6px; font-size: 16px; }
.authors li:not(:last-child)::after { content: ","; margin-right: 6px; }
.authors sup { font-size: .7em; color: var(--blue); }
.affs { font-size: .9rem; color: #444; margin-bottom: 8px; }
.affs summary { cursor: pointer; color: var(--blue); width: max-content; }
.affs ol { margin: 6px 0 0; }
.article-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 8px; }
details.menu { position: relative; }
details.menu > ul { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 210px; list-style: none; margin: 0; padding: 6px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
details.menu li { padding: 6px 14px; }
details.menu li a, details.menu li button { display: block; width: 100%; text-align: left; color: var(--text); }
.doi { font-size: .9rem; color: var(--muted); margin: 4px 0 10px; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-top: 14px; }
.tabs a { padding: 8px 2px; color: var(--text); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a.on { border-color: var(--orange); }
.article-grid { display: grid; grid-template-columns: minmax(0, 660px) minmax(220px, 300px); justify-content: space-between; gap: 44px; padding-top: 22px; align-items: start; }
.article-body { max-width: 660px; font: 400 16px/26px var(--serif); }
.article-body h2 { font: 400 20px/30px var(--serif); margin: 1.6em 0 .5em; }
.article-body h3 { font: 400 18px/28px var(--serif); margin: 1.3em 0 .4em; }
.article-body section:first-child h2 { margin-top: 0; }
.highlights { background: var(--hl); padding: 16px 22px 6px; margin-bottom: 8px; }
.highlights h2 { margin-top: 0 !important; font-size: 20px; }
.highlights li { margin-bottom: 8px; }
.keywords { list-style: none; padding: 0; margin: 0; font-family: var(--serif); }
.keywords li { display: inline; }
.keywords li:not(:last-child)::after { content: "; "; }
.keywords a { color: var(--text); }
.keywords a:hover { color: var(--blue); text-decoration: underline; }
.references ol { padding-left: 2.2em; font-size: 14px; line-height: 22px; font-family: var(--font); }
.references li { margin-bottom: 8px; }
.references li:target { background: #fff6d6; }
.locked { border: 1px solid var(--line); background: var(--soft); border-radius: 6px; padding: 22px 24px 8px; margin-top: 26px; }
.locked h2 { margin-top: 0 !important; }
.article-side { position: sticky; top: 14px; }
.outline h2, .side-box h2 { font-size: 1rem; margin-bottom: 8px; }
.outline ul { list-style: none; padding: 0; margin: 0 0 24px; border-left: 2px solid var(--line); }
.outline li a { display: block; padding: 4px 0 4px 12px; color: var(--text); font-size: .93rem; margin-left: -2px; border-left: 2px solid transparent; }
.outline li.lvl3 a { padding-left: 26px; font-size: .88rem; }
.outline li a:hover { color: var(--blue); text-decoration: none; }
.outline li a.active { border-left-color: var(--orange); font-weight: 700; }
.side-box { border-top: 1px solid var(--line); padding-top: 12px; font-size: .92rem; }
.side-box dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.side-box dt { color: var(--muted); }
.side-box dd { margin: 0; }
.recommended { margin-top: 40px; }

/* ---------- auth, account ---------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 40px; padding-bottom: 20px; }
.auth-card { width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: 6px; padding: 28px 30px 22px; box-shadow: 0 1px 6px rgba(0,0,0,.06); background: #fff; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-links { font-size: .93rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.account-wrap { padding-top: 26px; }
.acct-tabs { display: flex; flex-wrap: wrap; gap: 22px; border-bottom: 1px solid var(--line); margin: 14px 0 20px; }
.acct-tabs a { padding: 8px 2px; color: var(--text); border-bottom: 3px solid transparent; font-weight: 600; }
.acct-tabs a.on { border-color: var(--orange); }
.panel { border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px 8px; margin-bottom: 20px; background: #fff; max-width: 860px; }
.panel h2 { font-size: 1.15rem; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid #eee; }
.badge-ok, .badge-warn, .pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 700; margin-left: 8px; background: #eee; color: #444; }
.badge-ok, .pill-ok { background: #e1f3e3; color: #1b5e20; }
.badge-warn, .pill-warn { background: #fff0cf; color: #7a4f00; }
.pill-bad { background: #fde0dd; color: #8e1b14; }
.pill { margin-left: 0; }
.help-page h2 { margin-top: 1.6em; }
.error-page { padding: 60px 20px; }

/* ---------- admin ---------- */
body.admin { background: #f4f5f7; }
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #23272e; color: #d8dbe0; padding: 22px 16px; position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; gap: 18px; }
.admin-brand { display: flex; flex-direction: column; color: #fff; font-weight: 700; font-size: 1.15rem; }
.admin-brand:hover { text-decoration: none; }
.admin-brand small { font-weight: 400; color: #9aa0aa; }
.admin-brand .logo-mark { width: 16px; height: 16px; margin-bottom: 4px; }
.admin-side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-side nav a { color: #d8dbe0; padding: 8px 10px; border-radius: var(--radius); }
.admin-side nav a:hover { background: #2f343c; text-decoration: none; }
.admin-side nav a.on { background: var(--orange); color: #fff; }
.admin-side .linklike { color: #9aa0aa; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-main h1 { font-size: 1.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.stat strong { display: block; font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.admin-cols { align-items: start; gap: 20px; }
.admin-cols .panel { overflow-x: auto; }
@media (max-width: 1100px) { .admin-cols { grid-template-columns: minmax(0, 1fr); } }
.admin-main .panel { max-width: none; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: .93rem; margin-bottom: 14px; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
.table th { background: #fafafa; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.row-actions { white-space: normal; }
.row-actions .btn { margin: 0 4px 4px 0; }
.mailbody { white-space: pre-wrap; background: var(--soft); padding: 10px; border-radius: var(--radius); font-size: .85rem; max-width: 640px; overflow: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
    .pub-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .pub-side { grid-column: 1 / -1; }
    .article-grid { grid-template-columns: minmax(0, 1fr); }
    .article-side { position: static; order: -1; }
    .outline ul { display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; }
    .outline li a { padding-left: 0 !important; border-left: 0; }
}
@media (max-width: 800px) {
    .browse-layout, .pub-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .site-footer { padding: 24px 16px; }
    .footer-note { margin-left: 0; }
    .pub-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .pub-cover { width: 90px; height: 118px; font-size: 2.4rem; }
    .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
    /* admin: a compact top bar (brand + Sign out), with the sections in one swipeable row underneath */
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-side { position: sticky; top: 0; z-index: 20; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand out" "nav nav"; align-items: center; gap: 8px 12px; padding: 10px 14px 10px; }
    .admin-brand { grid-area: brand; flex-direction: row; align-items: center; gap: 8px; font-size: 1.05rem; }
    .admin-brand .logo-mark { margin: 0; }
    .admin-brand small { font-size: .8rem; border-left: 1px solid #4a5059; padding-left: 8px; }
    .admin-side form { grid-area: out; }
    .admin-side .linklike { font-size: .9rem; padding: 6px 0; }
    .admin-side nav { grid-area: nav; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .admin-side nav::-webkit-scrollbar { display: none; }
    .admin-side nav a { flex: none; white-space: nowrap; padding: 7px 13px; border-radius: 999px; background: #2f343c; font-size: .92rem; scroll-snap-align: start; }
    .admin-side nav a.on { background: var(--orange); }
    .admin-main { padding: 18px 14px 48px; }
    .admin-main h1 { font-size: 1.3rem; margin-bottom: 12px; }
    .panel { padding: 16px 14px 6px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 12px 14px; }
    .stat strong { font-size: 1.4rem; }
    .dz-drop { padding: 16px 12px 12px; }
    .dz-big { font-size: 18px; }
    .dz-row { gap: 12px; }
    .bf-current { gap: 14px; }
    .article-title { font-size: 1.55rem; }
    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .auth-card { padding: 22px 18px 16px; }
    .inst-row { flex-direction: column; }
}
@media (max-width: 805px) {
    /* ScienceDirect's compact header: a 48px bar with the logo and one hamburger button */
    .site-header { z-index: 60; }
    .hdr { height: 48px; padding: 0 16px; gap: 8px; }
    .logo { height: 32px; gap: 6px; padding: 0; font-size: 20px; min-width: 0; }
    .logo-mark { width: 24px; height: 24px; }
    .hdr-nav { display: none; }
    .hdr-burger { display: block; position: static; }
}
@media (max-width: 420px) {
    .admin-main .btn { min-height: 38px; padding: 5px 12px; }
    .row-actions .btn { margin-bottom: 6px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
    .site-header, .site-footer, .article-side, .article-actions, .tabs, .notice-bar, .header-search { display: none !important; }
    .article-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- book cover on the book page ---------- */
.pub-cover.has-img { height: auto; background: none; display: block; border-radius: 2px 6px 6px 2px; overflow: hidden; line-height: 0; }
.pub-cover.has-img img { display: block; width: 100%; height: auto; max-height: 230px; object-fit: contain; object-position: left top; background: #fff; }

/* ---------- admin: book-file drop zone (modelled on cPanel's File Manager upload) ---------- */
.book-files .js-only[hidden], .book-files .dz-fallback[hidden] { display: none; }
.dz-drop { border: 2px dashed #c9c9c9; border-radius: 4px; text-align: center; padding: 22px 16px 16px; margin: 6px 0 14px; background: #fff; transition: background .15s, border-color .15s; }
.dz-drop.over { border-color: var(--blue); background: #f0f7fc; }
.dz-drop p { margin: 0 0 14px; }
.dz-big { font-size: 20px; color: #555; }
.dz-or { font-size: 18px; color: #555; }
.dz-pick { background: #3a87c8; color: #fff; border: 1px solid #337ab7; border-radius: 3px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.dz-pick:hover { background: #2f74ae; }
.dz-hint { font-size: .85rem; color: var(--muted); margin: 14px 0 0 !important; }
.dz-queue { list-style: none; margin: 0 0 12px; padding: 0; }
.dz-item { margin: 0 0 16px; }
.dz-name { font-weight: 700; margin-bottom: 4px; word-break: break-all; }
.dz-row { display: flex; align-items: center; gap: 22px; }
.dz-bar { flex: 0 1 450px; width: 100%; height: 20px; background: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 3px; overflow: hidden; }
.dz-fill { height: 100%; width: 0; background: #428bca; color: #fff; font-size: 12px; line-height: 18px; text-align: center; transition: width .12s linear; white-space: nowrap; overflow: hidden; }
.dz-x { border: 0; background: none; font-size: 22px; line-height: 1; font-weight: 700; color: #222; cursor: pointer; padding: 0 4px; }
.dz-x:hover { color: #b00020; }
.dz-meta { font-size: .8rem; color: #666; margin-top: 6px; }
.dz-item.ok .dz-fill { background: #3c9a46; }
.dz-item.ok .dz-meta { color: #1b5e20; }
.dz-item.bad .dz-fill { background: #c0392b; }
.dz-item.bad .dz-meta { color: #8e1b14; }
.bf-current { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-start; border-top: 1px solid var(--line); padding: 14px 0 6px; margin-bottom: 8px; }
.bf-cover { display: flex; flex-direction: column; gap: 4px; width: 120px; }
.bf-thumb { width: 120px; height: auto; max-height: 180px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.bf-nocover { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; border: 1px dashed #c9c9c9; color: var(--muted); font-size: .85rem; }
.bf-cover small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.bf-files { list-style: none; margin: 0; padding: 0; flex: 1 1 240px; }
.bf-files li { margin-bottom: 8px; }
.bf-files .muted { color: var(--muted); }

/* ---------- sign in via your institution ---------- */
.btn-block { display: flex; width: 100%; }
.btn-block .icon { width: 20px; height: 20px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.inst-search label span { display: block; font-weight: 600; margin-bottom: 4px; }
.inst-row { display: flex; gap: 8px; }
.inst-row input { flex: 1; }
.inst-list { list-style: none; margin: 14px 0 6px; padding: 0; border-top: 1px solid var(--line); }
.inst-list li { border-bottom: 1px solid var(--line); }
.inst-list a { display: block; padding: 11px 6px; font-size: 1.02rem; }
.inst-list a:hover { background: #f3f8fc; }
.hdr-menu li.inst-access { display: flex; gap: 6px; align-items: center; color: var(--blue); font-weight: 600; font-size: 13px; padding: 4px 16px 8px; }
.hdr-menu li.inst-access .icon { width: 16px; height: 16px; flex: none; }

/* ---------- home page: ScienceDirect's tablet and phone layouts ---------- */
@media (max-width: 992px) {
    .home-search label { padding: 4px 4px 30px; }
    .home-search-actions { padding: 0 4px 16px; }
    /* subject areas become accordions (JS adds .is-open; without JS they simply stay expanded) */
    .domain-tabs { display: none; }
    .explore h1 { font-size: 24px; line-height: 32px; padding: 32px 8px 16px; }
    .domain, .domain + .domain { display: block; padding: 0; margin: 0 8px; border-top: 2px solid #b8b8b8; border-bottom: 2px solid #b8b8b8; scroll-margin-top: 0; }
    .domain + .domain { margin-top: -2px; }
    .domain-side { padding-right: 0; }
    .domain-side > h2 { position: relative; margin: 0; padding: 8px 32px 8px 0; font-size: 16px; line-height: 24px; }
    .domain.is-acc .domain-side > h2 { cursor: pointer; }
    .domain.is-acc .domain-side > h2::after { content: ""; position: absolute; right: 0; top: 14px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230272b1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 5.5l5.500 5.500 5.500-5.500'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
    .domain.is-acc.is-open .domain-side > h2::after { transform: rotate(180deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e9711c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 5.5l5.500 5.500 5.500-5.500'/%3E%3C/svg%3E"); }
    .domain.is-acc.is-open .domain-side > h2 { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px; }
    .domain.is-acc:not(.is-open) .domain-side > :not(h2), .domain.is-acc:not(.is-open) .domain-main { display: none; }
    .domain-main { display: block; padding-bottom: 8px; }
    .domain-desc { padding-top: 16px; }
    .domain-col { padding-right: 0; }
    .reco { padding: 24px 0 24px; }
    .az > span { width: 25%; }
}
@media (max-width: 767px) {
    .home-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-search label:first-child { grid-column: 1 / -1; }
    /* banner: full-bleed picture, white caption laid over its lower part, a strip of dots underneath */
    .slide-title { top: 28px; left: 16px; max-width: calc(100% - 32px); font-size: 32px; line-height: 38px; }
    .slide-tag { top: 124px; bottom: auto; left: 16px; font-size: 16px; max-width: calc(100% - 32px); }
    .slide-box { top: auto; left: 0; right: 0; bottom: 52px; width: auto; padding: 12px 12px 16px; background: rgba(255, 255, 255, .95); font-size: 14px; line-height: 22px; }
    .slide-box .btn { margin-top: 12px; }
    .banner-tabs { gap: 0; }
    .banner-tab { padding: 0 25px; justify-content: center; }
    .banner-tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    /* A-Z strip and the open-access panel */
    .az { display: block; padding: 32px 0 0; border-top: 0; }
    .az > span { display: block; width: auto; padding: 0 8px 8px; font-size: 20px; line-height: 28px; }
    .az-strip { gap: 0; padding: 16px 0 8px; }
    .az-strip a { padding: 0 10.5px; }
    .oa-panel { margin-top: 32px; padding: 32px 32px 24px; text-align: left; }
    .oa-panel h2 { font-size: 24px; line-height: 32px; }
    .oa-panel .oa-links { gap: 0; }
    .link-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 8px 8px; font-size: 16px; line-height: 24px; }
    .link-cols h2 { font-size: 20px; line-height: 28px; margin: 0; padding-bottom: 16px; }
    .link-cols li { margin: 0; }
}
@media (max-width: 575px) {
    .home-search { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    /* footer: logo, then the links one under another (as on ScienceDirect's phone layout) */
    .site-footer { padding: 32px 16px; }
    .footer-bar { display: block; }
    .footer-bar .logo-mark-link { display: block; margin-bottom: 24px; }
    .footer-links { display: block; }
    .footer-links a, .footer-links strong { display: block; padding: 0 0 16px; }
    .footer-note { margin: 8px 0 0; }
    .banner-tabs { background: #ececec; }
}
/* wide screens: the three search boxes, the Search button and "Advanced search" share one row */
@media (min-width: 1200px) {
    .home-search { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 0; }
    .home-search label { flex: 0 0 24.17%; min-width: 0; }
    .home-search-actions { flex: none; display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 16px; padding: 30px 0 0 4px; }
}

/* search results: ScienceDirect keeps the refine column from 576px up and drops it on phones */
@media (max-width: 991px) and (min-width: 576px) {
    .search-layout { grid-template-columns: minmax(140px, 27%) minmax(0, 1fr); gap: 62px; }
}
@media (max-width: 575px) {
    .search-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: baseline; }
    .search-layout .refine { display: contents; }
    .search-layout .refine > :not(.count) { display: none; }
    .search-layout .refine .count { grid-column: 1; grid-row: 1; font-size: 19.2px; line-height: 27.2px; padding: 12px 0 8px; }
    .search-layout .results-col { display: contents; }
    .search-layout .results-col > * { grid-column: 1 / -1; }
    .search-layout .results-col > .results-head { grid-column: 2; grid-row: 1; padding: 12px 0 8px; }
}
@media (max-width: 767px) {
    .header-search.search-top { padding-left: 8px; padding-right: 8px; }
}

/* ---------- Uploaded logo: shown with no background, border or padding of its own ---------- */
.logo.has-img { padding: 0; background: none; }
.logo-img { display: block; width: auto; height: auto; max-width: 220px; max-height: 36px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; object-fit: contain; }
.logo-img-foot { max-width: 200px; max-height: 32px; }
.site-footer.has-logo .footer-bar { display: block; }
.site-footer.has-logo .logo-mark-link { display: block; width: auto; margin-bottom: 16px; }
.site-footer.has-logo .footer-note { margin-left: 0; }
@media (max-width: 805px) {
    .logo-img { max-width: 170px; max-height: 28px; }
}

/* ---------- Admin: logo upload ---------- */
.logo-admin { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 12px 24px; align-items: start; margin-bottom: 8px; }
.logo-admin > * { min-width: 0; }
.logo-preview { min-height: 110px; display: flex; align-items: center; justify-content: center; padding: 16px; border: 1px solid var(--line); background-color: #fff;
    background-image: linear-gradient(45deg, #e6e9ed 25%, transparent 25%, transparent 75%, #e6e9ed 75%), linear-gradient(45deg, #e6e9ed 25%, transparent 25%, transparent 75%, #e6e9ed 75%);
    background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.logo-preview img { display: block; max-width: 100%; max-height: 90px; background: none; border: 0; padding: 0; }
.logo-preview .muted { background: rgba(255, 255, 255, .85); padding: 2px 6px; text-align: center; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
@media (max-width: 700px) {
    .logo-admin { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Admin: roles and the add/edit user form ---------- */
.pill-super { background: #e8e0f7; color: #3d1f7a; }
.pill-admin { background: #dcebf7; color: #0b4a77; }
.user-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.role-help { margin: 4px 0 14px; padding: 10px 12px; background: var(--soft); border-left: 3px solid var(--line); font-size: .9rem; color: var(--muted); }
.role-help p { margin: 0 0 6px; }
.role-help p:last-child { margin-bottom: 0; }
.form-note { margin: 0 0 12px; padding: 8px 12px; background: var(--hl); font-size: .9rem; }
.user-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
.user-tools .title-filter { margin: 0; flex: 1 1 320px; }
.logo-preview img[hidden], .logo-preview .muted[hidden] { display: none; }
