/* Shared Mathematics Lab top bar */
.lab-topbar{background:#173f69!important;color:#fff!important;width:100%;font-family:Arial,system-ui,sans-serif;box-sizing:border-box;position:relative;z-index:10}
.lab-topbar *{box-sizing:border-box}
.lab-topbar-inner{max-width:1100px;margin:0 auto;padding:0 16px;min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.lab-topbar a{color:#fff!important;text-decoration:none!important;font-weight:700;font-size:17px;white-space:nowrap}
.lab-topbar a:hover{text-decoration:underline!important}
.lab-topbar .lab-tool-version{color:#e0e9f4;font-size:13px;font-weight:400;text-align:right}
@media(max-width:560px){.lab-topbar-inner{min-height:62px;gap:8px}.lab-topbar a{font-size:14px}.lab-topbar .lab-tool-version{font-size:11px}}

/* Full-width bar, including pages with default body margins */
body:has(> .lab-topbar){margin:0!important}
.lab-topbar{margin:0!important;border-radius:0!important;left:auto;right:auto}

/* Spacing between the shared bar and function-analysis content. */
body[data-page="laboratorio-unico"] > .lab-topbar + main.container{margin-top:24px}
/* The lab label and version are already displayed in the shared bar. */
body:has(> .lab-topbar) main.container > header .topline{display:none}

/* Hide the now-redundant original home heading. */
body[data-page="laboratorio-unico"] > main.container > header.site-header{display:none}
/* Version numbers are displayed in the shared top bar. */
body > .lab-topbar + main > header.page-header > .version,
body > .lab-topbar + main > .heading > .version{display:none}
/* Preserve the distinct white title area on the secant-method page. */
header.secant-heading{background:transparent;color:#192638;padding:18px 0 0}
header.secant-heading .wrap{padding-top:20px;padding-bottom:8px}

/* Science Lab breadcrumbs on the Mathematics and Physics landing pages. */
.lab-topbar .lab-parents{display:inline-flex;gap:10px;align-items:center;flex-wrap:wrap}
.lab-topbar .lab-crumb-sep{color:#b6d2ee;font-weight:400}
.lab-topbar .lab-parents a:first-child{font-size:14px;font-weight:600;color:#dceafe!important}
.lab-network-links{max-width:980px;margin:18px auto 22px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.lab-network-links a{display:inline-block;padding:11px 17px;background:#edf4fd;color:#174b87;border:1px solid #cddfee;border-radius:9px;font-weight:700;text-decoration:none}
.lab-network-links a:hover,.lab-network-links a:focus-visible{background:#deeeff}
@media(max-width:600px){.lab-topbar .lab-parents{gap:7px}.lab-topbar .lab-parents a{font-size:13px!important}.lab-topbar .lab-tool-version{font-size:11px}.lab-network-links{justify-content:center}}

/* Barra scientifica condivisa: Matematica, Fisica e Informatica - 2026-11-14 */
body:has(> .lab-topbar){margin:0!important}
body > .lab-topbar, .lab-topbar{
 background:#173f69!important;color:#fff!important;width:100%!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 position:relative;z-index:10;box-sizing:border-box;margin:0!important;
 font-family:Arial,system-ui,sans-serif!important;
}
.lab-topbar,.lab-topbar *{box-sizing:border-box}
.lab-topbar .lab-topbar-inner{
 width:100%!important;max-width:1100px!important;min-height:62px!important;
 margin:0 auto!important;padding:0 16px!important;
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:16px!important;flex-wrap:nowrap!important;
}
.lab-topbar .lab-topbar-inner > a,
.lab-topbar .lab-topbar-inner > .lab-parents a {
 color:#fff!important;background:transparent!important;text-decoration:none!important;
 font-weight:700!important;font-size:17px!important;line-height:1.3!important;white-space:nowrap!important;
 border:0!important;padding:0!important;
}
.lab-topbar .lab-topbar-inner > a:hover,.lab-topbar .lab-parents a:hover{text-decoration:underline!important}
.lab-topbar .lab-tool-version{
 color:#e0e9f4!important;font-size:13px!important;font-weight:400!important;
 text-align:right!important;line-height:1.35!important;margin-left:auto!important;
 white-space:normal!important;
}
.lab-topbar .lab-crumb-sep{display:none!important}
.lab-topbar .lab-parents{display:flex;align-items:center}
.lab-topbar .lab-parents a:not(:last-of-type){display:none!important}
@media(max-width:560px){
 .lab-topbar .lab-topbar-inner{min-height:62px!important;gap:8px!important;padding:0 12px!important}
 .lab-topbar .lab-topbar-inner > a,.lab-topbar .lab-topbar-inner > .lab-parents a{font-size:14px!important}
 .lab-topbar .lab-tool-version{font-size:11px!important}
}
/* Conserva il margine fra la barra ed i vecchi strumenti delle funzioni. */
body[data-page="laboratorio-unico"] > .lab-topbar + main.container{margin-top:24px}
body:has(> .lab-topbar) main.container > header .topline{display:none}

/* Le vecchie pagine di matematica avevano un secondo titolo di laboratorio sopra il contenuto. */
body > .lab-topbar + main.container > header.site-header{display:none!important}
